Redeems a code of promo code promotion. After redeeming a promo code, the user will get free items and/or the price of the cart and/or particular items will be decreased.
project_id required | integer Project ID. You can find this parameter in your Publisher Account next to the name of the project. Example: 44056 |
Promo code was successfully redeemed.
Authentication not passed or wrong.
Authorization header not sent.
Enter valid promo code.
Invalid request.
{- "coupon_code": "SUMMER2021",
- "cart": {
- "id": "current"
}, - "selected_unit_items": {
- "game_1": "game_1_steam",
- "game_2": "game_2_playstation"
}
}
{- "cart_id": "cart_id",
- "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"
}
], - "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": [ ],
- "promotions": [
- {
- "name": "Bonus promotion",
- "date_start": "2020-04-15T16:16:00+03:00",
- "date_end": "2026-04-15T16:16:00+03:00",
- "discount": {
- "percent": "50.00"
}, - "bonus": [
- {
- "quantity": 1,
- "name": "Xsolla Minigun",
- "sku": "minigun_1",
- "type": "virtual_good"
}
]
}
], - "can_be_bought": true,
- "vp_rewards": [
- {
- "item_id": 175232,
- "sku": "value_point_1",
- "amount": 130,
- "name": "Value point",
- "is_clan": false
}, - {
- "item_id": 186321,
- "sku": "clan_value_point_sku_1",
- "amount": 50,
- "name": "Clan Reward VP 1",
- "is_clan": true
}
], - "limits": {
- "per_user": {
- "available": 3,
- "recurrent_schedule": {
- "interval_type": "weekly",
- "reset_next_date": 1746057600
}, - "total": 5
}
}, - "periods": [
- {
- "date_from": "2020-08-11T10:00:00+03:00",
- "date_until": "2020-08-11T20:00:00+03:00"
}
]
}, - {
- "attributes": [ ],
- "description": "Honshu Boshin Wakizashi - Modern Tactical Samurai / Ninja Sword - Hand Forged 1060 Carbon Steel - Full Tang, Fully Functional, Battle Ready - Black TPR, Steel Guard and Pommel.",
- "groups": [ ],
- "is_free": true,
- "name": "Sword Xsolla Skin",
- "price": [ ],
- "quantity": 1,
- "sku": "swords_1",
- "type": "virtual_good",
- "virtual_item_type": "non_consumable",
- "virtual_prices": [ ],
- "promotions": [
- {
- "name": "Bonus promotion",
- "date_start": "2020-04-15T16:16:00+03:00",
- "date_end": "2026-04-15T16:16:00+03:00",
- "discount": {
- "percent": "50.00"
}, - "bonus": [
- {
- "quantity": 1,
- "name": "Xsolla Minigun",
- "sku": "minigun_1",
- "type": "virtual_good"
}
]
}
], - "can_be_bought": true,
- "vp_rewards": [
- {
- "item_id": 175232,
- "sku": "value_point_1",
- "amount": 130,
- "name": "Value point",
}, - {
- "item_id": 186321,
- "sku": "clan_value_point_sku_1",
- "amount": 50,
- "name": "Clan Reward VP 1",
- "is_clan": true
}
], - "limits": {
- "per_user": {
- "available": 3,
- "recurrent_schedule": {
- "interval_type": "weekly",
- "reset_next_date": 1746057600
}, - "total": 5
}
}, - "periods": [
- {
- "date_from": "2020-08-11T10:00:00+03:00",
- "date_until": "2020-08-11T20:00:00+03:00"
}
]
}
], - "price": {
- "amount": "6150.0000000000000000",
- "amount_without_discount": "12300.0000000000000000",
- "currency": "USD"
}, - "rewards": {
- "bonus": [
- {
- "item": {
- "name": "Sword Xsolla Skin",
- "sku": "swords_1",
- "type": "virtual_good",
- "virtual_item_type": "non_consumable",
- "description": "Honshu Boshin Wakizashi - Modern Tactical Samurai / Ninja Sword - Hand Forged 1060 Carbon Steel - Full Tang, Fully Functional, Battle Ready - Black TPR, Steel Guard and Pommel.",
}, - "quantity": 1
}
], - "discount": {
- "percent": null
}, - "discounted_items": [
- {
- "sku": "booster_mega_1",
- "discount": {
- "percent": "50.00"
}
}
], - "is_selectable": false
}
}