When redeeming a promo code, the user may receive one or more of the following rewards:
- discount that applies to the user’s cart
- bonus item:
- virtual currency package
- game key
- virtual item including a bundle or time-limited item
For details on the features and limitations of campaigns with promo codes, see the In-Game Store guide.
To implement a promo code campaign:
- Set up a campaign with promo codes.
- Implement a shopping cart UI and logic of purchasing via the shopping cart in your application.
- In the shopping cart UI, add the following elements:
- field for entering a promotional code
- the form of displaying the reward for the promotional code
- button to activate the promo code
- Implement in-game logic using the following SDK methods:
getPromocodeReward— returns a list of items that can be credited to the user when the promo code is activated. Allows users to choose from several available items.
redeemPromocode— activates a promotional code. After activating the promotional code, the user gets free items and/or the price of the cart is reduced.
removePromocode— removes a promo code from a cart. After the promo code is removed, the total price of all items in the cart will be recalculated without bonuses and discounts provided by a promo code.
Was this article helpful?
Rate this page
Don’t want to answer
Thank you for your feedback!
Found a typo or other text error? Select the text and press Ctrl+Enter.