Order status flow
Orders progress through these statuses:| Status | Meaning |
|---|---|
OPEN | Cart is active — items can be added or modified |
LOCKED | Payment is being processed — cart is frozen |
COMPLETED | Payment confirmed — order sent to the restaurant |
Poll for status updates
After the customer completes payment, poll the cart endpoint to check for status changes.Build a status component
Confirmation page
After Stripe redirects back to yourreturn_url, extract the cart ID and show the order summary.
Track analytics
Fire anORDER_PLACED analytics event for conversion tracking.
Submit a rating
After the order is complete, prompt the customer to rate their experience.Best practices
- Poll interval: 3 seconds is a good balance between responsiveness and API load
- Timeout: Stop polling after 2 minutes to prevent zombie intervals
- Error handling: Gracefully handle network errors during polling
- Cleanup: Always clear intervals in
useEffectcleanup - Caching: Store the final cart state locally to avoid unnecessary refetches on the confirmation page
Next steps
Error Codes
Handle API errors throughout the ordering flow.
SDK Reference
Full SDK documentation with all modules.