Skip to main content

Checkout Sessions

The Checkout Sessions API lets you read checkout sessions from your store: carts a buyer started, including ones that never became an order.

Overview​

The Checkout Sessions API provides endpoints to:

Checkout creates and updates sessions. These endpoints only read them.

GET /statistics?type=checkout_sessions is a separate count. It does not return these session objects.

Endpoints​

MethodPathDescription
GET/checkout-sessionsPaginated list. See Get Checkout Sessions.
GET/checkout-sessions/{id}One session. See Get Checkout Session.

{id} is the session id (a UUID).

Status​

status is one of six slugs. Omitting the list filter returns every status.

StatusMeaning
openedThe buyer started checkout and has not finished.
erroredCheckout recorded an error.
finalizedThe buyer completed checkout.
recoveringThe buyer opened checkout through a recovery link. Sending a recovery email does not change the status on its own. The send times are the recovery_link_sent_at fields on the detail read.
recoveredThe session was completed after the buyer came back through a recovery link, or support marked it recovered. Support can mark a session recovered after it was already finalized. recovered_by says who is credited with the recovery.
help_requestedThe buyer asked for help.

opened and errored can still be recovered. finalized and recovered are complete.

Currency​

currency on the list is optional. Omit it to return sessions in every currency. Each item still includes its own amount and currency. Either can be null: amount when the cart has no price yet, currency on older sessions that stored none.

amount is an integer in minor units (e.g. cents). 4900 with currency usd is 49.00 USD.

To keep one currency, pass a lowercase ISO-4217 code, for example usd.

There is no default date window. Omit created_from and created_to to skip a date filter. See Get Checkout Sessions.

Checkout Session Object​

The list returns a subset of this object. Get Checkout Sessions documents that subset. Get Checkout Session returns the full object. customer, product, and order are always present on the detail read and are null until requested with include.

FieldTypeNullableDescription
idstringNoSession UUID.
statusstringNoOne of the status slugs.
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. Independent of the customer include.
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. Detail only.
terms_acceptedbooleanNoWhether the buyer accepted the terms. Detail only.
recovered_bystringYesWho is credited with recovering the session: email when the buyer came back through a recovery email link, support when support marked it recovered. Null when no recovery is credited. Recorded independently of status, so it can be set on a session that is not recovered and null on one that is. Detail only.
recovery_link_sent_atstringYesWhen the first recovery email was sent (ISO 8601). Null when none was sent. Detail only.
second_recovery_link_sent_atstringYesWhen the second recovery email was sent (ISO 8601). Null when it was not sent. Detail only.
customerobjectYesLinked customer. Null unless customer is included, when the session has no linked customer, or when that customer is not linked to this store. customer_email can still be set. Detail only.
productobjectYesProduct. Null unless product is included, and null when the product no longer exists. Detail only.
orderobjectYesOrder created from this session. Null unless order is included, and null when the session has no order. Detail only.

Customer Object​

Returned only when include contains customer and a customer linked to this store exists.

FieldTypeNullableDescription
idstringNoCustomer UUID.
emailstringYesCustomer email.
namestringYesCustomer name.

Product Object​

Returned only when include contains product and the product still exists. id is the product UUID.

FieldTypeNullableDescription
idstringNoProduct UUID.
namestringNoProduct name.

Order Object​

Returned only when include contains order and the session has an order. 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).