Checkout
Create checkout session
post/checkout/sessions
Request body
action'create_subscription' | 'modify_subscription' | 'wallet_topup' required
cancel_urlstring
customer_external_idstring required
failure_urlstring
idempotency_keystring
metadataobject
payment_provider'razorpay' required
success_urlstring
Response
Created
action'create_subscription' | 'modify_subscription' | 'wallet_topup'
cancel_urlstring
cancelled_atstring date-time
checkout_invoice_idstring
CheckoutInvoiceID and CheckoutPaymentID are set once the apply step creates the corresponding Flexprice entities (completed sessions only).
checkout_payment_idstring
checkout_status'initiated' | 'pending' | 'completed' | 'failed' | 'expired'
completed_atstring date-time
created_atstring date-time
created_bystring
customer_idstring
environment_idstring
expires_atstring date-time
ExpiresAt is required. A Temporal timer fires at this time for any session still in initiated|pending, marking it expired. The caller must create a new session after expiry (expire-and-restart model).
failure_reasonstring
FailureReason is a human-readable string set on failed sessions.
failure_urlstring
idstring
idempotency_keystring
IdempotencyKey is caller-supplied. It is unique only while the session is active (initiated|pending). The same key may be reused once the session reaches a terminal state (completed|failed|expired).
metadataTypesMetadata
payment_provider'razorpay'
status'published' | 'deleted' | 'archived'
success_urlstring
Redirect URLs sent to the payment provider. The provider redirects the user browser to the appropriate URL after the payment flow completes.
tenant_idstring
updated_atstring date-time
updated_bystring