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

Request

Security
subscriptionsManagementJwtAuth
Path
subscription_idinteger\d+required
project_idinteger\d+required
curl -i -X PUT \
  'https://xsolla.redocly.app/_mock/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/activate' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Move subscription from non-renew to active

Bodyapplication/json
Response
application/json
{ "status": "successful" }

Request

Security
subscriptionsManagementJwtAuth
Path
subscription_idinteger\d+required
project_idinteger\d+required
Query
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/plans_for_change?limit=0&offset=0&locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

List of available plans for change

Bodyapplication/json
itemsArray of objects(PlanResponse)
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[].​periodobject(Period4)required
items[].​period.​valueinteger or null
Default null
Example: "1"
items[].​period.​unitstring or null
Default null
Example: "month"
items[].​chargeobject(Charge4)required
items[].​charge.​amountnumber(float)required
Example: "4.99"
items[].​charge.​setup_feenumber or null(float)
Example: "0.99"
items[].​charge.​currencystringrequired
Example: "USD"
items[].​promotionobject(Promotion2)required
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" }