Promo Codes

How It Works

Promo codes are a marketing tool for getting new clients and increasing sales. A player who uses a promo code for the items in a cart gets a discount tied to the applied promo code. Also, you can link a bonus item to the promo code (a virtual currency package, game key, or virtual items including bundles or non-renewing subscription).

Main features:

  • Activate promo codes in the cart UI.
  • Decide the number of times the promo code can be used in a campaign.
  • Determine the number of times one player can use the same promo code.
  • Select the number of promo codes one player can use in a campaign.
  • Set up regional restrictions on demand.


  • You can generate promo codes only when you create a campaign.
  • You can’t change the set of items in the cart if the promo code is applied.

User flow:

  • The user enters a promo code in the corresponding field in the cart UI.
  • The cart’s total amount changes according to the applied discount.
  • The user makes a purchase and at the same time redeems a promo code.
  • The item that can be linked to a promo code is granted to the player in one of the following ways: directly to the inventory (a virtual item or virtual currency package), by email, or by game entitlement system (a game key).

Note: Partners can receive a promo code redemption data in a webhook. When they get it, they can grant a bonus item to the user on their own.

Who Can Use It

  • Partners who have already integrated the In-Game Store solution and want to use promo codes.
  • Partners who want to increase sales with the help of promo codes.

How to Get It


  1. Connect the In-Game Store solution to your project.
  2. Set up the Promotions module.

Integration Flow

  1. Create a promotion.
  2. Specify the required parameters:
    • Enter a promotion name.
    • Choose the type: Promo codes.
  3. Configure promo codes.
  4. Implement the method for getting a discount for a promo code.

Promo Code Configuration

Info: The functionality described in this paragraph isn’t fully implemented yet. Fill in a feedback form to integrate a service.

To configure promo codes, choose:

  1. Promo code discount amount.
  2. A reward type the player gets after using a promo code from these available options:
  3. Number of available promo codes and how many times they can be redeemed.
  4. Promo codes generation method.
  5. Regional sale restrictions.

Promo Code with a Virtual Currency Package

You should specify currency packages for a virtual currency package promo code. To create a virtual currency package:

  1. Go to the Virtual currency module settings and specify the following parameters:
    • Image
    • SKU
    • Currency name
    • Price of one unit of virtual currency
    • Default currency
  2. Create a required number of currency packages and specify the following parameters for every one of them:
    • Image
    • SKU
    • Name
    • Description
    • Used currency
    • Amount of currency in a package
    • Price
    • Default currency
  3. Enable the currency packages display in Store.

Promo Code with a Game Key

You should specify a game key SKU and DRM info for a game key promo code. There are 2 options:

  1. Promo codes are generated for the already set DRM. The parameter is set when generating coupons.
  2. The player has the ability to choose a DRM when using a coupon.
You can link several game keys with different SKUs to a single promo code.

Promo Code with Virtual Items

You should specify the virtual item SKU and its quantity for a virtual items promo code. You can choose one or several items with different SKUs for one promo code including bundles and non-renewing subscriptions.

Generating Promo Codes

A campaign may include one or several promo codes. The promo code format has 2 options:

  1. Manually entered line — suitable for a campaign with only one promo code that can be used many times (maximum is 128 characters).
  2. Generated line — line of numerals and Latin symbols (10 characters).
You can generate promo codes when creating this type of promotion. Additional promo code generation or uploading your codes are made on demand.

Note: The promo code depends on the letter case. For example, winter2021 and WINTER2021 — are 2 different promo codes.

Regional Sale Restrictions

Regional sale restrictions are applied to the whole promo codes campaign. We will set up regional sale restrictions on demand.

Getting a Discount on Cart’s Total for a Promo Code

To apply a discount on your cart’s total, implement the callback of the method that allows to get a discount in exchange for a promo code.


    "code": "WINTER2021",
    "cart_id": "current"


  "cart_id": "current",
  "is_free": false,
  "items": [
      "attributes": [],
      "description": "Take it, take it all! All of Xsolla's riches in one Mega Booster.",
      "groups": [
          "external_id": "powerups",
          "name": "Power Ups"
      "image_url": "",
      "inventory_options": {
        "consumable": {
          "usages_count": 1
        "expiration_period": null
      "is_free": false,
      "name": "Xsolla Booster Mega",
      "price": {
        "amount": "50.0000000000000000",
        "amount_without_discount": "100.0000000000000000",
        "currency": "USD"
      "quantity": 123,
      "sku": "booster_mega_1",
      "type": "virtual_good",
      "virtual_item_type": "consumable",
      "virtual_prices": []
    "price": {
      "amount": "6150.0000000000000000",
      "amount_without_discount": "6150.0000000000000000",
      "currency": "USD"