GET
/
api
/
v1
/
server-to-server-interface
/
subscription
/
list
curl --request GET \
  --url https://api-dev.paymentoptions.com/api/v1/api/v1/server-to-server-interface/subscription/list \
  --header 'Authorization: <api-key>' \
  --header 'x-api-key: <api-key>'
{
  "success": true,
  "status_code": 200,
  "is_live": false,
  "subscription_details": [
    {
      "id": "2048b01c-1512-45b9-98fc-27aac4deabce",
      "type": "CYCLE",
      "max_cycle_count": 10,
      "status": "ACTIVE",
      "completed_payment_cycle": 1,
      "next_payment_date": "2024-12-01T00:00:00.000Z",
      "next_payment_cycle": 2,
      "subscription_plan_details": {
        "name": "Three weeks plan",
        "desc": "Billed every two days",
        "billing_cycle_type": "DAYS",
        "billing_cycle_interval": 2,
        "amount": 1000,
        "ccy": "JPY",
        "trial_period_duration": "",
        "trial_period_duration_type": "NONE",
        "plan_discount_percentage": 10,
        "plan_discount_duration": 2
      },
      "subscription_transaction_details": [
        {
          "id": "00a33a30-be2d-4d5a-8d4f-659a6999d2ff",
          "ref": 69400,
          "cycle": 1,
          "status": "SUCCESSFUL",
          "transaction_date": "2024-11-30T00:00:00.000Z",
          "amount": 900,
          "ccy": "JPY",
          "event": "CAPTURED"
        }
      ]
    }
  ]
}

備考

このAPIにはリクエストペイロードは必要ありません。リクエストヘッダーに正しい認証情報(APIキーなど)が含まれていることを確認してください。

ヘッダー説明
x-api-key資格情報と一緒に提供されます。
AuthorizationPO Gatewayの加盟店詳細から取得したライブAPIキー。
Content-Typeすべてのレスポンス属性がJSON形式であることを示します(application/jsonに設定)。

重要なポイント

サブスクリプションデータを取得

  • サブスクリプションリストAPIは、加盟店がすべてのサブスクリプションプランの状態を追跡できるようにし、アクティブ、キャンセル済み、または期限切れのサブスクリプションを含みます。

サブスクリプションデータ - 各サブスクリプションレコードには次の情報が含まれます

  • サブスクリプションID

  • プラン名と説明

  • 現在のステータス(アクティブ、期限切れ、またはキャンセル済み)

  • 開始日と終了日

  • サイクル間隔と次の請求日

  • 試用期間と割引情報(該当する場合)。

Authorizations

Authorization
string
header
required

認証のためのAPIキー。形式:'Basic YOUR_API_KEY_HERE'

x-api-key
string
header
required

x-api-key専用のAPIキー。

Response

200 - application/json
サブスクリプションの詳細を含む成功した応答。
success
boolean

取引が成功したかどうかを示します。

Example:

true

status_code
integer

応答のHTTPステータスコード。

Example:

200

is_live
boolean

取引が本番環境かテスト環境かを示します。

Example:

false

subscription_details
object[]

サブスクリプションの詳細の一覧。