Skip to main content
Managed Cloud projects use their included storefront and pinned runtime. The published SDK version and this platform source candidate do not establish compatibility with a Cloud installation. Verify the deployed API and caller pair using the Cloud release results.
Stripe is the only online payment processor. Square, Clover, and Toast receive fulfillment orders and provide certified in-person tender evidence; they never expose browser checkout.

Read the server-owned choices

Do not infer payment choices from a connected provider or a location setting. Load the current cart’s collection-options first:
The response is a read-only preflight. Submission rechecks the current quote, catalog, policy, customer eligibility, unpaid-order exposure, provider binding, and native-payment certification. If an option is unavailable, show its unavailableReasonCode; never override it in the browser.

Pay online with Stripe

The SDK sends the cart capability, current revision, and idempotency key. A raw REST request must send the same headers:
When the outcome is CUSTOMER_ACTION_REQUIRED, initialize Stripe.js with its connectedAccountId and confirm its clientSecret. The server captures and settles the already-persisted order. No provider-selected confirmation endpoint exists.

Confirm a Stripe session with Stripe Elements

Cache Stripe.js by the immutable connected-account id and rebuild Elements whenever the payment outcome changes. Stripe secret keys remain on Crave-managed services. Never collect or log raw card numbers. If Stripe redirects for authentication, the return page must recover the same cart session from tab-scoped storage and make the same idempotent server-capture request before showing success. After Stripe returns, poll storefront.checkout.getOrderSubmissionOutcome(locationId, cartId, attemptId). Treat only PAID as paid, keep PROCESSING retryable, and surface ACTION_REQUIRED without creating another order.

Pay at the store

Offer this choice only when the server returns an available PAY_AT_STORE option and identifies SQUARE, CLOVER, or TOAST as its settlement adapter. Submit the same order-first contract without a saved payment method:
An accepted pay-at-store order returns status: "ACCEPTED" and remains unpaid until the selected POS reports native tender evidence. Tell the customer that payment is due at the store and keep order state separate from payment state. Poll the same attemptId; never submit a replacement order and never render a POS card form, saved card, gift-card entry, or provider-hosted checkout. When counter-verification is unresolved, show Verifying payment — do not charge again. In outcome.verification.state, PENDING and WARNING continue reconciliation, while ACTION_REQUIRED needs staff review. Only the top-level PAID outcome proves collection. The POS provider owns the original in-person tender and its refund path. A provider order cancellation is not refund evidence.

Checkout Flow

See the complete checkout state machine.

Order Tracking

Poll the order result and load protected receipts.