The checkout session object
A checkout session ties one or more products to a customer, provided at creation or collected on the hosted page, and produces a hosted checkout URL. It tracks the customer through payment and, once paid, links to the payment it created.
customer vs customer_details
Two fields carry the buyer, and they answer different questions.
customeris the customer record behind this checkout:{ id, email, name }. It is non-null exactly when a record exists.customer_detailsis what the buyer supplied:{ email, name }. It is present whenever an identity was collected, record or no record.
checkout.completed webhook.
| State | customer | customer_details |
|---|---|---|
| No identity collected yet | null | null |
| Customer passed at creation | cust_ record | {email, name} |
Guest identified on the hosted page, customer_creation: if_required (default) | null | {email, name} |
Guest identified on the hosted page, customer_creation: always | cust_ record | {email, name} |
| Payment link with a fixed price | null | {email, name} |
customer_details when you want the buyer’s email and name and do not care whether a record backs them. Read customer when you need an id you can pass back to the customers API.
See Whether a guest becomes a customer for how customer_creation decides which row you land on.
customer_details is additive. customer behaves exactly as it always did, so anything that reads customer keeps working. What is new is that a checkout with no customer record behind it used to send no identity at all on completion, and now carries one.Checkout session details returned by GET /v1/checkout-sessions/{checkout_id}.
Current lifecycle status of the checkout session. open: awaiting customer payment, where every new session starts. completed: payment succeeded, a terminal state. expired: the session window elapsed before payment, a terminal state. cancelled: cancelled before completion, a terminal state.
open, completed, expired, cancelled "completed"
Payment lifecycle for the checkout. requires_payment_method, requires_confirmation, requires_action, processing, succeeded, failed, or canceled.
requires_payment_method, requires_confirmation, requires_action, processing, succeeded, failed, canceled "requires_payment_method"
The payment method selected for the checkout, if any. For every method except card, this is the exact corridor collected, such as NGN_BANK_TRANSFER, MOMO_GHS, or CRYPTO. Card charges report CARD rather than USD_CARD or NGN_CARD; read the currency to tell which card corridor collected it.
"NGN_BANK_TRANSFER"
The platform's cut of this sale, in the base currency of the sale. The key is always present; it reads null, not "0.00", on a checkout that carries no fee, and on a checkout that split the sale with transfer_data.amount instead. See Platform fees.
"20000.00"

