Skip to main content

Overview

Checkout is the bridge between a cart (items + shipping) and payment. The Commerce checkout flow is intentionally stepwise so you can validate totals before creating an invoice.

Authentication

Requires a commerce-scoped API key: x-commerce-api-key: ck_....

Request

Endpoints:
  • POST /api/commerce/merchant/checkout/estimate
  • POST /api/commerce/merchant/checkout/address
  • POST /api/commerce/merchant/checkout/invoice

Playground (interactive reference)

Example (create invoice):

Response

Representative invoice creation response:
Notes:
  • Commerce invoices expire after ~30 minutes (expiresAt in the response).
  • Create a new invoice for every checkout attempt or retry; do not reuse expired or failed invoices.
  • Max commerce order value is $2500; requests above this return a checkout error.
  • Offers must be deliverable within 10 days to be eligible for checkout.

Errors

  • 400 invalid checkout payload
  • 401 missing/invalid commerce auth

Examples

Recommended flow:
  1. Estimate (/estimate) → 2) Address (/address) → 3) Invoice (/invoice)
Next: Orders