Passer au contenu

Présentation

  • Version : 2.0
  • Serveurs : https://api.xsolla.com/merchant/v2/

Cette référence API décrit les endpoints pour la gestion des abonnements, des coupons et des promotions. Pour plus d'informations sur les abonnements, consultez le guide du produit et le glossaire.

Télécharger la description d'OpenAPI
Langues
Serveurs
Mock server
https://xsolla.redocly.app/_mock/fr/api/subscriptions/
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations

Requête

Sécurité
projectUserJwtAuth
Chemin
project_idinteger\d+obligatoire
Requête
limitinteger
offsetinteger
localestring
countrystring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/fr/api/subscriptions/api/user/v1/projects/{project_id}/catalog?limit=0&offset=0&locale=string&country=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Réponses

Subscription's catalog

Corpsapplication/json
default_plansobjectobligatoire
default_plans.​has_morebooleanobligatoire
Exemple: "false"
default_plans.​itemsArray of objects
Par défaut []
default_plans.​items[].​chargeobjectobligatoire
default_plans.​items[].​charge.​amountnumber(float)obligatoire
Exemple: 4.99
default_plans.​items[].​charge.​currencystringobligatoire
Exemple: "USD"
default_plans.​items[].​charge.​setup_feenumber(float)obligatoire
Exemple: 0.99
default_plans.​items[].​periodobjectobligatoire
default_plans.​items[].​period.​unitstring or null
Par défaut null
Exemple: "month"
default_plans.​items[].​period.​valueinteger or null
Par défaut null
Exemple: "1"
default_plans.​items[].​plan_descriptionstringobligatoire
Exemple: "Localized plan description"
default_plans.​items[].​plan_end_datestring or null(date-time)
Exemple: "2031-04-11T13:51:02+03:00"
default_plans.​items[].​plan_external_idstringobligatoire
Exemple: "PlanExternalId"
default_plans.​items[].​plan_group_idstring or null
Exemple: "TestGroupId"
default_plans.​items[].​plan_idintegerobligatoire
Exemple: "54321"
default_plans.​items[].​plan_namestringobligatoire
Exemple: "Localized plan name"
default_plans.​items[].​plan_start_datestring or null(date-time)
Exemple: "2021-04-11T13:51:02+03:00"
default_plans.​items[].​plan_typestringobligatoire
Exemple: "all"
default_plans.​items[].​promotionobjectobligatoire
default_plans.​items[].​promotion.​promotion_charge_amountnumber or null(float)
Par défaut null
Exemple: "3.99"
default_plans.​items[].​promotion.​promotion_remaining_chargesinteger or null
Par défaut null
Exemple: "3"
default_plans.​items[].​trial_periodinteger or null
Exemple: "7"
default_plans.​namestring or null
Exemple: "Some product name"
has_morebooleanobligatoire
Exemple: "false"
plans_by_productArray of objects
Par défaut []
plans_by_product[].​has_morebooleanobligatoire
Exemple: "false"
plans_by_product[].​itemsArray of objects
Par défaut []
plans_by_product[].​items[].​chargeobjectobligatoire
plans_by_product[].​items[].​charge.​amountnumber(float)obligatoire
Exemple: 4.99
plans_by_product[].​items[].​charge.​currencystringobligatoire
Exemple: "USD"
plans_by_product[].​items[].​charge.​setup_feenumber(float)obligatoire
Exemple: 0.99
plans_by_product[].​items[].​periodobjectobligatoire
plans_by_product[].​items[].​period.​unitstring or null
Par défaut null
Exemple: "month"
plans_by_product[].​items[].​period.​valueinteger or null
Par défaut null
Exemple: "1"
plans_by_product[].​items[].​plan_descriptionstringobligatoire
Exemple: "Localized plan description"
plans_by_product[].​items[].​plan_end_datestring or null(date-time)
Exemple: "2031-04-11T13:51:02+03:00"
plans_by_product[].​items[].​plan_external_idstringobligatoire
Exemple: "PlanExternalId"
plans_by_product[].​items[].​plan_group_idstring or null
Exemple: "TestGroupId"
plans_by_product[].​items[].​plan_idintegerobligatoire
Exemple: "54321"
plans_by_product[].​items[].​plan_namestringobligatoire
Exemple: "Localized plan name"
plans_by_product[].​items[].​plan_start_datestring or null(date-time)
Exemple: "2021-04-11T13:51:02+03:00"
plans_by_product[].​items[].​plan_typestringobligatoire
Exemple: "all"
plans_by_product[].​items[].​promotionobjectobligatoire
plans_by_product[].​items[].​promotion.​promotion_charge_amountnumber or null(float)
Par défaut null
Exemple: "3.99"
plans_by_product[].​items[].​promotion.​promotion_remaining_chargesinteger or null
Par défaut null
Exemple: "3"
plans_by_product[].​items[].​trial_periodinteger or null
Exemple: "7"
plans_by_product[].​namestring or null
Exemple: "Some product name"
Réponse
application/json
{ "default_plans": { "has_more": "false", "items": [], "name": "Some product name" }, "has_more": "false", "plans_by_product": [] }

