Xsolla-logo

Redeem Coupon

post/projects/{project_id}/coupons/{code}/redeem

Redeem a coupon by its code.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

code
required
string

Coupon code.

Request Body schema: application/json
user_id
required
string

User ID.

Responses
200

OK.

Request samples
application/json
{
  • "user_id": "1234"
}
Response samples
application/json
{
  • "campaign_code": "new_campaign",
  • "coupon_code": "ddgf5bn4",
  • "coupon_id": 89613996,
  • "expiration_date": "2019-12-32000:00:00",
  • "is_active": 1,
  • "project_id": 12345,
  • "redeems_count_for_user": 10,
  • "redeems_count_remain": 20,
  • "subscription_coupon": null,
  • "virtual_currency_amount": 200,
  • "virtual_items": [ ]
}