Skip to content

Start checkout

POST/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_idstringrequired

    The cart's ID, like cart_01k8qs5s….

Headers

  • X-Cart-Tokenstringrequired

    The cart's token

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • payment_account_idstringrequired

    From GET /carts/{cart_id}/payment-methods.

  • methodenumrequired

    How 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_totalobjectrequired

    The 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 null

    Where the customer comes back after a redirect (3-D Secure, hosted pages). Call POST /carts/{cart_id}/checkout/confirm from there.

Returns

200 Where checkout stands.

Errors

  • 404not_foundNo such cart.
  • 409A payment is already in progress, or the cart changed.
  • 422validation_failedSomething is missing (email, address, delivery), an item is unavailable or out of stock, or the payment method isn't offered.