Zum Inhalt springen

Überblick

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

Diese API-Referenz beschreibt Endpunkte für die Verwaltung von Abonnements, Gutscheinen und Werbeaktionen. Weitere Informationen über Subscriptions finden Sie in der Produktanleitung und in der Begriffserläuterung.

OpenAPI-Beschreibung herunterladen
Sprachen
Server
Mock server
https://xsolla.redocly.app/_mock/de/api/subscriptions/
Operationen
Operationen
Operationen
Operationen
Operationen
Operationen
Operationen
Operationen

Anfrage

Sicherheit
subscriptionsManagementJwtAuth
Pfad
subscription_idinteger\d+erforderlich
project_idinteger\d+erforderlich
Abfrage
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/de/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}?locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Antworten

Get subscription info

Bodyapplication/json
chargeobject(Charge)erforderlich
charge.​amountnumber(float)erforderlich
Beispiel: "4.99"
charge.​amount_with_promotionnumber or null(float)
Standard null
Beispiel: "3.99"
charge.​currencystringerforderlich
Beispiel: "USD"
date_createstring(date-time)erforderlich
Beispiel: "2031-04-11T13:51:02+03:00"
date_endstring or null(date-time)
Beispiel: "2031-04-11T13:51:02+03:00"
date_last_chargestring or null(date-time)
Beispiel: "2031-04-11T13:51:02+03:00"
date_next_chargestring or null(date-time)
Beispiel: "2031-04-11T13:51:02+03:00"
idintegererforderlich
Beispiel: "12345"
is_change_plan_allowedbooleanerforderlich
Beispiel: "false"
is_change_to_non_renew_possiblebooleanerforderlich
Beispiel: "true"
is_in_trialbooleanerforderlich
Beispiel: "false"
is_renew_possiblebooleanerforderlich
Beispiel: "true"
last_successful_charge(LastSuccessfulCharge (object or null))
(LastSuccessfulCharge (object or null))
payment_account(PaymentRecurrentAccountResponse2 (object or null))
(PaymentRecurrentAccountResponse2 (object or null))
periodobject(Period)erforderlich
period.​unitstring or null
Standard null
Beispiel: "month"
period.​valueinteger or null
Standard null
Beispiel: "1"
plan_descriptionstringerforderlich
Beispiel: "Localized plan description"
plan_namestringerforderlich
Beispiel: "Localized plan name"
product_descriptionstring or null
Beispiel: "Localized product description"
product_namestring or null
Beispiel: "Product name"
statusstringerforderlich
Beispiel: "active"
trial_periodinteger or null
Beispiel: "0"
Antwort
application/json
{ "charge": { "amount": "4.99", "amount_with_promotion": "3.99", "currency": "USD" }, "date_create": "2031-04-11T13:51:02+03:00", "date_end": "2031-04-11T13:51:02+03:00", "date_last_charge": "2031-04-11T13:51:02+03:00", "date_next_charge": "2031-04-11T13:51:02+03:00", "id": "12345", "is_change_plan_allowed": "false", "is_change_to_non_renew_possible": "true", "is_in_trial": "false", "is_renew_possible": "true", "last_successful_charge": { "amount": "3.99", "currency": "USD", "date": "2031-04-11T13:51:02+03:00" }, "payment_account": { "card_expiry_date": {}, "id": "123", "name": "** 7398", "ps_name": "Mastercard", "switch_icon_name": "mastercard.svg", "type": "card" }, "period": { "unit": "month", "value": "1" }, "plan_description": "Localized plan description", "plan_name": "Localized plan name", "product_description": "Localized product description", "product_name": "Product name", "status": "active", "trial_period": "0" }

Anfrage

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

Antworten

Move subscription from non-renew to active

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

Anfrage

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

Antworten

Make subscription non-renewable

Bodyapplication/json
Antwort
application/json
null