# Redeem coupon code Redeems a coupon code. The user gets a bonus after a coupon is redeemed. Endpoint: POST /v2/project/{project_id}/coupon/redeem Version: 2.0.0 Security: XsollaLoginUserJWT ## Path parameters: - `project_id` (integer, required) Project ID. You can find this parameter in your Publisher Account next to the name of the project. Example: 44056 ## Request fields (application/json): - `coupon_code` (string) Unique coupon code. Contains letters and numbers. Example: "WINTER2021" - `selected_unit_items` (object) The reward that is selected by a user. Object key is an SKU of a unit, and value is an SKU of one of the items in a unit. Example: {"game_1":"game_1_steam","game_2":"game_2_playstation"} ## Response 200 fields (application/json): - `items` (array) Example: [{"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":"https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png","is_free":false,"name":"Xsolla Booster Mega","price":{"amount":"50.0000000000000000","amount_without_discount":"100.0000000000000000","currency":"USD"},"quantity":1,"sku":"com.xsolla.booster_mega_1","type":"virtual_good","virtual_item_type":"consumable","virtual_prices":[]}] - `items.sku` (string) - `items.groups` (array) - `items.groups.external_id` (string) - `items.groups.name` (string) - `items.price` (object,null) Item prices. - `items.price.amount` (string) Discounted item price. Example: "2.9900" - `items.price.amount_without_discount` (string) Item price. Example: "2.9900" - `items.price.currency` (string) Item price currency. Three-letter code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Example: "USD" - `items.type` (string) - `items.virtual_item_type` (string) Type of virtual item. Enum: "consumable", "non_consumable", "non_renewing_subscription" - `items.virtual_prices` (array) - `items.description` (string) - `items.image_url` (string) - `items.quantity` (integer) - `items.is_free` (boolean) - `items.attributes` (array) ## Response 401 fields (application/json): - `statusCode` (integer) Example: 401 - `errorCode` (integer) Example: 1501 - `errorMessage` (string) Example: "[0401-1501]: Authorization failed: Provide authorization" ## Response 403 fields (application/json): - `statusCode` (integer) Example: 403 - `errorCode` (integer) - `errorMessage` (string) Example: "Authorization header not sent." - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x" ## Response 404 fields (application/json): - `statusCode` (integer) Example: 404 - `errorCode` (integer) Example: 4001 - `errorMessage` (string) Example: "[0401-9807]: Enter valid coupon code." ## Response 422 fields (application/json): - `statusCode` (integer) Example: 422 - `errorCode` (integer) Example: 1102 - `errorMessage` (string) Example: "[0401-1102]: Unprocessable Entity. The property `coupon_code` is required" - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x"