콘텐츠로 건너뛰기

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/ko/api/subscriptions/
작업
작업
작업
작업
작업
작업
작업

요청

보안
projectUserJwtAuth
경로
project_idinteger\d+필수
쿼리
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ko/api/subscriptions/api/user/v1/projects/{project_id}/subscriptions?limit=0&offset=0&locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

응답

Get subscription info

본문application/json
has_moreboolean필수
예제: "false"
itemsArray of objects
기본값 []
items[].​chargeobject필수
items[].​charge.​amountnumber(float)필수
예제: 4.99
items[].​charge.​amount_with_promotionnumber or null(float)
기본값 null
예제: 3.99
items[].​charge.​currencystring필수
예제: "USD"
items[].​date_createstring(date-time)필수
예제: "2031-04-11T13:51:02+03:00"
items[].​date_last_chargestring or null(date-time)
예제: "2031-04-11T13:51:02+03:00"
items[].​date_next_chargestring or null(date-time)
예제: "2031-04-11T13:51:02+03:00"
items[].​idinteger필수
예제: "12345"
items[].​is_in_trialboolean필수
예제: "false"
items[].​periodobject필수
items[].​period.​unitstring or null
기본값 null
예제: "month"
items[].​period.​valueinteger or null
기본값 null
예제: "1"
items[].​plan_descriptionstring필수
예제: "Localized plan description"
items[].​plan_end_datestring or null(date-time)
예제: "2031-04-11T13:51:02+03:00"
items[].​plan_external_idstring필수
예제: "PlanExternalId"
items[].​plan_idinteger필수
예제: "54321"
items[].​plan_namestring필수
예제: "Localized plan name"
items[].​plan_start_datestring or null(date-time)
예제: "2021-04-11T13:51:02+03:00"
items[].​product_descriptionstring or null
예제: "Localized product description"
items[].​product_external_idstring or null
예제: "ProductExternalId"
items[].​product_idinteger or null
예제: "12345"
items[].​product_namestring or null
예제: "Product name"
items[].​statusstring필수
예제: "active"
items[].​trial_periodinteger or null
예제: "0"
응답
application/json
{ "has_more": "false", "items": [] }

요청

보안
projectUserJwtAuth
경로
project_idinteger\d+필수
쿼리
countrystring
본문application/json필수

Buy subscription

available_plansobject or null

결제 UI에 표시되는 정기 결제 요금제입니다.

기본값 null
custom_parametersobject or null

You can pass additional parameters in the token

기본값 null
plan_external_idstring or null

You must provide either a plan_external_id

기본값 null
예제: "PlanExternalId"
product_idinteger or null

ID of the product associated with the plan

기본값 null
예제: "12345"
settings(object or null)
(object or null)
curl -i -X POST \
  'https://xsolla.redocly.app/_mock/ko/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"
    }
  }'

응답

Get buy subscription 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>" }
작업
작업
작업
작업