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

Request

Creates a subscription-based product.

Security
basicAuth
Path
project_idintegerrequired

Project ID.

Bodyapplication/jsonrequired
namestringrequired

Product name.

group_idstringrequired

Group ID the product is linked to.

descriptionobject

Localized item 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.

curl -i -X POST \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/subscriptions/projects/{project_id}/subscriptions/products' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": {
      "en": "Kids TV"
    },
    "group_id": "charge",
    "name": "Channel2"
  }'

Responses

Created.

Bodyapplication/json
product_idinteger
Response
application/json
{ "product_id": 172003 }

Request

Lists all subscription-based products.

Security
basicAuth
Path
project_idintegerrequired

Project ID.

Query
offsetinteger

Number of the element from which the list is generated (the count starts from 0).

limitintegerrequired

Limit for the number of elements on the page.

group_idstring

Group ID the plans are linked to.

product_idinteger

Product ID the plans are linked to.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/subscriptions/projects/{project_id}/subscriptions/products?offset=0&limit=0&group_id=string&product_id=0'

Responses

OK.

Bodyapplication/jsonArray [
idinteger or null

Product ID the plans are linked to.

namestring

Product name.

group_idstring

Group ID the product is linked to.

descriptionobject

Localized item 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.

]
Response
application/json
[ { "description": {}, "group_id": "charge", "id": 714, "name": "Channel" }, { "description": {}, "group_id": "notify", "id": 715, "name": "notify" }, { "description": {}, "group_id": "charge", "id": 716, "name": "charge2" }, { "description": {}, "group_id": "charge", "id": 486, "name": "Channel2" } ]

Request

Updates a subscription-based product.

Security
basicAuth
Path
project_idintegerrequired

Project ID.

product_idintegerrequired

Product ID the plans are linked to.

Bodyapplication/jsonrequired
namestringrequired

Product name.

group_idstringrequired

Group ID the product is linked to.

descriptionobject

Localized item 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.

curl -i -X PUT \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/subscriptions/projects/{project_id}/subscriptions/products/{product_id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": {
      "en": "Description in English."
    },
    "group_id": "charge13",
    "name": "Channel23"
  }'

Responses

OK.

Bodyapplication/json
idinteger or null

Product ID the plans are linked to.

namestring

Product name.

group_idstring

Group ID the product is linked to.

descriptionobject

Localized item 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.

Response
application/json
{ "description": { "en": "Description in English." }, "group_id": "charge13", "id": 1713603, "name": "Channel23" }
Operations
Operations
Operations
Operations
Operations