Checkout

Get checkout session

Changed on
get/checkout/sessions/{id}

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/checkout/sessions/{id}
  • Auth
    API key in header x-api-key

Path parameters

idstring required

Checkout session ID

Response

OK

action'create_subscription' | 'modify_subscription' | 'wallet_topup' | 'add_addon' | 'pay_invoice'
cancel_urlstring
cancelled_atstring date-time
checkout_invoice_idstring
checkout_payment_idstring
checkout_status'initiated' | 'pending' | 'completed' | 'failed' | 'expired'
completed_atstring date-time
created_atstring date-time
customer_idstring
expires_atstring date-time
failure_reasonstring
failure_urlstring
idstring
idempotency_keystring
metadataTypesMetadata
next_poll_after_msinteger

NextPollAfterMs is how long a client should wait before reading again. Zero means stop — either the session is terminal, or this response did not come from a polling read.

payment_provider'razorpay' | 'chargebee' | 'stripe'
staleboolean

Stale reports that this response is stored state that was not checked against the payment provider on this request — the read was debounced, or the gateway did not answer. A UI should say "still checking" rather than presenting a stale answer as fact.

success_urlstring
terminalboolean

Terminal reports whether the session has finished. Clients poll until this is true rather than hardcoding the status set, which would go stale if a status is ever added.

updated_atstring date-time

Changes

    • warning

      added the new stripe enum value to the response property for the response status

    • info

      removed the stripe enum value from the response property for the response status