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

Requête

Sécurité
subscriptionsManagementJwtAuth
Chemin
subscription_idinteger\d+obligatoire
project_idinteger\d+obligatoire
Requête
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/fr/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>'

Réponses

List of available plans for change

Corpsapplication/json
has_morebooleanobligatoire
Exemple: "false"
itemsArray of objects(PlanResponse)
Par défaut []
Réponse
application/json
{ "has_more": "false", "items": [] }

Requête

Sécurité
subscriptionsManagementJwtAuth
Chemin
subscription_idinteger\d+obligatoire
plan_idinteger\d+obligatoire
project_idinteger\d+obligatoire
Requête
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/fr/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/plans_for_change/{plan_id}?locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Réponses

Available plans for change with payment details

Corpsapplication/json
chargeobject(Charge2)obligatoire
charge.​amountnumber(float)obligatoire
Exemple: "4.99"
charge.​currencystringobligatoire
Exemple: "USD"
charge.​setup_feenumber or null(float)
Exemple: "0.99"
payment_detailsobject(PaymentDetails)obligatoire
payment_details.​surcharge(Surcharge (object or null))
Par défaut null
(Surcharge (object or null))
Par défaut null
payment_details.​unused(Unused (object or null))
Par défaut null
(Unused (object or null))
Par défaut null
periodobject(Period2)obligatoire
period.​unitstring or null
Par défaut null
Exemple: "month"
period.​valueinteger or null
Par défaut null
Exemple: "1"
plan_descriptionstringobligatoire
Exemple: "Localized plan description"
plan_end_datestring or null(date-time)
Exemple: "2031-04-11T13:51:02+03:00"
plan_external_idstringobligatoire
Exemple: "PlanExternalId"
plan_group_idstring or null
Exemple: "TestGroupId"
plan_idintegerobligatoire
Exemple: "54321"
plan_namestringobligatoire
Exemple: "Localized plan name"
plan_start_datestring or null(date-time)
Exemple: "2021-04-11T13:51:02+03:00"
plan_typestringobligatoire
Exemple: "all"
promotionobject(Promotion)obligatoire
promotion.​promotion_charge_amountnumber or null(float)
Par défaut null
Exemple: "3.99"
promotion.​promotion_remaining_chargesinteger or null
Par défaut null
Exemple: "3"
trial_periodinteger or null
Exemple: "7"
Réponse
application/json
{ "charge": { "amount": "4.99", "currency": "USD", "setup_fee": "0.99" }, "payment_details": { "surcharge": null, "unused": null }, "period": { "unit": "month", "value": "1" }, "plan_description": "Localized plan description", "plan_end_date": "2031-04-11T13:51:02+03:00", "plan_external_id": "PlanExternalId", "plan_group_id": "TestGroupId", "plan_id": "54321", "plan_name": "Localized plan name", "plan_start_date": "2021-04-11T13:51:02+03:00", "plan_type": "all", "promotion": { "promotion_charge_amount": "3.99", "promotion_remaining_charges": "3" }, "trial_period": "7" }