Purchase for virtual currency
This method is suitable for selling one item SKU without choosing the quantity or adding it to the cart.
To implement the logic of using virtual currency to purchase items:
- Call the
PurchaseForVirtualCurrency
SDK method. When calling it, pass a function that is called when the order transitions to thedone
status in theonSuccess
parameter.
- Update the inventory on the client side of the application using one of the following options:
- using SDK methods for displaying user inventory
- using the order content data that is passed to the
onSuccess
callback function of the purchase methods
- Update the user's virtual currency balance using the
GetVirtualCurrencyBalance
SDK method.
SDK reference documentation
Learn more about SDK methods and its parameters.
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Useful links
Last updated: January 22, 2024Found a typo or other text error? Select the text and press Ctrl+Enter.