Skip to main content
1

Create a session

POST /v1/checkout/sessions with your public or secret key.
2

Redirect the buyer to the session url

3

The buyer comes back

Paid: https://yoursite.com/thanks?session_id=cs_…Left without paying: your cancelUrl.
4

Confirm the payment on your server

GET /v1/checkout/sessions/{id} with your secret key. Paid when status is complete.
Landing on successUrl doesn’t prove payment. Always check status from your server.

Status

Waiting for the buyer to pay.
The buyer paid. order holds the order number, what they paid (delivery included) and how they’ll get it.
Not paid within 30 minutes. Create a new session if the buyer wants to try again.
Rules
  • One product per session. quantity 1–100.
  • Send size and color exactly as Get product returns them. Leave them out if the product has none.
  • Stock is checked when you create the session.
  • customer pre-fills the checkout form. metadata comes back untouched.