Requête

Sécurité
projectUserJwtAuth
Chemin
project_idinteger\d+obligatoire
Requête
plan_idArray of integers
plan_external_idArray of strings
limitinteger
offsetinteger
localestring
countrystring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/fr/api/subscriptions/api/user/v1/projects/{project_id}/plans?plan_id=0&plan_external_id=string&limit=0&offset=0&locale=string&country=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Réponses

Subscription's default plans

Corpsapplication/json
has_morebooleanobligatoire
Exemple: "false"
itemsArray of objects
Par défaut []
items[].​chargeobjectobligatoire
items[].​charge.​amountnumber(float)obligatoire
Exemple: 4.99
items[].​charge.​currencystringobligatoire
Exemple: "USD"
items[].​charge.​setup_feenumber(float)obligatoire
Exemple: 0.99
items[].​periodobjectobligatoire
items[].​period.​unitstring or null
Par défaut null
Exemple: "month"
items[].​period.​valueinteger or null
Par défaut null
Exemple: "1"
items[].​plan_descriptionstringobligatoire
Exemple: "Localized plan description"
items[].​plan_end_datestring or null(date-time)
Exemple: "2031-04-11T13:51:02+03:00"
items[].​plan_external_idstringobligatoire
Exemple: "PlanExternalId"
items[].​plan_group_idstring or null
Exemple: "TestGroupId"
items[].​plan_idintegerobligatoire
Exemple: "54321"
items[].​plan_namestringobligatoire
Exemple: "Localized plan name"
items[].​plan_start_datestring or null(date-time)
Exemple: "2021-04-11T13:51:02+03:00"
items[].​plan_typestringobligatoire
Exemple: "all"
items[].​promotionobjectobligatoire
items[].​promotion.​promotion_charge_amountnumber or null(float)
Par défaut null
Exemple: "3.99"
items[].​promotion.​promotion_remaining_chargesinteger or null
Par défaut null
Exemple: "3"
items[].​trial_periodinteger or null
Exemple: "7"
Réponse
application/json
{ "has_more": "false", "items": [] }

Requête

Sécurité
projectUserJwtAuth
Chemin
project_idinteger\d+obligatoire
Requête
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/fr/api/subscriptions/api/user/v1/projects/{project_id}/products?limit=0&offset=0&locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Réponses

Subscription's products

Corpsapplication/json
has_morebooleanobligatoire
Exemple: false
itemsArray of objects
Par défaut []
items[].​product_descriptionstring or null
Exemple: "Localized product description"
items[].​product_external_idstring or null
Exemple: "ProductExternalId"
items[].​product_group_idstring or null
Exemple: "TestGroupId"
items[].​product_idintegerobligatoire
Exemple: "12345"
items[].​product_namestringobligatoire
Exemple: "Product name"
Réponse
application/json
{ "has_more": false, "items": [] }
Opérations
Opérations
Opérations