POST /v1/checkout/sessions
POST
/v1/checkout/sessionsAuthorization
x-api-keyAPI key · headerrequiredor
AuthorizationBearer token · headerrequiredQuery parameters
environmentstringAllowed:
sandboxproductionmerchantAccountIdstringmin length 1
Header parameters
Idempotency-KeystringRequired for production-safe retries on mutating routes. Reusing a key with a different request body returns 409.
min length 1
Request body
requiredapplication/jsonenvironmentstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullmerchantAccountIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullmodestring | nullShow propertiesHide properties
Any of:
string
stringnull
nullinvoiceNumbersstring[] | nullShow propertiesHide properties
Any of:
string[]
Array of
stringstringnull
nullinvoiceNumberstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullamountnumber | nullShow propertiesHide properties
Any of:
number
numbernull
nullamountCentsnumber | nullShow propertiesHide properties
Any of:
number
numbernull
nullcurrencystring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldescriptionstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcustomerIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullbillingAccountIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcustomerobject | nullShow propertiesHide properties
Any of:
object
customerIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullexternalCustomerRefstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullnamestring | nullShow propertiesHide properties
Any of:
string
stringnull
nullemailstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldefaultCurrencystring | nullShow propertiesHide properties
Any of:
string
stringnull
nullmetadataobject | nullShow propertiesHide properties
Any of:
object
objectnull
nullnull
nullbillingAccountobject | nullShow propertiesHide properties
Any of:
object
billingAccountIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullinvoiceDeliveryModestring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcollectionModestring | nullShow propertiesHide properties
Any of:
string
stringnull
nullautoCollectionEnabledboolean | nullShow propertiesHide properties
Any of:
boolean
booleannull
nullcustomerProfileIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldefaultPaymentMethodIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullrenewalTimingstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullnetTermsDaysnumber | nullShow propertiesHide properties
Any of:
number
numbernull
nulldunningCampaignIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullmetadataobject | nullShow propertiesHide properties
Any of:
object
objectnull
nullnull
nullitemsobject[] | nullShow propertiesHide properties
Any of:
object[]
Array of
objectpriceIdstringrequiredmin length 1
quantitynumber | nullShow propertiesHide properties
Any of:
number
numbernull
nullnull
nulltrialEndAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulltestClockIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcollectionModestring | nullShow propertiesHide properties
Any of:
string
stringnull
nullsuccessUrlstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcancelUrlstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullreturnUrlstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullpaymentMethodIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcustomerEmailstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullpayerEmailstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullbillingAddressCollectionstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldueAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldueDatestring | nullShow propertiesHide properties
Any of:
string
stringnull
nullexpiresAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullmetadataobject | nullShow propertiesHide properties
Any of:
object
objectnull
nullidempotencyKeystring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcreatedByRefstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullResponses
201
Success
dataobjectrequiredShow propertiesHide properties
checkoutSessionobjectrequiredShow propertiesHide properties
checkoutSessionIdstringrequiredmin length 1
paymentRequestIdstringrequiredmin length 1
checkoutUrlstring | nullrequiredShow propertiesHide properties
Any of:
string
stringnull
nulltokenstring | nullrequiredShow propertiesHide properties
Any of:
string
stringnull
nullmodestringrequiredAllowed:
paymentsubscriptionstatusstringrequiredAllowed:
openpaidcanceledexpiredcustomerIdstringrequiredmin length 1
customerExternalIdstringrequiredmin length 1
billingAccountIdstringrequiredmin length 1
currencystringrequiredmin length 1
amountTotalnumberrequiredamountRemainingnumberrequiredinvoiceNumbersstring[]requiredexpiresAtstring | nullrequiredShow propertiesHide properties
Any of:
string
stringnull
nullcreatedAtstringrequiredmin length 1
subscriptionIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullexternalCustomerRefstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullsuccessUrlstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcancelUrlstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullreturnUrlstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullpaymentMethodIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcustomerEmailstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullbillingAddressCollectionstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullpaymentRequestobjectrequiredShow propertiesHide properties
paymentRequestIdstringrequiredmin length 1
customerIdstringrequiredmin length 1
billingAccountIdstringrequiredmin length 1
statusstringrequiredAllowed:
openpaidcanceledexpiredcurrencystringrequiredmin length 1
amountRequestednumberrequiredamountPaidnumberrequiredamountRemainingnumberrequiredinvoiceCountnumberrequiredattemptCountnumberrequiredcreatedByTypestringrequiredAllowed:
systemoperatorcreatedByRefstringrequiredmin length 1
createdAtstringrequiredmin length 1
updatedAtstringrequiredmin length 1
metadataobjectrequiredlastAttemptStatusstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulllastAttemptErrorstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulllastPaymentIntentIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulllastPaymentIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldueAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullexpiresAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulllastAttemptedAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullpaidAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcanceledAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullinvoicesobject[]requiredShow propertiesHide properties
Array of
objectinvoiceIdstringrequiredmin length 1
customerIdstringrequiredmin length 1
billingAccountIdstringrequiredmin length 1
statusstringrequiredAllowed:
draftopenpaidpartially_paidpast_duevoiduncollectiblecurrencystringrequiredmin length 1
subtotalnumberrequireddiscountTotalnumberrequiredtaxTotalnumberrequiredtotalnumberrequiredamountPaidnumberrequiredamountRemainingnumberrequiredmetadataobjectrequiredsubscriptionIdstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcreditNoteTotalnumber | nullShow propertiesHide properties
Any of:
number
numbernull
nullcustomerBalanceAppliedTotalnumber | nullShow propertiesHide properties
Any of:
number
numbernull
nullperiodStartAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullperiodEndAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullissuedAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nulldueAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullfinalizedAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullvoidedAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullcreatedAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullupdatedAtstring | nullShow propertiesHide properties
Any of:
string
stringnull
nullreplayedbooleanrequiredrequestIdstringrequiredmin length 1