Create a checkout session
Creates a hosted checkout session. Call this from your server with a secret key. The network (mainnet or testnet) is determined by the key: sk_live_ keys create mainnet sessions, sk_test_ keys create testnet sessions. Sessions expire 30 minutes after creation.
Authorizations
Your project secret key: sk_test_... (testnet) or sk_live_... (mainnet). Use it only on your server.
Body
Amount to charge in USD. Greater than 0, at most 2 decimal places.
x >= 0.01Must be a multiple of 0.0149.99
Shown to the customer on the checkout page.
Your own key-value data, returned on the session and in webhooks. Keys starting with _warp_ are reserved and rejected.
Where the "Back to merchant" button on the payment success page sends the customer.
Where the "Cancel and return" link on the checkout page sends the customer.
Response
Session created
"ps_8f14e45fceea167a5a36dedd4bea2543"
checkout.session Amount in USD as a decimal string.
"49.99"
USD pending: waiting for payment. processing: a transaction was submitted and is being verified. completed: payment verified. failed: verification failed. expired: no payment within 30 minutes.
pending, processing, completed, failed, expired Determined by the secret key used to create the session.
mainnet, testnet 30 minutes after creation.
Hosted checkout page to redirect the customer to.
"https://checkout.usewarp.net/session/ps_8f14e45fceea167a5a36dedd4bea2543"
Present on retrieve once a payment has been detected.