Docs

Checkout API

Create and manage checkout sessions.

Checkout routes are served by apps/api under the Checkout tag. These flows touch payments, discounts, shipping, and order state, so changes require extra review.

Create checkout session

POST /api/checkout/create

Creates a checkout session using the request body accepted by the checkout creation schema.

Retrieve checkout session

GET /api/checkout/get/{id}

Retrieves a checkout session by ID.

Update checkout session

POST /api/checkout/update/{id}

Updates the checkout session identified by id.

Payment secret

POST /api/checkout/payment-secret/{id}

Generates a payment secret for the checkout session.

Discounts

GET /api/checkout/{id}/discounts/revalidate
POST /api/checkout/{id}/discounts/apply
DELETE /api/checkout/{id}/discounts/remove/{discountId}

Use these endpoints to revalidate, apply, or remove checkout discounts.

Shipping rates

GET /api/checkout/{id}/get-shipping-rates

Returns shipping rates available to the checkout session.

Safety notes

  • Do not change checkout response shapes without coordinating API consumers.
  • Keep Stripe/testmode semantics unchanged.
  • Validate discount combinations, shipping rates, inventory reservations, and payment-secret generation before shipping checkout changes.
  • Disable or block checkout creation only with explicit product approval, because it changes customer-facing purchase behavior.

On this page