コンテンツへスキップ

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/
操作
操作
操作

Subscription management

操作
操作

プロモーション

操作
操作

Subscription management

操作

List plans for change

リクエスト

セキュリティ
subscriptionsManagementJwtAuth
パス
subscription_idinteger\d+必須
project_idinteger\d+必須
クエリ
limitinteger
offsetinteger
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/plans_for_change?limit=0&offset=0&locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

レスポンス

List of available plans for change

ボディapplication/json
has_moreboolean必須
例: "false"
itemsArray of objects(PlanResponse)
デフォルト []
レスポンス
application/json
{ "has_more": "false", "items": [] }

Get plan for change

リクエスト

セキュリティ
subscriptionsManagementJwtAuth
パス
subscription_idinteger\d+必須
plan_idinteger\d+必須
project_idinteger\d+必須
クエリ
localestring
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/api/user/v1/management/projects/{project_id}/subscriptions/{subscription_id}/plans_for_change/{plan_id}?locale=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

レスポンス

Available plans for change with payment details

ボディapplication/json
chargeobject(Charge2)必須
charge.​amountnumber(float)必須
例: "4.99"
charge.​currencystring必須
例: "USD"
charge.​setup_feenumber or null(float)
例: "0.99"
payment_detailsobject(PaymentDetails)必須
payment_details.​surcharge(Surcharge (object or null))
デフォルト null
(Surcharge (object or null))
デフォルト null
payment_details.​unused(Unused (object or null))
デフォルト null
(Unused (object or null))
デフォルト null
periodobject(Period2)必須
period.​unitstring or null
デフォルト null
例: "month"
period.​valueinteger or null
デフォルト null
例: "1"
plan_descriptionstring必須
例: "Localized plan description"
plan_end_datestring or null(date-time)
例: "2031-04-11T13:51:02+03:00"
plan_external_idstring必須
例: "PlanExternalId"
plan_group_idstring or null
例: "TestGroupId"
plan_idinteger必須
例: "54321"
plan_namestring必須
例: "Localized plan name"
plan_start_datestring or null(date-time)
例: "2021-04-11T13:51:02+03:00"
plan_typestring必須
例: "all"
promotionobject(Promotion)必須
promotion.​promotion_charge_amountnumber or null(float)
デフォルト null
例: "3.99"
promotion.​promotion_remaining_chargesinteger or null
デフォルト null
例: "3"
trial_periodinteger or null
例: "7"
レスポンス
application/json
{ "charge": { "amount": "4.99", "currency": "USD", "setup_fee": "0.99" }, "payment_details": { "surcharge": null, "unused": null }, "period": { "unit": "month", "value": "1" }, "plan_description": "Localized plan description", "plan_end_date": "2031-04-11T13:51:02+03:00", "plan_external_id": "PlanExternalId", "plan_group_id": "TestGroupId", "plan_id": "54321", "plan_name": "Localized plan name", "plan_start_date": "2021-04-11T13:51:02+03:00", "plan_type": "all", "promotion": { "promotion_charge_amount": "3.99", "promotion_remaining_charges": "3" }, "trial_period": "7" }