コンテンツへスキップ

Subscriptions API (2.0)

概要

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

このAPIリファレンスでは、サブスクリプション、クーポン、およびプロモーションを管理するためのエンドポイントについて説明します。 サブスクリプションの詳細については、製品ガイドおよび用語集を参照してください。

OpenAPI記述をダウンロード
言語
サーバー
Mock server
https://xsolla.redocly.app/_mock/ja/api/subscriptions/
操作
操作
操作

サブスクリプション

操作
操作

プロモーション

操作
操作

サブスクリプション

操作
操作

List products (no auth)

リクエスト

パス
project_idinteger\d+必須
クエリ
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/api/public/v1/projects/{project_id}/products?limit=0&offset=0&locale=string'

レスポンス

Subscription's products

ボディapplication/json
has_moreboolean必須
例: false
itemsArray of objects
デフォルト []
items[].​product_descriptionstring or null
例: "Localized product description"
items[].​product_external_idstring or null
例: "ProductExternalId"
items[].​product_group_idstring or null
例: "TestGroupId"
items[].​product_idinteger必須
例: "12345"
items[].​product_namestring必須
例: "Product name"
レスポンス
application/json
{ "has_more": false, "items": [] }

List plans by product (no auth)

リクエスト

パス
project_idinteger\d+必須
productIdstring必須
クエリ
plan_idArray of integers
plan_external_idArray of strings
limitinteger
offsetinteger
localestring
countrystring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/api/public/v1/projects/{project_id}/products/{productId}/user_plans?plan_id=0&plan_external_id=string&limit=0&offset=0&locale=string&country=string'

レスポンス

Subscription's plans by product

ボディapplication/json
has_moreboolean必須
例: "false"
itemsArray of objects
デフォルト []
items[].​chargeobject必須
items[].​charge.​amountnumber(float)必須
例: 4.99
items[].​charge.​currencystring必須
例: "USD"
items[].​charge.​setup_feenumber(float)必須
例: 0.99
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_group_idstring or null
例: "TestGroupId"
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[].​plan_typestring必須
例: "all"
items[].​promotionobject必須
items[].​promotion.​promotion_charge_amountnumber or null(float)
デフォルト null
例: "3.99"
items[].​promotion.​promotion_remaining_chargesinteger or null
デフォルト null
例: "3"
items[].​trial_periodinteger or null
例: "7"
レスポンス
application/json
{ "has_more": "false", "items": [] }

List plans (no auth)

リクエスト

パス
project_idinteger\d+必須
クエリ
plan_idArray of integers
plan_external_idArray of strings
limitinteger
offsetinteger
localestring
countrystring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/api/public/v1/projects/{project_id}/user_plans?plan_id=0&plan_external_id=string&limit=0&offset=0&locale=string&country=string'

レスポンス

Subscription's default plans

ボディapplication/json
has_moreboolean必須
例: "false"
itemsArray of objects
デフォルト []
items[].​chargeobject必須
items[].​charge.​amountnumber(float)必須
例: 4.99
items[].​charge.​currencystring必須
例: "USD"
items[].​charge.​setup_feenumber(float)必須
例: 0.99
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_group_idstring or null
例: "TestGroupId"
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[].​plan_typestring必須
例: "all"
items[].​promotionobject必須
items[].​promotion.​promotion_charge_amountnumber or null(float)
デフォルト null
例: "3.99"
items[].​promotion.​promotion_remaining_chargesinteger or null
デフォルト null
例: "3"
items[].​trial_periodinteger or null
例: "7"
レスポンス
application/json
{ "has_more": "false", "items": [] }
操作

サブスクリプション

操作
操作