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.

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.

]
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.

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.

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