Track order status

After a user makes a purchase, your application can perform the following actions:

  • show the order status in the application UI
  • credit a user’s balance after a successful payment
  • grant the purchased items after a successful payment

To implement the logic of these actions, track the order status using the CheckPendingOrder SDK method. Pass the following parameters to the method:
SDK reference documentation
Learn more about SDK methods and its parameters.

This method encapsulates several methods for tracking the order status. Tracking is performed according to the following algorithm:

  1. A web socket connection is established.
  2. If the order status hasn’t changed to done or cancel within 5 minutes, the web socket connection is re-established. If the order status is changed to done or cancel, tracking stops.

If a web socket connection fails, the order status is tracked using short-polling. Once every 3 seconds, a simple HTTP order status request is sent. Tracking stops if:
  • order status changed to done or cancel
  • the order status does not change to done or cancel within 10 minutes

You can also implement:

  • requesting the order status and order contents using the CheckOrder SDK method
  • webhook handling on the server side of your application for Xsolla transaction events

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Rate this page
Rate this page
Is there anything we can improve?

Don’t want to answer

Thank you for your feedback!

Useful links

Last updated: June 30, 2023

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!