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
Operations
Operations
Operations

Request

Security
projectUserJwtAuth
Path
project_idinteger\d+required
productIdstringrequired
Query
plan_idArray of integers
plan_external_idArray of strings
limitinteger
offsetinteger
localestring
countrystring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/subscriptions/api/user/v1/projects/{project_id}/products/{productId}/plans?plan_id=0&plan_external_id=string&limit=0&offset=0&locale=string&country=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Subscription's plans by product

Bodyapplication/json
itemsArray of objects
Default []
items[].​plan_idintegerrequired
Example: "54321"
items[].​plan_external_idstringrequired
Example: "PlanExternalId"
items[].​plan_group_idstring or null
Example: "TestGroupId"
items[].​plan_typestringrequired
Example: "all"
items[].​plan_namestringrequired
Example: "Localized plan name"
items[].​plan_descriptionstringrequired
Example: "Localized plan description"
items[].​plan_start_datestring or null(date-time)
Example: "2021-04-11T13:51:02+03:00"
items[].​plan_end_datestring or null(date-time)
Example: "2031-04-11T13:51:02+03:00"
items[].​trial_periodinteger or null
Example: "7"
items[].​periodobjectrequired
items[].​period.​valueinteger or null
Default null
Example: "1"
items[].​period.​unitstring or null
Default null
Example: "month"
items[].​chargeobjectrequired
items[].​charge.​amountnumber(float)required
Example: 4.99
items[].​charge.​setup_feenumber(float)required
Example: 0.99
items[].​charge.​currencystringrequired
Example: "USD"
items[].​promotionobjectrequired
items[].​promotion.​promotion_charge_amountnumber or null(float)
Default null
Example: "3.99"
items[].​promotion.​promotion_remaining_chargesinteger or null
Default null
Example: "3"
has_morebooleanrequired
Example: "false"
Response
application/json
{ "items": [], "has_more": "false" }

Request

Path
project_idinteger\d+required
Query
plan_idArray of integers
plan_external_idArray of strings
limitinteger
offsetinteger
localestring
countrystring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/subscriptions/api/public/v1/projects/{project_id}/user_plans?plan_id=0&plan_external_id=string&limit=0&offset=0&locale=string&country=string'

Responses

Subscription's default plans

Bodyapplication/json
itemsArray of objects
Default []
items[].​plan_idintegerrequired
Example: "54321"
items[].​plan_external_idstringrequired
Example: "PlanExternalId"
items[].​plan_group_idstring or null
Example: "TestGroupId"
items[].​plan_typestringrequired
Example: "all"
items[].​plan_namestringrequired
Example: "Localized plan name"
items[].​plan_descriptionstringrequired
Example: "Localized plan description"
items[].​plan_start_datestring or null(date-time)
Example: "2021-04-11T13:51:02+03:00"
items[].​plan_end_datestring or null(date-time)
Example: "2031-04-11T13:51:02+03:00"
items[].​trial_periodinteger or null
Example: "7"
items[].​periodobjectrequired
items[].​period.​valueinteger or null
Default null
Example: "1"
items[].​period.​unitstring or null
Default null
Example: "month"
items[].​chargeobjectrequired
items[].​charge.​amountnumber(float)required
Example: 4.99
items[].​charge.​setup_feenumber(float)required
Example: 0.99
items[].​charge.​currencystringrequired
Example: "USD"
items[].​promotionobjectrequired
items[].​promotion.​promotion_charge_amountnumber or null(float)
Default null
Example: "3.99"
items[].​promotion.​promotion_remaining_chargesinteger or null
Default null
Example: "3"
has_morebooleanrequired
Example: "false"
Response
application/json
{ "items": [], "has_more": "false" }

Request

Path
project_idinteger\d+required
Query
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/subscriptions/api/public/v1/projects/{project_id}/products?limit=0&offset=0&locale=string'

Responses

Subscription's products

Bodyapplication/json
itemsArray of objects
Default []
items[].​product_idintegerrequired
Example: "12345"
items[].​product_external_idstring or null
Example: "ProductExternalId"
items[].​product_group_idstring or null
Example: "TestGroupId"
items[].​product_namestringrequired
Example: "Product name"
items[].​product_descriptionstring or null
Example: "Localized product description"
has_morebooleanrequired
Example: false
Response
application/json
{ "items": [], "has_more": false }
Operations
Operations
Operations