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

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

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": [] }

Requête

Chemin
project_idinteger\d+obligatoire
productIdstringobligatoire
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/public/v1/projects/{project_id}/products/{productId}/user_plans?plan_id=0&plan_external_id=string&limit=0&offset=0&locale=string&country=string'

Réponses

Subscription's plans by product

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

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/public/v1/projects/{project_id}/user_plans?plan_id=0&plan_external_id=string&limit=0&offset=0&locale=string&country=string'

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": [] }
Opérations
Opérations
Opérations