SDKs for Android / Track order status
  Back to Docs

SDKs for Android

Track order status

Notice
The SDK allows you to track the order status on the client side of your application. However, we recommend setting up a Payment webhook handler to receive order information in the back end of your application. This allows you to implement additional validation of completed purchases.

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 by a timer or when certain events occur (e.g., when redirecting the user to the application from the payment UI).

The XPayments class can return the following statuses:

  • XPayments.Status.COMPLETED — the user completed the payment and returned to the application.
  • XPayments.Status.CANCELLED — the user closed the payment UI without completing the payment.
  • XPayments.Status.UNKNOWN — аn error occurred during payment, for example, when the bank rejected the transaction.

The statuses returned by the XPayments class indicate whether the user has completed a purchase flow in the payment UI and are not the same as payment transaction statuses.

To get the current status of a payment transaction, use the getOrder method of the Store library. Pass the order ID received from the purchase via the shopping cart, one-click purchase, or purchase for virtual currency as the parameter.

SDK reference documentation
Learn more about SDK methods and its parameters.
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: October 24, 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!