Did you find this helpful?

Coupons & Promotions

Coupons are string tokens you generate, and your customers use to redeem inventory items in their game. Combined with bundles or cloud script, these coupons could be used to trigger almost any functionality in your game.


Generate and Redeem Coupon Instructions

All of the examples below share the first basic step of generating a coupon. This is done in Game Manager.

Game Manager: Navigate to your title -> Economy -> {your primary catalog}

For any of the three tab-sections: Items, Bundles, and Containers, you will find a "Coupons" button.

This pops up a window which lets you generate coupons for any of the items in the section. If you wish to create coupons for a specific item, click "Coupons" in the Items tab, Bundle Coupons under Bundles, and Container Coupons under Containers.

The popup window looks like the following image (your list of items will match your title, the displayed items are described in our Drop Tables Guide):

To complete the coupon generation, select a quantity of coupons to generate, and click the item the coupons should generate.  This will download a CSV text file with a list of coupons.

Clicking one of the links in the example generates the following ten comma-separated coupons:


Finally, the customer can redeem a coupon if you provide GUI which lets them input the code, which then calls RedeemCoupon.

// Unity/C#
void UseCoupon(string couponCode)
    var primaryCatalogName = "TestCatalog-001"; // In your game, this should just be a constant matching your primary catalog
    var request = new RedeemCouponRequest
        CatalogVersion = primaryCatalogName,
        CouponCode = couponCode // This comes from player input, in this case, one of the coupon codes generated above
    PlayFabClientAPI.RedeemCoupon(request, LogSuccess, LogFailure);

Example Case: Inventory Item Coupon

The most straightforward way to use coupons is gifting an inventory item. Once you have created your catalog, you can generate coupons for regular items by following the instructions above. There are no other special steps for this case.

Example Case: Virtual Currency Coupon -OR- Multiple-item Coupon

Coupons cannot grant Virtual Currency directly, and they can only grant a single item. However, bundles can be used to convert inventory items seamlessly into groups of items or Virtual Currency. In the VC example, you should create a new bundle item, with VC contents.  Set the bundle to expire in 15 seconds.  This way, the player will immediately see the VC as soon as they open the bundle, and they won't see the intermediate item:

Multiple items work the same way. Create a bundle, with multiple items, or even Drop Tables, and set it to expire in 15 seconds. The coupon can generate the bundle, the bundle is converted to multiple items, and the intermediate bundle item disappears.

Usage Scenarios

  • Physical rewards at conventions
    • Print out your list of coupon codes, and hand them out as swag at conventions
  • Out-of-Game communication such as Forums, Push Notifications & Email
    • Send your players coupon codes directly as part of re-acquisition campaigns or other community outreach
  • Tournaments
    • Send coupons to the top ranked players when using Resettable Leaderboards. (Note: You can also give out inventory items directly in this case, so pick whichever is more relevant to your game)

Best Practices

Using the PlayFab inventory, you should keep inventory sizes relatively small, less than 100 items total per player. A bundle which grants too many items may be throttled or rate-limited.

Did you find this helpful?