Skip to main content

Get Checkout Session

Retrieve a specific checkout session from your store.

By default the response contains the session fields with customer, product, and order set to null. Use the include query parameter to expand those sections in the same call.

Request​

GET /checkout-sessions/{id}

Path Parameters​

ParameterTypeRequiredDescription
idstringYesSession UUID.

Query Parameters​

ParameterTypeRequiredDescription
includestringNoComma-separated list of sections to expand. Allowed values: customer, product, order. Unknown values are ignored.
note

A section that is not requested is returned as null. The key is always present, so the response shape stays stable. Requesting include=product,order leaves customer as null.

A requested section is also null when that relation is absent. customer is null when the session has no linked customer, or when that customer is not linked to this store. customer_email on the session can still be set. product is null when the product no longer exists. order is null when the session has no order.

Example Request​

curl -X GET "https://cart.easy.tools/api/v1/checkout-sessions/0d944c6b-d50e-4c2c-8c2d-69a35cdd7227?include=product,order" \
-H "Authorization: Bearer YOUR_API_TOKEN"

Response​

Success Response (200)​

Returns a single checkout session. The example requests product and order. customer is null because that token was omitted.

{
"id": "0d944c6b-d50e-4c2c-8c2d-69a35cdd7227",
"status": "finalized",
"amount": 0,
"currency": "usd",
"quantity": 1,
"product_name": "Workshop",
"customer_email": "buyer@example.com",
"full_name": "Jane Doe",
"created_at": "2026-07-16T14:42:40+02:00",
"updated_at": "2026-07-16T14:42:43+02:00",
"terms_accepted": true,
"recovered_by": null,
"recovery_link_sent_at": null,
"second_recovery_link_sent_at": null,
"customer": null,
"product": {
"id": "6a7fdc8a-73c4-40bb-9996-16bc86486830",
"name": "Workshop"
},
"order": {
"id": "731a045a-aa68-4e18-93e8-65c1ad59b295",
"status": "completed",
"amount": 0,
"currency": "usd",
"created_at": "2026-07-16T14:42:43+02:00"
}
}

A read with no include returns the same base fields and sets every section to null:

{
"id": "0d944c6b-d50e-4c2c-8c2d-69a35cdd7227",
"status": "finalized",
"amount": 0,
"currency": "usd",
"quantity": 1,
"product_name": "Workshop",
"customer_email": "buyer@example.com",
"full_name": "Jane Doe",
"created_at": "2026-07-16T14:42:40+02:00",
"updated_at": "2026-07-16T14:42:43+02:00",
"terms_accepted": true,
"recovered_by": null,
"recovery_link_sent_at": null,
"second_recovery_link_sent_at": null,
"customer": null,
"product": null,
"order": null
}

Response Fields​

Field reference: Checkout Session object. amount is an integer in minor units (e.g. cents), or null. In the example, 0 is a free cart, not a missing price.

FieldTypeNullableDescription
idstringNoSession UUID.
statusstringNoSession status (see Status).
amountintegerYesCart total in minor units (e.g. cents). Null when the cart has no price yet.
currencystringYesLowercase ISO-4217 code (e.g. usd). Null on older sessions that stored none.
quantityintegerNoQuantity in the cart.
product_namestringYesProduct name. Null when the product no longer exists.
customer_emailstringYesEmail stored on the session. Null when the cart has no email yet.
full_namestringYesBuyer name. Null when the cart has no name yet.
created_atstringNoWhen the session was created (ISO 8601).
updated_atstringNoWhen the session was last updated (ISO 8601). Not limited to buyer edits.
terms_acceptedbooleanNoWhether the buyer accepted the terms.
recovered_bystringYesWho is credited with recovering the session: email, support, or null. Independent of status. See the object reference.
recovery_link_sent_atstringYesWhen the first recovery email was sent (ISO 8601). Null when none was sent.
second_recovery_link_sent_atstringYesWhen the second recovery email was sent (ISO 8601). Null when it was not sent.
customerobjectYesLinked customer. Null unless customer is included. Also null when no linked customer exists for this store.
productobjectYesProduct. Null unless product is included, and null when the product no longer exists.
orderobjectYesOrder created from this session. Null unless order is included, and null when the session has no order.

Customer Object​

See Customer object.

FieldTypeNullableDescription
idstringNoCustomer UUID.
emailstringYesCustomer email.
namestringYesCustomer name.

Product Object​

See Product object. id is the product UUID.

FieldTypeNullableDescription
idstringNoProduct UUID.
namestringNoProduct name.

Order Object​

See Order object. status uses the same slugs as Get Orders. amount is an integer in minor units (e.g. cents).

FieldTypeNullableDescription
idstringNoOrder UUID. Pass it to Get Order.
statusstringNoOrder status: created, awaiting_payment, processing, completed, canceled, or refunded.
amountintegerNoOrder total in minor units (e.g. cents).
currencystringNoLowercase ISO-4217 code (e.g. usd).
created_atstringNoWhen the order was created (ISO 8601).

Error Responses​

Bad Request (400)​

Returned when id is not a UUID.

{
"message": "Invalid checkout session ID"
}

Not Found Error (404)​

Returned when the session does not exist in this store.

{
"message": "Checkout session with ID 7c4b1f8a-3e65-4d2e-8a3e-5b8f44a39d2e not found"
}

Unauthorized Error (401)​

{
"message": "Unauthenticated."
}

Forbidden Error (403)​

Returned when your API key has not been granted access to the requested store.

{
"message": "You do not have API access to the requested store."
}

Rate Limit Error (429 Too Many Requests)​

Returned when you exceed the rate limit. The Retry-After response header gives the number of seconds to wait.

{
"message": "Too many requests. Please retry after 60 seconds."
}