POST /checkout/cash
/api/store/[slug]/checkout/cashCreates a cash (pay-in-person) order directly in the database, bypassing Stripe - records order items, decrements inventory, notifies the business, and emails the customer a confirmation.
Path parameters
slugstringrequiredBusiness (store) slug; the business must have cash_orders_enabled or the request is rejected with 403
Body parameters
itemsarrayrequiredCart lines; array of objects { variant_id: UUID string, quantity: positive integer }. At least 1 item required.
shipping_optionenumoptionalShipping choice; flat_rate adds the business's flat shipping fee to the total when the cart has physical products.
One of pickup, flat_rate
customer_namestringrequiredCustomer's name (trimmed, min 1 char).
customer_emailstringrequiredCustomer's email address (must be a valid email).
customer_phonestringoptionalOptional customer phone number (trimmed string).
pickup_datestringoptionalPickup date in YYYY-MM-DD format. Only valid when shipping_option is 'pickup' (schema refine rejects otherwise).
service_chargesarrayoptionalOptional add-on charges; array of objects { service_charge_id: UUID, variant_id: UUID, quantity: positive integer }. Each charge must belong to the business and be associated with the variant's product. Service charge prices are stored in cents and converted to dollars.
Responses
The resource was created.
A field failed validation. The response names the fields that failed, not just the first.
The credential is valid but is not allowed to do this.
No such store, or no such record inside it.
Too many requests. Back off and retry after the window in the response.
Something failed on our side. The response carries no detail; retry is safe on a GET.
What comes back
201 with { order_id, status: 'confirmed' }. Errors: 403 when cash orders disabled, 400/404/429/500 as { error, details? }. CORS-enabled; OPTIONS preflight supported.