Перейти к содержимому

Введение

  • Версия: 2.0
  • Серверы: https://api.xsolla.com/merchant/v2/

Этот справочник API описывает методы для управления подписками, купонами и акциями. Подробная информация о продукте Subscriptions приведена в руководстве по продукту и глоссарии.

Скачать описание OpenAPI
Языки
Серверы
Mock server
https://xsolla.redocly.app/_mock/ru/api/subscriptions/
Операции
Операции
Операции
Операции
Операции
Операции
Операции
Операции
Операции

Запрос

Безопасность
projectUserJwtAuth
Путь
project_idinteger\d+обязательный
Запрос
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/products?limit=0&offset=0&locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Ответы

Subscription's products

Телоapplication/json
has_morebooleanобязательный
Пример: false
itemsArray of objects
По умолчанию []
items[].​product_descriptionstring or null
Пример: "Localized product description"
items[].​product_external_idstring or null
Пример: "ProductExternalId"
items[].​product_group_idstring or null
Пример: "TestGroupId"
items[].​product_idintegerобязательный
Пример: "12345"
items[].​product_namestringобязательный
Пример: "Product name"
Ответ
application/json
{ "has_more": false, "items": [] }

Запрос

Безопасность
projectUserJwtAuth
Путь
project_idinteger\d+обязательный
productIdstringобязательный
Запрос
plan_idArray of integers
plan_external_idArray of strings
limitinteger
offsetinteger
localestring
countrystring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ru/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>'

Ответы

Subscription's plans by product

Телоapplication/json
has_morebooleanобязательный
Пример: "false"
itemsArray of objects
По умолчанию []
items[].​chargeobjectобязательный
items[].​charge.​amountnumber(float)обязательный
Пример: 4.99
items[].​charge.​currencystringобязательный
Пример: "USD"
items[].​charge.​setup_feenumber(float)обязательный
Пример: 0.99
items[].​periodobjectобязательный
items[].​period.​unitstring or null
По умолчанию null
Пример: "month"
items[].​period.​valueinteger or null
По умолчанию null
Пример: "1"
items[].​plan_descriptionstringобязательный
Пример: "Localized plan description"
items[].​plan_end_datestring or null(date-time)
Пример: "2031-04-11T13:51:02+03:00"
items[].​plan_external_idstringобязательный
Пример: "PlanExternalId"
items[].​plan_group_idstring or null
Пример: "TestGroupId"
items[].​plan_idintegerобязательный
Пример: "54321"
items[].​plan_namestringобязательный
Пример: "Localized plan name"
items[].​plan_start_datestring or null(date-time)
Пример: "2021-04-11T13:51:02+03:00"
items[].​plan_typestringобязательный
Пример: "all"
items[].​promotionobjectобязательный
items[].​promotion.​promotion_charge_amountnumber or null(float)
По умолчанию null
Пример: "3.99"
items[].​promotion.​promotion_remaining_chargesinteger or null
По умолчанию null
Пример: "3"
items[].​trial_periodinteger or null
Пример: "7"
Ответ
application/json
{ "has_more": "false", "items": [] }
Операции
Операции
Операции