Skip to main content

Checkout in five calls

The server prices the cart; your site sends product_id and qty, nothing more. The buyer confirms their contact with a one-time code on every order.

CallDoesReturns
POST /shipping/ratesquotes for the cart and the destinationshipping_quote_id
POST /checkout/draftturns the cart into a priced draftdraft_id, total, otp_required
POST /checkout/otp/sendsends a code to the buyer's email or WhatsAppexpires_at
POST /checkout/otp/verifychecks the code and places the orderorder, payment, track_token
GET /orders/track/{token}status and payment instructionsorder.timeline, payment

The API reference has the fields of every call.

Rules the server enforces

  • You receive track_token once. Keep it.
  • Render order.timeline and order.status_label as given; the merchant or a gateway can move the status at any time.
  • Branch on payment.kind. The server decides which gateway fulfils a method, so payment.method can change under you.
  • Send a code when the buyer asks for one, and show a refused code as refused; the server does not say why.