Use your secret API key as the username with an empty password.
Unique key to ensure idempotent requests.
255Override the API version for this request.
The mode of the Checkout Session. Currently only 'payment' is supported.
payment Line items the customer is purchasing. Each must have either price or price_data.
1The URL to redirect to after a successful payment. Required for hosted mode.
The URL to redirect to when the customer cancels.
ID of an existing customer.
^cus_Pre-fill the customer's email on the checkout page.
Whether to always create a customer, or only if required.
always, if_required The UI mode of the session.
hosted, embedded, custom Whether to collect billing address.
auto, required A unique string to reference the session in your system.
200Data to pass to the underlying PaymentIntent.
Override the currency. Defaults to the currency of the line items.
3Unix timestamp for when the session expires. Must be between 30 minutes and 24 hours from now.
Set of key-value pairs for storing additional information.
The created Checkout Session.
"cs_xxx"
checkout.session The mode of the Checkout Session.
payment, setup, subscription The status of the Checkout Session.
open, complete, expired The payment status of the Checkout Session.
unpaid, paid, no_payment_required The UI mode of the session.
hosted, embedded, custom Whether a customer was always created or only if required.
always, if_required Whether billing address was collected.
auto, required Unix timestamp for when the session expires.
Set of key-value pairs for storing additional information.
false
Unix timestamp.
1234567890
The URL to the hosted checkout page. Only set for hosted mode.
The client secret for embedded/custom mode.
The URL to redirect to after successful payment.
The URL to redirect to when the customer cancels.
The ID of the customer.
"cus_xxx"
The customer's email address.
Customer details collected during checkout.
The ID of the PaymentIntent for this session.
"pi_xxx"
Three-letter ISO currency code.
"usd"
Total before discounts and taxes, in smallest currency unit.
Total after discounts and taxes, in smallest currency unit.
Breakdown of the total amount.
A unique string to reference the session.