Skip to content

Overview

  • Version: 2.0
  • Servers: https://api.xsolla.com/merchant/v2/

This API reference describes endpoints for managing subscriptions, coupons, and promotions. To get more information about Subscriptions, see the product guide and the glossary.

Download OpenAPI description
Languages
Servers
Mock server
https://xsolla.redocly.app/_mock/api/subscriptions/
Operations
Operations
Operations
Operations
Operations
Operations

Request

Updates a promotion. If the promotion is read-only (read_only = true), you are not allowed to change project_id parameter.

Notice

This API call does not contain the project_id path-parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

promotion_idintegerrequired

Promotion ID.

Bodyapplication/jsonrequired
technical_namestringrequired

Technical name of the promotion.

project_idintegerrequired

Project ID.

labelobject

Array of localized labels to show in the payment UI.

label.​enstring

English.

label.​rustring

Russian.

label.​csstring

Czech.

label.​arstring

Arabic.

label.​bgstring

Bulgarian.

label.​cnstring

Chinese (Simplified).

label.​twstring

Chinese (Traditional).

label.​frstring

French.

label.​destring

German.

label.​hestring

Hebrew.

label.​itstring

Italian.

label.​kostring

Korean.

label.​plstring

Polish.

label.​ptstring

Portuguese.

label.​rostring

Romanian.

label.​esstring

Spanish.

label.​thstring

Thai.

label.​trstring

Turkish.

label.​vistring

Vietnamese.

label.​jastring

Japanese.

nameobject

Array of localized promotion names.

name.​enstring

English.

name.​rustring

Russian.

name.​csstring

Czech.

name.​arstring

Arabic.

name.​bgstring

Bulgarian.

name.​cnstring

Chinese (Simplified).

name.​twstring

Chinese (Traditional).

name.​frstring

French.

name.​destring

German.

name.​hestring

Hebrew.

name.​itstring

Italian.

name.​kostring

Korean.

name.​plstring

Polish.

name.​ptstring

Portuguese.

name.​rostring

Romanian.

name.​esstring

Spanish.

name.​thstring

Thai.

name.​trstring

Turkish.

name.​vistring

Vietnamese.

name.​jastring

Japanese.

descriptionobject

Array of localized promotion descriptions.

description.​enstring

English.

description.​rustring

Russian.

description.​csstring

Czech.

description.​arstring

Arabic.

description.​bgstring

Bulgarian.

description.​cnstring

Chinese (Simplified).

description.​twstring

Chinese (Traditional).

description.​frstring

French.

description.​destring

German.

description.​hestring

Hebrew.

description.​itstring

Italian.

description.​kostring

Korean.

description.​plstring

Polish.

description.​ptstring

Portuguese.

description.​rostring

Romanian.

description.​esstring

Spanish.

description.​thstring

Thai.

description.​trstring

Turkish.

description.​vistring

Vietnamese.

description.​jastring

Japanese.

idinteger
read_onlyboolean
show_bannerboolean
enabledboolean
curl -i -X PUT \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": {
      "en": "Promotion with 5% discount",
      "ru": "Акция со скидкой 5%"
    },
    "label": {
      "en": "5%",
      "ru": "5%"
    },
    "name": {
      "en": "5% discount",
      "ru": "скидка 5%"
    },
    "project_id": 40544,
    "technical_name": "Sale promotion"
  }'

Responses

No content.

Request

Deletes a promotion. You can only delete promotions with enabled = false.

Notice

This API call does not contain the project_id path-parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

promotion_idintegerrequired

Promotion ID.

curl -i -X DELETE \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}'

Responses

No content.

Request

You need to review a promotion before activating it. This method returns the list of errors, if any.

Notice

This API call does not contain the project_id path-parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

promotion_idintegerrequired

Promotion ID.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/review'

Responses

OK.

Bodyapplication/jsonArray [
componentstring
messagestring
]
Response
application/json
[ { "component": "rewards", "message": "Please select a reward" } ]
Operations
Operations