Skip to main content
Crave selects the restaurant’s connected payment provider server-side. Square is selected whenever it is connected; Stripe is used only where Square is disconnected.

Create a payment session

The SDK sends the cart capability, current revision, and idempotency key. A raw REST request must send the same headers:
If payment.provider is SQUARE, tokenize with Square Web Payments and send the token to checkout.confirmPayment. If it is STRIPE, confirm its client secret with Stripe Elements.

Confirm a Stripe session with Stripe Elements

Use Stripe publishable configuration in the client. Stripe secret keys remain on Crave-managed services. Never collect or log raw card numbers. After Stripe returns, poll storefront.checkout.getOrderResult(locationId, cartId). Treat only completed as success; payment_pending and order_pending are retryable states, while failed is terminal.

Checkout Flow

See the complete checkout state machine.

Order Tracking

Poll the order result and load protected receipts.