Skip to main content
After a customer completes checkout, keep them informed with order status updates. This guide covers how to poll for status changes and display progress in your storefront.

Order status flow

Orders progress through these statuses:
StatusMeaning
OPENCart is active — items can be added or modified
LOCKEDPayment is being processed — cart is frozen
COMPLETEDPayment 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 your return_url, extract the cart ID and show the order summary.

Track analytics

Fire an ORDER_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 useEffect cleanup
  • 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.