Start checkout
/ store/ v1/ carts/ {cart_id}/ checkout- Idempotency-Key supported
Pay: holds the stock, freezes the prices and starts the payment. Offline methods and instant approvals return completed with the order; otherwise follow payment.next_action, then call POST /carts/{cart_id}/checkout/confirm.
Path parameters
cart_idstringrequiredThe cart's ID, like
cart_01k8qs5s….
Headers
X-Cart-TokenstringrequiredThe cart's token
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
payment_account_idstringrequiredFrom
GET /carts/{cart_id}/payment-methods.methodenumrequiredHow the customer pays.
- card
- mada
- apple_pay
- google_pay
- stc_pay
- cash_on_delivery
- bank_transfer
- gift_card
- cash
- card_present
- on_account
- mobile_wallet
- fawry
- valu
- sympl
- souhoola
- instapay
- tabby
- tamara
expected_totalobjectrequiredThe total the shopper saw and agreed to, required. When the cart now totals something else (a price changed, a code ran out), nothing is charged: 409
total_changed; reload the cart and show the new total.return_urlstring · or nullWhere the customer comes back after a redirect (3-D Secure, hosted pages). Call
POST /carts/{cart_id}/checkout/confirmfrom there.
Returns
200 Where checkout stands.
Errors
- 404
not_foundNo such cart. - 409A payment is already in progress, or the cart changed.
- 422
validation_failedSomething is missing (email, address, delivery), an item is unavailable or out of stock, or the payment method isn't offered.