コンテンツへスキップ

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

操作
操作

リクエスト

すべてのサブスクリプションの決済を一覧表示します。

セキュリティ
basicAuth
パス
project_idinteger必須

プロジェクトID。

クエリ
offsetinteger

リスト生成元のエレメントの番号です(カウントは0から始まります)。

limitinteger必須

ページにあるエレメント数の制限。

user_idstring

ユーザーID。

statusstring

トランザクションステータス。

列挙型 値説明
done

支払いが正常に処理されました。

fail

支払いが正常に処理されなかったか、または返金が行われました。

datetime_fromstring(datetime)

期間開始日。

datetime_tostring(datetime)

期間終了日。

subscription_idinteger

サブスクリプションID。

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/projects/{project_id}/subscriptions/payments?offset=0&limit=0&user_id=string&status=done&datetime_from=string&datetime_to=string&subscription_id=0'

レスポンス

OK。

ボディapplication/json
レスポンス
application/json
[ { "date_payment": "2016-04-05T10:02:01+03:00", "id": 67683, "id_payment": 203960, "status": "fail", "subscription": {} }, { "date_payment": "2015-09-21T17:06:47+03:00", "id": 1531, "id_payment": 168866, "status": "done", "subscription": {} } ]

ユーザー決済の取得

リクエスト

特定のユーザーが行ったすべての決済を一覧表示します。

セキュリティ
basicAuth
パス
project_idinteger必須

プロジェクトID。

user_idstring必須

ユーザーID。

クエリ
statusstring

トランザクションステータス。

列挙型 値説明
done

支払いが正常に処理されました。

fail

支払いが正常に処理されなかったか、または返金が行われました。

offsetinteger

リスト生成元のエレメントの番号です(カウントは0から始まります)。

limitinteger必須

ページにあるエレメント数の制限。

datetime_fromstring(datetime)

サンプル日付。リクエストよりも後に作成されたサブスクリプションを見つけるのに役立ちます。

datetime_tostring(datetime)

サンプル日付。リクエストよりも後に作成されたサブスクリプションを見つけるのに役立ちます。

subscription_idinteger

サブスクリプションID。

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/ja/api/subscriptions/projects/{project_id}/users/{user_id}/subscriptions/payments?status=done&offset=0&limit=0&datetime_from=string&datetime_to=string&subscription_id=0'

レスポンス

OK。

ボディapplication/json
レスポンス
application/json
[ { "date_payment": "2016-04-05T10:02:01+03:00", "id": 6746083, "id_payment": 202789960, "status": "fail", "subscription": {} } ]

プロモーション

操作
操作

Subscription management

操作