Adds the virtual goods associated with the coupon to the user's inventory. Coupons can be generated via the Economy->Catalogs tab in the PlayFab Game Manager.

Request Details

Coupon codes can be created for any item, or set of items, in the catalog for the title. This operation causes the coupon to be consumed, and the specific items to be awarded to the user. Attempting to re-use an already consumed code, or a code which has not yet been created in the service, will result in an error.

Request Properties
CatalogVersion String

Catalog version of the coupon.

CharacterId String

Optional identifier for the Character that should receive the item. If null, item is added to the player

CouponCode (required) String

Generated coupon code to redeem.

PlayFabId (required) String

Unique PlayFab assigned ID of the user on whom the operation will be performed.

POST https://{{TitleID}}
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
  "CouponCode": "123-1234-123",
  "CatalogVersion": "5"

Response Details

Result Properties
GrantedItems List<ItemInstance>

Items granted to the player as a result of redeeming the coupon.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
  "code": 200,
  "status": "OK",
  "data": {
    "GrantedItems": [
        "ItemId": "shield_level_5",
        "ItemInstanceId": "Unique Item ID",
        "ItemClass": "shields",
        "PurchaseDate": "2014-03-07T00:00:00Z",
        "Expiration": "2015-10-01T00:00:00Z",
        "RemainingUses": 10,
        "Annotation": "No Annotation",
        "CatalogVersion": "5",
        "BundleParent": "crate block 1",
        "UnitPrice": 0



Possible Error Codes

Name Code
CatalogNotConfigured 1218
CharacterNotFound 1135
CouponAlreadyRedeemed 1226
CouponCodeNotFound 1016