> ## 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は、加盟店が以前に一時停止されたサブスクリプションを再開し、顧客の請求サイクルと関連サービスを再開することを可能にします。

### 重要なポイント

<Info>
  ### サブスクリプションを再開

  * 加盟店はこのAPIを使用して以前に一時停止されたサブスクリプションを再開し、通常の請求とサービスを回復させます。

  * 再開後、サブスクリプションはアクティブな状態に戻り、今後の請求サイクルは元々予定されていた通りに進行します。

  ### 請求サイクルと状態

  * サブスクリプションはアクティブ状態に戻され、請求は中断した地点から再開されます。次の請求サイクルが到来している場合、自動的に処理されます。

  * 元のサブスクリプションで設定された割引や試用期間は、最初に設定された通りに継続されます。

  ### 必要なパラメータ

  * サブスクリプションID：再開するサブスクリプションの一意の識別子。
</Info>

## フローダイアグラム

<img src="https://mintcdn.com/dasdoc/kfo25CLU3J6KbVVp/images/timeline-diagram/flows-API-subs-resume-jp.svg?fit=max&auto=format&n=kfo25CLU3J6KbVVp&q=85&s=38110740d6c694700f804f7b6171cfdd" alt="Flow diagram image" width="1997" height="868" data-path="images/timeline-diagram/flows-API-subs-resume-jp.svg" />

## APIパラメータ


## OpenAPI

````yaml /api-reference/jp/open-api-config/subscription/resume-subscription.json  POST /api/v1/server-to-server-interface/subscription/{subscription_id}/resume
openapi: 3.0.1
info:
  title: Payment Options API
  description: ホストされた支払いページ（HPP）リンクを生成し、支払いを処理するためのAPI。
  version: 1.0.0
servers:
  - url: https://api-dev.paymentoptions.com
security:
  - apiKeyAuth: []
    xApiKeyAuth: []
paths:
  /api/v1/server-to-server-interface/subscription/{subscription_id}/resume:
    post:
      summary: サブスクリプションを再開
      description: このエンドポイントは、一時停止されたサブスクリプションをサブスクリプションIDを使用して再開します。
      operationId: resumeSubscription
      parameters:
        - name: subscription_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 36
            description: サブスクリプションの一意のサブスクリプションID。
          description: 'サブスクリプションのサブスクリプションID。例: 664dc930-88bd-4696-8807-5e0f1fedba0b。'
      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
                  gateway_response:
                    type: object
                    description: ゲートウェイからの応答の詳細。
                    properties:
                      version:
                        type: string
                        description: ゲートウェイのバージョン。
                        example: '1'
                      type:
                        type: string
                        description: '応答の種類（例: 情報応答の場合はINFO）。'
                        example: INFO
                      message:
                        type: string
                        description: ゲートウェイからのメッセージ応答。
                        example: Subscription Updated.
                      code:
                        type: string
                        description: ゲートウェイからの応答コード。
                        example: INFO3000
                  subscription_details:
                    type: object
                    description: サブスクリプションの詳細。
                    properties:
                      id:
                        type: string
                        description: サブスクリプションID。
                        example: 664dc930-88bd-4696-8807-5e0f1fedba0b
                      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
                      last_payment_status:
                        type: string
                        description: このサブスクリプションで行われた最新の支払いのステータス。
                        example: SUCCESSFUL
                      next_payment_date:
                        type: string
                        format: date-time
                        description: サブスクリプションの次回支払い日。
                        example: '2024-11-28T01:31:29.154Z'
                      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: 359f39bd-673a-47b3-b9ec-cbd6cd313b8e
                            ref:
                              type: integer
                              description: サブスクリプション取引の参照番号。
                              example: 74860
                            cycle:
                              type: integer
                              description: 取引の支払いサイクル番号。
                              example: 1
                            status:
                              type: string
                              description: サブスクリプション取引のステータス。
                              example: SUCCESSFUL
                            transaction_date:
                              type: string
                              format: date-time
                              description: サブスクリプション取引の日付。
                              example: '2024-11-26T01:31:29.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キー。

````