Coupons
How it works
Coupon campaigns are a marketing tool designed to attract potential users to your product and drive sales. When a user redeems a coupon, they receive one or more bonus items. The following items can be used as rewards:
- virtual currency packages
- game keys
- virtual items
- bundles
A coupon contains a unique code. To redeem a coupon, the user should enter the code within the game client or a game’s store, including the Web Shop.
Key features:
- Setting the total number of redemptions within a campaign.
- Setting the number of redemptions per user within a campaign.
- Multiple generation of codes for coupons.
- Applying regional restrictions for campaigns and items linked to a coupon.
Limitations:
- If game keys are used as a bonus item, the key will be sent to the user via email or to the entitlement system after redemption. If the campaign runs out of keys, the user will not be able to redeem the coupon.
- If regional restrictions are applied to a coupon campaign, users from those regions won’t be able to redeem the coupon.
- If a coupon includes at least one bonus item with a regional restriction, a user from that region won’t be able to receive the item using this coupon.
- Example: A shield and sword are offered as a bonus with the coupon. The shield has a regional restriction and is available for purchase only in the US. If a user outside the US enters the coupon code, an error will be returned in the response to the Verify promotion code or Redeem coupon code calls. The user will not be able to obtain any of the items from the coupon.
You can also set up promo codes promotions for your store.
Key differences:
A coupon allows a user to receive only bonus items. A promo code can provide bonus items, a discount on a specific item, or a discount on the entire cart.
Promo codes are redeemed during a purchase (at checkout), whereas coupons are redeemed after the user enters and applies the code.
User flow:
- An authorized user goes to the store.
- The user enters the coupon code.
- Xsolla returns a list of available bonus items for the coupon (optional).
- The user selects bonuses (optional).
- The user redeems the coupon.
- The items linked to the coupon are credited to the user in the same way as a regular purchase.
Set up coupon campaign
Prerequisites
Before setting up a coupon campaign, you must configure the items that will be issued as bonuses.
To create items manually in your project in Publisher Account, go to the Items catalog > All items section. Detailed information about this and other methods for creating items is available in the Items catalog section of documentation.
Set up in Publisher Account
To create a new coupon campaign:
- In your project in Publisher Account, go to the LiveOps > Promotions section.
- On the Promotions tab, click Create promotion.
- Specify main promotion parameters:
- Specify Promotion name.
- In the Promotion type drop-down list, select Coupon.
- In the External ID field, specify a promotion ID used for managing promotions via API calls.
- In the Select bonus items drop-down list, select the type of an item to be granted to a user upon coupon redemption.
- Select the items to be granted to a user upon coupon redemption.
- For virtual items, specify the quantity for each item.
- For game keys, specify when the platform will be determined:
- To pre-assign a specific platform (e.g., Steam), select Select DRM during code generation from the Type of DRM selection drop-down list. Then, select the platform from the DRM drop-down list.
- To let the user choose, select Player selects DRM at redemption from the Type of DRM selection drop-down list.
- For game keys, specify when the platform will be determined:
You can select different types of items as bonuses. To switch between different item types, use the Select bonus items field. Information about all selected items is displayed in the List of bonus items area.
- Click Next.
- Configure coupon redemption limits:
- To limit the total number of coupon redemptions across all users within a campaign, set the Limit total number of coupon redemptions toggle to On and specify the maximum number of redemptions.
- To limit the number of coupons a single user can redeem within a campaign, set the Limit total number of redemptions per user toggle to On and specify the maximum number of redemptions per user.
- To limit the number of times any unique coupon code can be redeemed across all users, set the Limit number of unique coupon code redemptions toggle to On and specify the maximum number of redemptions for the coupon.
- Click Next.
- Specify the campaign’s validity period: a time zone, start date, and end date. To create a campaign without an end date, check the No end date box.
- Click Next.
- Review the campaign settings.
- Click Save and exit.
To add coupon codes to a campaign:
- In your project in Publisher Account, go to the LiveOps > Promotions section.
- In the row with coupon promotion, click ••• and choose Edit promotion in the drop-down list.
- Go to the Codes tab.
- To generate codes automatically:
- In the Code string format drop-down list, select Auto-generated.
- Specify the number of codes to generate and click Generate.
- To add codes manually:
- In the Code string format drop-down list, select Manually entered.
- Enter the coupon code and click Create.
- Repeat the previous step to add the required number of codes.
- Download a CSV file with the codes (optional).
Coupon codes are case-sensitive. For example, winter123 and WINTER123 are treated as different coupons.
You can add new codes to a campaign an unlimited number of times. However, the total number of added codes must not exceed 50,000.
If you need to upload a large number of self-generated codes, contact us at igs@xsolla.com.
To make the campaign available to users, you must activate it. To do this:
- In your project in Publisher Account, go to the LiveOps > Promotions section.
- In the row with coupon promotion, click ••• and choose Edit promotion in the drop-down list.
- In the drop-down list in the upper-right corner, select Activate promotion.
Set up via API
- the required parameters
- the parameters you want to change
- all other parameters returned by the promotion retrieval call
To set up and manage coupon campaigns via API, use the following calls:
| Task | API call |
|---|---|
| Create a promotion with a coupon. | Create coupon promotion. |
| Activate a promotion with a coupon. | Activate coupon promotion. |
| Edit a promotion. | Update coupon promotion with new promotion options. Promotions editing is also available for promotions with the Active status. |
| Deactivate a promotion with a coupon. | Deactivate coupon promotion. |
| Set up an indefinite promotion. | Create coupon promotion or Update coupon promotion. Pass the “date_end”: null parameter to the listed calls. |
| Delete a promotion. | Delete coupon promotion. |
Set up coupon redemption in your application or website
Coupon redemption in your own UI
To allow users to redeem coupons in your application or website:
Implement the following elements in your UI:
- A field to enter the coupon code.
- A form to display coupon rewards.
- A button to redeem the coupon code.
Implement coupon logic using the following client-side API calls:
| Task | API call |
|---|---|
| Check if the coupon is correct. | Verify promotion code. |
| Redeem coupon. | Redeem coupon code. |
| Get a list of game distribution platforms to display to the user if a game key is provided as a coupon bonus. | If the response returns The |
- Ensure that items are correctly granted to the user upon coupon redemption.
- If you have already implemented an in-game store in your application or on your website, no additional setup is required. Items linked to a coupon are granted to the user in the same way as a standard purchase.
Coupon redemption on website created with Xsolla
To display the code entry field on your website:
- Open your project in Publisher Account and go to the Storefronts > Websites section.
- In the Sites section, select your site and click Open Site Builder.
- In the main area of the builder, choose a place where you want to add a new block and click Add block.
- Select the Promo codes block.
- Customize the block appearance (optional):
- Edit the block’s header and description text.
- Set a custom background for the block.
- Change the button style.
- Edit the text for the coupon redemption button.
- To apply changes, publish the website:
- In the upper-right corner of the site builder, click Publish.
- Check the boxes next to the pages you want to publish.
- Click Publish.
If site publication is not available, make sure all the conditions are met:
- There are no empty sections in builder (marked with a red indicator).
- The licensing agreement with Xsolla has been signed.
- The main page is published or selected for publication. You cannot publish child pages before the main page.
Found a typo or other text error? Select the text and press Ctrl+Enter.