Xsolla-logo

Redeem game code by client

post/v2/project/{project_id}/entitlement/redeem

Grants entitlement by a provided game code.

Attention

You can redeem codes only for the DRM-free platform.
SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
Request Body schema: application/json
code
required
string

Game code.

sandbox
boolean
Default: false

Redeem game code in the sandbox mode. The option is available for those users who are specified in the list of company users.

Responses
201

Successful redemption.

403

Authorization header not sent.

404

Game code not found. Make sure the code and project_id are correct.

422

Invalid request.

Request samples
application/json
{
  • "code": "AAAA-BBBB-CCCC-DDDD",
  • "sandbox": false
}
Response samples
application/json
{
  • "statusCode": 403,
  • "errorCode": 0,
  • "errorMessage": "Authorization header not sent"
}