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
projectUserJwtAuth
Pfad
project_idinteger\d+erforderlich
Abfrage
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/de/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions?limit=0&offset=0&locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Antworten

Get subscription info

Bodyapplication/json
has_morebooleanerforderlich
Beispiel: "false"
itemsArray of objects
Standard []
items[].​chargeobjecterforderlich
items[].​charge.​amountnumber(float)erforderlich
Beispiel: 4.99
items[].​charge.​amount_with_promotionnumber or null(float)
Standard null
Beispiel: 3.99
items[].​charge.​currencystringerforderlich
Beispiel: "USD"
items[].​date_createstring(date-time)erforderlich
Beispiel: "2031-04-11T13:51:02+03:00"
items[].​date_last_chargestring or null(date-time)
Beispiel: "2031-04-11T13:51:02+03:00"
items[].​date_next_chargestring or null(date-time)
Beispiel: "2031-04-11T13:51:02+03:00"
items[].​idintegererforderlich
Beispiel: "12345"
items[].​is_in_trialbooleanerforderlich
Beispiel: "false"
items[].​periodobjecterforderlich
items[].​period.​unitstring or null
Standard null
Beispiel: "month"
items[].​period.​valueinteger or null
Standard null
Beispiel: "1"
items[].​plan_descriptionstringerforderlich
Beispiel: "Localized plan description"
items[].​plan_end_datestring or null(date-time)
Beispiel: "2031-04-11T13:51:02+03:00"
items[].​plan_external_idstringerforderlich
Beispiel: "PlanExternalId"
items[].​plan_idintegererforderlich
Beispiel: "54321"
items[].​plan_namestringerforderlich
Beispiel: "Localized plan name"
items[].​plan_start_datestring or null(date-time)
Beispiel: "2021-04-11T13:51:02+03:00"
items[].​product_descriptionstring or null
Beispiel: "Localized product description"
items[].​product_external_idstring or null
Beispiel: "ProductExternalId"
items[].​product_idinteger or null
Beispiel: "12345"
items[].​product_namestring or null
Beispiel: "Product name"
items[].​statusstringerforderlich
Beispiel: "active"
items[].​trial_periodinteger or null
Beispiel: "0"
Antwort
application/json
{ "has_more": "false", "items": [] }

Anfrage

Sicherheit
projectUserJwtAuth
Pfad
project_idinteger\d+erforderlich
Abfrage
countrystring
Bodyapplication/jsonerforderlich

Buy subscription

available_plansobject or null

Abonnement-Modelle (Array), die im Zahlungsportal angezeigt werden sollen.

Standard null
custom_parametersobject or null

You can pass additional parameters in the token

Standard null
plan_external_idstring or null

You must provide either a plan_external_id

Standard null
Beispiel: "PlanExternalId"
product_idinteger or null

ID of the product associated with the plan

Standard null
Beispiel: "12345"
settings(object or null)
(object or null)
curl -i -X POST \
  'https://xsolla.redocly.app/_mock/de/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/buy?country=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "available_plans": null,
    "custom_parameters": null,
    "plan_external_id": "PlanExternalId",
    "product_id": "12345",
    "settings": {
      "currency": "str",
      "external_id": "string",
      "hide_saved_payment_accounts": true,
      "locale": "st",
      "payment_method": 1,
      "redirect_policy": {
        "delay": 0,
        "redirect_button_caption": "string",
        "redirect_conditions": "none",
        "status_for_manual_redirection": "none"
      },
      "return_url": "string",
      "steam_user_id": "stringstringstrin",
      "ui": {
        "desktop": {
          "header": {
            "close_button": true,
            "is_visible": true,
            "type": "compact",
            "visible_logo": true,
            "visible_name": true
          }
        },
        "independent_windows": true,
        "license_url": "string",
        "mobile": {
          "footer": {
            "is_visible": true
          },
          "header": {
            "close_button": true
          },
          "mode": "saved_accounts"
        },
        "mode": "user_account",
        "size": "large",
        "theme": "string",
        "user_account": {
          "history": {
            "enable": true,
            "order": 1
          },
          "info": {
            "enable": true,
            "order": 1
          },
          "payment_accounts": {
            "enable": true,
            "order": 1
          },
          "subscriptions": {
            "enable": true,
            "order": 1
          }
        },
        "version": "desktop"
      },
      "xsolla_product_tag": "string"
    }
  }'

Antworten

Get buy subscription url

Bodyapplication/json
link_to_psstringerforderlich
Beispiel: "https://secure.xsolla.com/paystation2/?access_token=<access_token>"
Antwort
application/json
{ "link_to_ps": "https://secure.xsolla.com/paystation2/?access_token=<access_token>" }
Operationen
Operationen
Operationen
Operationen