> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paymentoptions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# サブスクリプションリストAPI

> サブスクリプションリストAPIは、加盟店がすべてのアクティブ、キャンセル済み、または期限切れのサブスクリプションのリストを取得できるようにし、顧客のサブスクリプション状況を概観します。

### 備考

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

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

### 重要なポイント

<Info>
  ### サブスクリプションデータを取得

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

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

  * サブスクリプションID

  * プラン名と説明

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

  * 開始日と終了日

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

  * 試用期間と割引情報（該当する場合）。
</Info>


## OpenAPI

````yaml /api-reference/jp/open-api-config/subscription/subscription-list.json GET /api/v1/server-to-server-interface/subscription/list
openapi: 3.0.1
info:
  title: Payment Options API
  description: API for generating Hosted Payment Page (HPP) links and processing payments.
  version: 1.0.0
servers:
  - url: https://api-dev.paymentoptions.com
security:
  - apiKeyAuth: []
    xApiKeyAuth: []
paths:
  /api/v1/server-to-server-interface/subscription/list:
    get:
      summary: サブスクリプション一覧を取得
      description: このエンドポイントは、サブスクリプションの一覧とその詳細を取得します。
      operationId: getSubscriptionList
      responses:
        '200':
          description: サブスクリプションの詳細を含む成功した応答。
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: 取引が成功したかどうかを示します。
                    example: true
                  status_code:
                    type: integer
                    description: 応答のHTTPステータスコード。
                    example: 200
                  is_live:
                    type: boolean
                    description: 取引が本番環境かテスト環境かを示します。
                    example: false
                  subscription_details:
                    type: array
                    description: サブスクリプションの詳細の一覧。
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: サブスクリプションID。
                          example: 2048b01c-1512-45b9-98fc-27aac4deabce
                        type:
                          type: string
                          description: サブスクリプションの種類（例：CYCLE または Unlimited）。
                          example: CYCLE
                        max_cycle_count:
                          type: integer
                          description: 最大請求サイクル数。
                          example: 10
                        status:
                          type: string
                          description: サブスクリプションのステータス。
                          example: ACTIVE
                        completed_payment_cycle:
                          type: integer
                          description: 完了した支払いサイクルの数。
                          example: 1
                        next_payment_date:
                          type: string
                          format: date-time
                          description: サブスクリプションの次回支払い日。
                          example: '2024-12-01T00:00:00.000Z'
                        next_payment_cycle:
                          type: integer
                          description: 次回の支払いサイクル番号。
                          example: 2
                        subscription_plan_details:
                          type: object
                          description: サブスクリプションプランの詳細。
                          properties:
                            name:
                              type: string
                              description: サブスクリプションプランの名前。
                              example: Three weeks plan
                            desc:
                              type: string
                              description: サブスクリプションプランの説明。
                              example: Billed every two days
                            billing_cycle_type:
                              type: string
                              description: 請求サイクルの種類（例：DAYS または MONTHS）。
                              example: DAYS
                            billing_cycle_interval:
                              type: integer
                              description: 請求サイクルの間隔。
                              example: 2
                            amount:
                              type: integer
                              description: サブスクリプションプランの支払い金額。
                              example: 1000
                            ccy:
                              type: string
                              description: サブスクリプション取引の通貨。
                              example: JPY
                            trial_period_duration:
                              type: string
                              description: トライアル期間の長さ（該当する場合）。
                              example: ''
                            trial_period_duration_type:
                              type: string
                              description: トライアル期間の種類（例：DAYS または MONTHS）。
                              example: NONE
                            plan_discount_percentage:
                              type: number
                              description: サブスクリプションプランの割引率。
                              example: 10
                            plan_discount_duration:
                              type: integer
                              description: 割引が適用される請求サイクルの期間。
                              example: 2
                        subscription_transaction_details:
                          type: array
                          description: サブスクリプションの取引詳細の一覧。
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                description: このサブスクリプション取引の取引ID。
                                example: 00a33a30-be2d-4d5a-8d4f-659a6999d2ff
                              ref:
                                type: integer
                                description: サブスクリプション取引の参照番号。
                                example: 69400
                              cycle:
                                type: integer
                                description: 取引の支払いサイクル番号。
                                example: 1
                              status:
                                type: string
                                description: サブスクリプション取引のステータス。
                                example: SUCCESSFUL
                              transaction_date:
                                type: string
                                format: date-time
                                description: サブスクリプション取引の日付。
                                example: '2024-11-30T00:00:00.000Z'
                              amount:
                                type: integer
                                description: 取引の支払い金額。
                                example: 900
                              ccy:
                                type: string
                                description: 取引の通貨。
                                example: JPY
                              event:
                                type: string
                                description: 取引のイベントタイプ（例：CAPTURED）。
                                example: CAPTURED
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
      description: 認証のためのAPIキー。形式：'Basic YOUR_API_KEY_HERE'
    xApiKeyAuth:
      type: apiKey
      name: x-api-key
      in: header
      description: x-api-key専用のAPIキー。

````