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
PurchaseForVirtualCurrencySDK method. When calling it, pass a function that is called when the order transitions to thedonestatus in theonSuccessparameter.
- 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
onSuccesscallback function of the purchase methods
- Update the user's virtual currency balance using the
GetVirtualCurrencyBalanceSDK method.
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.