Перейти к содержимому

Overview

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

This API reference describes endpoints for managing subscriptions, coupons, and promotions. To get more information about Subscriptions, see the product guide and the glossary.

Скачать описание OpenAPI
Языки
Серверы
Mock server
https://xsolla.redocly.app/_mock/ru/api/subscriptions/
Операции
Операции
Операции
Операции
Операции
Операции
Операции
Операции

Запрос

Безопасность
projectUserJwtAuth
Путь
subscription_idinteger\d+обязательный
project_idinteger\d+обязательный
curl -i -X PUT \
  'https://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/cancel' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Ответы

Make subscription non-renewable

Телоapplication/json
Ответ
application/json
null

Запрос

Безопасность
projectUserJwtAuth
Путь
subscription_idinteger\d+обязательный
project_idinteger\d+обязательный
Телоapplication/jsonобязательный

Renew subscription

custom_parametersobject or null

You can pass additional parameters in the token

По умолчанию null
settings(object or null)
(object or null)
steam_user_idstring or null
curl -i -X POST \
  'https://xsolla.redocly.app/_mock/ru/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions/{subscription_id}/renew' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom_parameters": null,
    "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"
    },
    "steam_user_id": "string"
  }'

Ответы

Get subscription renew url

Телоapplication/json
link_to_psstringобязательный
Пример: "https://secure.xsolla.com/paystation2/?access_token=<access_token>"
Ответ
application/json
{ "link_to_ps": "https://secure.xsolla.com/paystation2/?access_token=<access_token>" }
Операции
Операции
Операции
Операции