openapi: 3.0.2
info:
  title: fincode API
  description: |
    fincodeのAPIリファレンスです。\
    fincodeは決済情報のほか様々なリソースを管理できるため、リソース指向なREST APIをベースとしたインターフェイス設計のもとでAPIを提供しています。\
    APIの呼び出しにはAPIキーによる認証が必要であり、リクエストの際に`Authorization`ヘッダーに有効なAPIキーをセットすることで認証できます。
  version: 1.4.0
servers:
  - url: https://api.fincode.jp
    description: 本番環境
  - url: https://api.test.fincode.jp
    description: テスト環境
tags:
  - name: 文字コード
    description: |
      fincodeのリクエスト・レスポンスの文字コードはUTF-8が使用されます。
      | 文字コード | 備考 |
      | --- | --- |
      | UTF-8 | fincodeのリクエスト・レスポンスの文字コードはUTF-8が使用されます。 |
    x-trailTag: true
  - name: リクエストヘッダー
    description: |
      fincodeのAPIリクエストを行う際に指定可能なリクエストヘッダーの一覧です。
      | ヘッダー | 指定方法 | 説明 |
      | --- | --- | --- |
      | `Api-Version` | YYYYMMDD | APIのマイナーバージョンを指定できます。（現在は`20211001`）<br />指定が無い場合は最新のものが自動で使用されます。 |
      | `Authorization` | Bearer {{API キー}} <br />または Basic {{Base64エンコード済みAPIキー}} | APIキーを指定します。Bearer認証またはBasic認証が使用できます。|
      | `Content-Type` | application/json;charset=UTF-8 | リクエストボディのContent-Typeを指定します。 |
      | `idempotent_key`| UUID v4 | リクエストの冪等性を担保するためのキーを指定します。詳しくは[冪等処理](https://docs.fincode.jp/api#tag/%E5%86%AA%E7%AD%89%E5%87%A6%E7%90%86)で解説されています。 |
      | `Tenant-Shop-Id` | テナントのショップID | ※プラットフォーム向け<br />テナントショップの決済を行うときなど、プラットフォームショップがテナントショップとしてAPIを実行する場合、そのテナントのショップIDを指定します。|
  - name: ページネーション
    description: |
      一覧取得系のAPIは大量データの送信を防ぐためにページング機能が実装されています。\
      取得対象の件数が10件以上の場合、デフォルトでは最大10件まで取得します。\
      以降のデータを取得したい場合や10件以上のデータを取得したい場合、クエリパラメータでpageやlimitを指定することで取得できます。\
      また、取得したいデータを絞るために検索条件を指定することができます。検索できる項目は各APIによって異なります。

      | No | 項目名               | パラメータ    | 内容                               | デフォルト             | 範囲       | 処理条件                                                                                                       |
      |----|----------------------|---------------|------------------------------------|------------------------|------------|---------------------------------------------------------------------------------------------------------------|
      | 1  | 取得件数             | limit         | 1ページの最大件数                 | 10                     | 10-100     | 指定されない場合デフォルト値が適用されます。<br>データ範囲外はエラーになります。                                                                    |
      | 2  | ページ               | page          | ページ数                           | 1                      | 1-9999     | 指定されない場合デフォルト値が適用されます。<br>レスポンスのlast_page（最終ページ）より大きい数字を指定した場合はエラーを返却します。             |
      | 3  | 総件数のみフラグ     | count_only    | 総件数のみを取得する               | false                  | -          | trueが指定された場合は、指定された条件に合致するレコード総件数のみをレスポンスとして返却します。                                                    |
      | 4  | ソート               | sort          | ソート順の定義                     | APIのデフォルト値      | -          | sort=項目名1 [asc \| desc], 項目名2 [asc \| desc], …<br>例) sort=customer_id asc, customer_name asc, customer_email desc<br>指定がない場合は各API デフォルトのソート順となります。<br>指定された項目がないまたはフォーマットが不正な場合はエラーになります。<br>総件数のみフラグがtrueの場合、このリクエストは無視されます。 |

      ### サンプル①
      [顧客 一覧取得API](https://docs.fincode.jp/api#tag/%E9%A1%A7%E5%AE%A2/operation/retrieveCustomerList)で顧客IDを昇順にソートして、2ページ目のデータを取得する例
      ```txt
      https://api.test.fincode.jp/v1/customers?page=2&sort=id asc
      ```

      ### サンプル②
      [顧客 一覧取得API](https://docs.fincode.jp/api#tag/%E9%A1%A7%E5%AE%A2/operation/retrieveCustomerList)で検索条件で作成日を2023/06/28に限定して、2ページ目のデータを取得する例
      ```txt
      https://api.test.fincode.jp/v1/customers?page=2&created_from=2023/06/28&created_to=2023/06/28
      ```

      ### サンプル③
      [顧客 一覧取得API](https://docs.fincode.jp/api#tag/%E9%A1%A7%E5%AE%A2/operation/retrieveCustomerList)で顧客の総件数のみを取得する例
      ```txt
      https://api.test.fincode.jp/v1/customers?count_only=true
      ```
  - name: 冪等処理
    description: |
      加盟店様がAPIリクエストのリクエストヘッダー`idempotent_key`に冪等キー（任意）を設定することで、リクエストを一意に特定し、2回目以降のリクエストで同じ結果を返却します。
      本機能を利用すると同じリソースが誤って二重に作られてしまうような事態を避けることができます。

      UUIDv4形式で、リクエスト毎にユニークになるよう値を指定してください。  
      冪等キーの有効期限は30分です。

      ### サンプル
      ```txt
      idempotent_key: 1003d6af-9e68-4f4e-a916-663e29db5377
      ```
  - name: エラーオブジェクト
    description: |
      HTTPステータスコード`4xx`系と`5xx`系のエラーが発生した場合、API共通のエラーオブジェクトを返します。\
      `error_message`の値がエラー原因に該当します。内容に応じて修正してください。 \
      ※`error_message`は予告無く変更される場合があります。開発時の問題解決の為にご利用下さい。\
      \
      [DOCSのエラーコード一覧](https://docs.fincode.jp/develop_support/error)からも詳細を確認できます。

      ### サンプル, エラーは`errors`の値として配列形式でレスポンスされます。
      ```json
      {
          "errors": [
              {
                  "error_code": "E123456789",
                  "error_message": "エラー内容1"
              },
              {
                  "error_code": "E012345678",
                  "error_message": "エラー内容2"
              },
          ]
      }
      ```

      | パラメータ | | 説明 |
      | --- | --- | ---|
      | errors | | エラーオブジェクトの配列です。 |
      | | error_code | エラーコードです。プログラムで判定する場合はこちらを利用することが推奨されます。<br />詳細は[Docs > エラーコード一覧](https://docs.fincode.jp/develop_support/error)を参照してください。|
      | | error_message | エラーメッセージです。エラーの内容を示します。<br />この値は予告なく変更される可能性があります。|
  - name: エラー
    description: |
      APIリクエスト後、以下のHTTPステータスコードとともにレスポンスがされます。
      | ステータスコード | 意味 | 説明 |
      | --- | --- | --- |
      | 200              | OK                       | リクエストが成功しました。                                                                       |
      | 400              | Bad Request              | 不正なリクエストです。リクエストパラメータとJSONの形式を確認してください。                      |
      | 401              | Unauthorized             | 認証されていません。APIキーを確認してください。                                                  |
      | 403              | Forbidden                | APIを使用する権限がありません。アクセス先を確認してください。または流量制限を超えている可能性があります。リクエストレートを減らしてください。 |
      | 404              | Not Found                | 指定したAPIが存在しません。アクセス先を確認してください。                                        |
      | 405              | Method Not Allowed       | 無効なHTTPメソッドへの要求です。HTTPメソッドを確認してください。                                 |
      | 406              | Not Acceptable           | 要求されたリソースが受け入れられないコンテンツしか生成できないことを意味します。Acceptヘッダーを確認してください。 |
      | 409              | Conflict                 | リソースの競合が発生しています。要求を処理できませんでした。                                      |
      | 413              | Payload Too Large        | 送信できるファイルサイズの上限を超えています。                                                   |
      | 415              | Unsupported Media Type   | サーバーまたはリソースがサポートしていないメディアタイプが指定されました。リクエストヘッダーのメディアタイプを確認してください。 |
      | 500              | Internal Server Error    | サーバーでエラーが発生したため、要求を完了できませんでした。                                      |
      | 502              | Bad Gateway              | ゲートウェイエラーです。プロキシサーバーの使用中など、あるサーバーが別のサーバーから無効なリクエストを受信したことを意味します。 |
      | 503              | Service Unavailable      | メンテナンス中による流入制限です。                                                               |
      | 504              | Gateway Timeout          | ゲートウェイタイムアウトが発生しました。                                                         |
  - name: 顧客
    description: |
      顧客を管理するAPIです。fincodeにおける顧客は多くのアプリケーションにおいて購入者となるユーザーアカウントに1:1で紐づけられます。\
      顧客には名前やメールアドレス、請求先住所を登録し管理でき、決済やカード情報・決済手段などのリソースが関連付けられます。
  - name: カード
    description: |
      顧客が持つカードを管理するAPIです。\
      カードにはクレジットカード/デビッドカード/プリペイドカードの有効期限や名義などの情報が含まれており、決済の実行時にカードのIDを指定することでそのカードに対して請求（決済）を行います。\
      \
      1つの顧客に対してカード情報は最大5件まで登録可能です。5件登録している状態で新しいカードを登録する場合は、既存のカードを削除してから再度登録してください。\
      \
      ※ カード登録時に3Dセキュア認証を行う場合は、[決済手段 登録API](#tag/PaymentMethod/operation/createCustomerPaymentMethod)を使用します。
  - name: 決済手段
    description: |
      顧客が持つ決済手段（*Payment Method*）を管理するAPIです。\
      決済実行の際に決済手段のIDを指定することで、その決済手段に対し請求（決済）をします。\
      \
      決済手段オブジェクトは`pay_type`パラメータの値によって下記の情報を表現します。

      - `Card`: この決済手段はカードを表します。`card`パラメータ内にカードに関する詳細な情報が含まれます。
      - `Directdebit`: この決済手段は口座振替における振替用口座を表します。`directdebit`パラメータ内に口座に関する詳細な情報が含まれます。
      - `Virtualaccount`: この決済手段は銀行振込（バーチャル口座）を表します。`virtualaccount`パラメータ内に口座に関する詳細な情報が含まれます。
      - `Paypay`: この決済手段は継続課金のために連携された購入者のPayPayアカウントを表します。購入者による連携（認可）が完了し`status`が`ACTIVATED`になると、QRコードの提示なしで課金できます。

      1つの顧客に対して同一`pay_type`の決済手段は最大5件まで登録可能です。5件登録している状態で新しい決済手段を登録する場合は、既存の決済手段を削除してから再度登録してください。\
      ※ `Paypay`の場合は決済方式（`paypay_method`）ごとに最大10件まで登録可能です。\
      \
      ※カード情報の操作はカードAPIでも可能ですが、今後は非推奨となる予定です。新規実装および機能追加を行う場合は、決済手段APIの利用を推奨します。\
      \
      [更に詳しく解説したドキュメントをこちらから参照できます。](https://docs.fincode.jp/payment/payment_method)
  - name: 決済
    description: |
      決済を行うAPIです。\
      決済 登録APIで決済情報をfincodeに登録し、決済 実行APIで実際に購入者（顧客）に対して請求を行います。\
      \
      決済手段によっては決済実行後、3Dセキュア認証や購入者による現金払い込みなどが必要になります。
  - name: 3Dセキュア認証
    description: |
      3Dセキュア認証を行うAPIです。\
      3Dセキュア認証はカード決済において不正利用を防止するために使用される本人認証の仕組みです。\
      \
      決済実行後、購入者が`acs_url`にアクセスすると、ブラウザ情報がfincodeへ送信され認証プロセスが開始します。認証のプロセスと実装のフローに関しては[Docs > 3Dセキュア2.0認証を使用する](https://docs.fincode.jp/payment/fraud_protection/3d_secure_2)から参照できます。
  - name: リダイレクト型決済
    description: |
      fincodeが提供するリダイレクト型決済URLを作成するAPIです。\
      リクエスト時に`guide_mail_send_flag`（決済メール送信フラグ）に`1`（送信する）を指定することでリダイレクト型決済URLを添付したメールをfincodeから送信させられます。
  - name: リダイレクト型カード登録
    description: |
      リダイレクト型カード登録URLを作成するAPIです。

      - 顧客ID（`customer_id`）を指定して作成した場合、その顧客に対してカードを登録するためのカード登録URLを発行します。
      - 顧客IDを指定しなかった場合、顧客を新たに作成しその顧客に対してカードを登録するためのカード登録URLを発行します。

      リクエスト時に`guide_mail_send_flag`（登録メール送信フラグ）に`1`（送信する）を指定することでリダイレクト型カード登録URLを添付したメールをfincodeから送信させられます。
  - name: プラン
    description: |
      サブスクリプションのプランを管理するAPIです。\
      サブスクリプション請求の金額・間隔・頻度などのプラン情報を登録・取得・更新・削除できます。
  - name: サブスクリプション
    description: |
      サブスクリプションを管理するAPIです。\
      指定した顧客に対して指定したプランで定期・定額で請求を行うサブスクリプションを登録・更新・削除できるほか、結果照会APIを用いてあるサブスクリプションによって発生した毎回の課金の結果を一覧で取得することもできます。\
      \
      サブスクリプション課金の処理は非同期で行われ、Webhookイベント`recurring.card.batch`（サブスクリプション課金（カード決済） 実行）や`recurring.directdebit.batch`（サブスクリプション課金（口座振替） 実行）で課金結果を受け取ることができます。
  - name: 一括決済
    description: |
      一括決済を行うAPIです。\
      数千・数万件単位の決済を1回のリクエストで登録・予約することができ、従量課金のビジネスモデルの構築などに利用できます。\
      \
      一括決済の処理は非同期で行われ、Webhookイベント`payments.bulk.*.batch`（一括決済課金 実行）で課金結果を受け取ることができます。
  - name: インボイス機能
    description: |
      インボイス機能に関するAPI群です。\
      機能の詳細は[こちら](/payment/invoice)をご確認ください。\
      インボイス情報をもとに決済機能付きの請求書と領収書が発行されます。
  - name: 売上入金
    description: |
      ショップの売上入金を取得できます。\
      また、ある売上入金の詳細情報を取得し、取引1件ごとの入金額への影響を確認することもできます。
  - name: プラットフォーム利用料収入
    description: |
      プラットフォーム利用料による売上入金を取得できます。\
      また、ある売上入金のIDを指定して、テナントショップごとの入金のサマリー情報を一覧取得することもできます。
  - name: チャージバック
    description: |
      チャージバックに関する情報を取得できるAPIです。\
      チャージバックに関する詳細は[Docs](https://docs.fincode.jp/business_management/chargeback)をご確認ください。

      ショップ管理画面のチャージバックステータスは、APIの`status_code`と`canceled`パラメータで取得できます。\
      ステータスごとの対応は以下の通りです。

      **要対応**
      - `status_code`: 4005
      - `canceled`: 使用なし

      **回答済み**
      - `status_code`: 4006、4007、4011
      - `canceled`: 使用なし

      **売上返還確定**
      - `status_code`: 4009
      - `canceled`: false

      **その他（確定後取消）**
      - `status_code`: 4009
      - `canceled`: true
  - name: プラットフォームショップ
    description: |
      プラットフォームショップ（メインショップ・サブショップ）の設定を管理するAPIです。\
      テナントに対し適用するプラットフォーム利用料金の設定や、プラットフォームショップの一覧取得などができます。
  - name: テナントショップ
    description: |
      テナントショップの設定を管理するAPIです。\
      テナントに対し適用するプラットフォーム利用料金の設定や、テナントショップの一覧取得などができます。
  - name: テナント申請管理
    description: |
      テナントショップの新規作成や審査情報の提出、販売免許等のアップロードなどを行えるAPIです。\
      \
      <span class="attension">このAPIの利用について</span>\
      このAPIを本番環境で利用するためにはfincodeへの申請が必要です。利用を希望する場合は[問い合わせフォーム](https://form.fincode.jp/contact) からテナント申請管理APIを利用するサービスの概要をお知らせの上、機能開放をリクエストしてください。（テスト環境では常時利用できます。）
  - name: 社印
    description: |
      ショップに紐づく社印を管理するAPIです。\
      登録された社印は、インボイス機能などで発行される請求書・領収書・インボイスWEBページに自動で押印されます。\
      画像はマルチパート形式でアップロードします。サポートする拡張子は `png` / `jpg` / `jpeg` です。
  - name: Webhook設定
    description: |
      Webhook設定を管理するAPIです。\
      fincode上で指定したイベントが発生した場合、指定したエンドポイントでリアルタイムで通知を受け取れます。\
      [Webhook通知仕様はこちら](https://docs.fincode.jp/api#tag/Webhook_)\
      \
      ※1 テナントのイベントを受けとるためにはテナントごとにWebhook設定を登録する必要があります。

      | 機能                         | イベント名                  | イベントパラメータ                         |
      |----------------------------|--------------------------|-----------------------------------------|
      | カード決済                     | 決済登録                     | payments.card.regist                   |
      | カード決済                     | 決済実行                     | payments.card.exec                     |
      | カード決済                     | 売上確定                     | payments.card.capture                  |
      | カード決済                     | キャンセル                     | payments.card.cancel                   |
      | カード決済                     | 再オーソリ                     | payments.card.auth                     |
      | カード決済                     | 金額変更                     | payments.card.change                   |
      | 3Dセキュア（カード決済）                     | 認証実行                     | payments.card.secure2.authenticate     |
      | 3Dセキュア（カード決済）                     | チャレンジ結果確定               | payments.card.secure2.result           |
      | 3Dセキュア（カード決済）                     | 認証後決済実行                 | payments.card.secure                   |
      | Apple Pay                   | 決済登録                     | payments.applepay.regist               |
      | Apple Pay                   | 決済実行                     | payments.applepay.exec                 |
      | Apple Pay                   | 売上確定                     | payments.applepay.capture              |
      | Apple Pay                   | キャンセル                     | payments.applepay.cancel               |
      | Google Pay                     | 決済登録                     | payments.googlepay.regist                   |
      | Google Pay                     | 決済実行                     | payments.googlepay.exec                     |
      | Google Pay                     | 売上確定                     | payments.googlepay.capture                  |
      | Google Pay                     | キャンセル                     | payments.googlepay.cancel                   |
      | Google Pay                     | 再オーソリ                     | payments.googlepay.auth                     |
      | Google Pay                     | 金額変更                     | payments.googlepay.change                   |
      | 3Dセキュア（Google Pay）                     | 認証実行                     | payments.googlepay.secure2.authenticate     |
      | 3Dセキュア（Google Pay）                     | チャレンジ結果確定               | payments.googlepay.secure2.result           |
      | 3Dセキュア（Google Pay）                     | 認証後決済実行                 | payments.googlepay.secure                   |
      | コンビニ決済                   | 決済登録                     | payments.konbini.regist                |
      | コンビニ決済                   | 決済実行                     | payments.konbini.exec                  |
      | コンビニ決済                   | キャンセル                     | payments.konbini.cancel                |
      | コンビニ決済                   | 支払通知                     | payments.konbini.complete              |
      | コンビニ決済                   | 支払通知（シミュレート）         | payments.konbini.complete.stub         |
      | コンビニ決済                   | 支払い期限切れ                 | konbini.expired.update.batch           |
      | PayPay                      | 決済登録                     | payments.paypay.regist                 |
      | PayPay                      | 決済実行                     | payments.paypay.exec                   |
      | PayPay                      | 売上確定                     | payments.paypay.capture                |
      | PayPay                      | キャンセル                     | payments.paypay.cancel                 |
      | PayPay                      | 金額変更                     | payments.paypay.change                 |
      | PayPay                      | 支払通知                     | payments.paypay.complete               |
      | 口座振替                     | 決済登録                     | payments.directdebit.regist            |
      | 口座振替                     | 決済実行                     | payments.directdebit.exec              |
      | 口座振替                     | キャンセル                     | payments.directdebit.cancel            |
      | 口座振替                     | 金額変更                     | payments.directdebit.change            |
      | 口座振替                     | 引き落とし通知                 | payments.directdebit.complete          |
      | 口座振替                     | 引き落とし通知（シミュレート）     | payments.directdebit.complete.stub     |
      | 銀行振込（バーチャル口座）      | 決済登録                     | payments.virtualaccount.regist         |
      | 銀行振込（バーチャル口座）      | 決済実行                     | payments.virtualaccount.exec           |
      | 銀行振込（バーチャル口座）      | キャンセル                     | payments.virtualaccount.cancel         |
      | 銀行振込（バーチャル口座）      | 支払通知                 | payments.virtualaccount.complete       |
      | 銀行振込（バーチャル口座）      | 支払通知（シミュレート）     | payments.virtualaccount.complete.stub  |
      | 決済手段（※3）                     | 登録                        | customers.payment_methods.created      |
      | 決済手段（※2）                     | 更新                        | customers.payment_methods.updated      |
      | 決済手段（※3）                     | 停止                        | customers.payment_methods.inactivated  |
      | 決済手段（※3）                     | 再有効化                        | customers.payment_methods.activated    |
      | 決済手段（※3）                     | 削除                        | customers.payment_methods.deleted      |
      | カード（※2）                       | 登録                        | card.regist                            |
      | カード                       | 更新                        | card.update                            |
      | カード                       | カード更新機能（洗替）                 | card.updater.complete                  |
      | サブスクリプション（カード決済）  | 登録                        | subscription.card.regist               |
      | サブスクリプション（カード決済）  | 解約                        | subscription.card.delete               |
      | サブスクリプション（カード決済）  | 更新                        | subscription.card.update               |
      | サブスクリプション課金（カード決済）| 実行                        | recurring.card.batch                   |
      | サブスクリプション（口座振替）      | 登録                        | subscription.directdebit.regist        |
      | サブスクリプション（口座振替）      | 解約                        | subscription.directdebit.delete        |
      | サブスクリプション（口座振替）      | 更新                        | subscription.directdebit.update        |
      | サブスクリプション課金（口座振替）  | 実行                        | recurring.directdebit.batch            |
      | サブスクリプション（PayPay）        | 登録                        | subscription.paypay.regist             |
      | サブスクリプション（PayPay）        | 解約                        | subscription.paypay.delete             |
      | サブスクリプション（PayPay）        | 更新                        | subscription.paypay.update             |
      | サブスクリプション課金（PayPay）  | 実行                        | recurring.paypay.batch                 |
      | 一括決済（カード決済）           | 登録                        | payments.bulk.card.regist              |
      | 一括決済課金（カード決済）         | 実行                        | payments.bulk.card.batch               |
      | 一括決済（バーチャル口座）           | 登録                        | payments.bulk.virtualaccount.regist              |
      | 一括決済課金（バーチャル口座）         | 実行                        | payments.bulk.virtualaccount.batch               |
      | 決済手段 契約状況              | 更新                        | contracts.status_code.updated          |
      | チャージバック                 | 登録                        | charge_backs.regist                    |
      | チャージバック                 | 更新                        | charge_backs.update                    |
      | 変更申請                       | 登録                        | change_requests.regist                 |
      | 変更申請                       | 更新                        | change_requests.update                 |

      ※2 リダイレクト型カード登録APIの結果通知を受け取るには決済手段 更新（customers.payment_methods.updated）のWebhook設定を登録する必要があります。\
      ※3 このイベントにおいて通知される決済手段はバーチャル口座のみです。カード、口座振替は通知されません。
  - name: Webhook_通知仕様
    description: |
      イベントが発生したときに、fincodeから加盟店様が設定したエンドポイントURLへWebhookのリクエストを送信するときの仕様です。\
      [イベント一覧はこちら](https://docs.fincode.jp/api#tag/Webhook)\
      ※通知対象のパラメータは、機能追加等に伴い追加される可能性があります。\
      ※予告なくパラメータ名の変更、削除が行われることはありません。\
      \
      Webhookを利用する場合は、正常受信または受信失敗のレスポンスをWebhookのリクエストに対して返却する必要があります。\
      Webhookのリクエストがエラーで失敗した場合は、リトライ仕様に従って再送します。
externalDocs:
  description: fincodeJSの仕様はこちらの JSリファレンス から確認できます。
  url: /js
paths:
  /v1/customers:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createCustomer
      tags:
        - 顧客
      summary: 顧客 登録
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップに紐づく形で顧客情報を登録します。
      description: |
        顧客情報を登録します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "name": "John Doe",
                "email": "john@example.com"
            }' \
            'https://api.test.fincode.jp/v1/customers'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const customer = await fincode.customers.create({
                        name: "John Doe",
                        email: "john@example.com",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := CreatingCustomerRequest{\n\t\tEmail:   stringPointer(\"john@example.com\"),\n\t\tName:    stringPointer(\"John Doe\"),\n\t\tPhoneCC: stringPointer(\"81\"),\n\t\tPhoneNo: stringPointer(\"1234567890\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", \"https://api.test.fincode.jp/v1/customers\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingCustomerRequest struct {\n\tID           *string `json:\"id,omitempty\"`\n\tName         *string `json:\"name,omitempty\"`\n\tEmail        *string `json:\"email,omitempty\"`\n\tPhoneCC      *string `json:\"phone_cc,omitempty\"`\n\tPhoneNo      *string `json:\"phone_no,omitempty\"`\n\tAddrCity     *string `json:\"addr_city,omitempty\"`\n\tAddrCountry  *string `json:\"addr_country,omitempty\"`\n\tAddrLine1    *string `json:\"addr_line_1,omitempty\"`\n\tAddrLine2    *string `json:\"addr_line_2,omitempty\"`\n\tAddrLine3    *string `json:\"addr_line_3,omitempty\"`\n\tAddrPostCode *string `json:\"addr_post_code,omitempty\"`\n\tAddrState    *string `json:\"addr_state,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "name" => "John Doe",
                "email" => "john@example.com"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/customers'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "name": "John Doe",
                "email": "john@example.com"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/customers"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    name: "John Doe",
                    email: "john@example.com",
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveCustomerList
      tags:
        - 顧客
      summary: 顧客 一覧取得
      description: |
        顧客情報を一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - in: query
          name: クエリ
          description: |
            顧客情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/Customer.ListRetrieving.QueryParams'
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客から一覧で取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const customers = await fincode.customers.retrieveList({
                        limit: 10,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", \"https://api.test.fincode.jp/v1/customers\", nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers";
            $queryParams = [
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/customers'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }
            query_params = { 'limit': 10 }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/customers"
                query_params =  { limit: 10 }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/customers/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveCustomer
      tags:
        - 顧客
      summary: 顧客 取得
      description: |
        IDで指定した顧客情報を取得します。
      parameters:
        - name: id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客情報を取得します。
          required: false
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const customerId = "<Customer ID>";

                try {
                    // リクエストの送信
                    const customer = await fincode.customers.retrieve(customerId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s\", customerID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                endpoint = "/v1/customers/#{customer_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updateCustomer
      tags:
        - 顧客
      summary: 顧客 更新
      description: |
        IDで指定した顧客情報を更新します。
      parameters:
        - name: id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客情報を更新します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "name": "Jane Doe",
                "email": "jane@example.com"
            }' \
            'https://api.test.fincode.jp/v1/customers/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const customerId = "<Customer ID>";

                try {
                    // リクエストの送信
                    const customer = await fincode.customers.update(customerId, {
                        name: "Jane Doe",
                        email: "jane@example.com",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\tbody := UpdatingCustomerRequest{\n\t\tName:  stringPointer(\"Jane Doe\"),\n\t\tEmail: stringPointer(\"jane@example.com\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s\", customerID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingCustomerRequest struct {\n\tName         *string `json:\"name,omitempty\"`\n\tEmail        *string `json:\"email,omitempty\"`\n\tPhoneCC      *string `json:\"phone_cc,omitempty\"`\n\tPhoneNo      *string `json:\"phone_no,omitempty\"`\n\tAddrCity     *string `json:\"addr_city,omitempty\"`\n\tAddrCountry  *string `json:\"addr_country,omitempty\"`\n\tAddrLine1    *string `json:\"addr_line_1,omitempty\"`\n\tAddrLine2    *string `json:\"addr_line_2,omitempty\"`\n\tAddrLine3    *string `json:\"addr_line_3,omitempty\"`\n\tAddrPostCode *string `json:\"addr_post_code,omitempty\"`\n\tAddrState    *string `json:\"addr_state,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';


            $customerId = '<Customer ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "name" => "Jane Doe",
                "email" => "jane@example.com"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "name": "Jane Doe",
                "email": "jane@example.com"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                endpoint = "/v1/customers/#{customer_id}"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    name: 'Jane Doe',
                    email: 'jane@example.com',
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    delete:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: deleteCustomer
      tags:
        - 顧客
      summary: 顧客 削除
      description: |
        IDで指定した顧客情報を削除します。
      parameters:
        - name: id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客情報を削除します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer.Deleting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const customerId = "<Customer ID>";

                try {
                    // リクエストの送信
                    const result = await fincode.customers.delete(customerId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"DELETE\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s\", customerID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'DELETE');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.delete(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'

                endpoint = "/v1/customers/#{customer_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Delete.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/customers/{customer_id}/cards:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - カード
      operationId: createCustomerCard
      summary: カード 登録
      description: |
        `customer_id`で指定した顧客に対しカードを登録します。

        <span class="smallText">※ カードの登録は決済手段API（<code>POST /v1/customers/{customer_id}/payment_methods</code>, <code>pay_type = "Card"</code>）でも行えます。新規に実装する場合は、口座振替・銀行振込（バーチャル口座）と同じ形式で扱える決済手段APIの利用を推奨します。</span>
      parameters:
        - name: customer_id
          in: path
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          description: このカードが紐づく顧客のID
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に対してカードを登録します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerCard.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerCard.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "default_flag": "1",
                "token": "<Token from fincodeJS>"
            }' \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/cards'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const customerId = "<Customer ID>";

                try {
                    // リクエストの送信
                    const card = await fincode.cards.create(customerId, {
                        token: "<Token from fincodeJS>",
                        default_flag: "1",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\n\tbody := CreatingCustomerCardRequest{\n\t\tToken:       \"<Token from fincodeJS>\",\n\t\tDefaultFlag: \"0\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/cards\", customerID), bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingCustomerCardRequest struct {\n\tDefaultFlag string `json:\"default_flag\"`\n\tToken       string `json:\"token\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/cards";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "token" => "613531623566356561366261346366623132306663393139",
                "default_flag" => "1"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/cards'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "token": "<Token from fincodeJS>",
                "default_flag": "1",
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                endpoint = "/v1/customers/#{customer_id}/cards"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    token: '<Token from fincodeJS>',
                    default_flag: '1'
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    get:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - カード
      operationId: retrieveCustomerCardList
      summary: カード 一覧取得
      description: |
        `customer_id`で指定した顧客に対し紐づくカードを一覧で取得します。

        <span class="smallText">※ カード情報の一覧は決済手段API（<code>GET /v1/customers/{customer_id}/payment_methods</code>, <code>pay_type = "Card"</code>）でも取得できます。新規に実装する場合は決済手段APIの利用を推奨します。</span>
      parameters:
        - name: customer_id
          in: path
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          description: |
            顧客ID。 \
            この顧客に紐づくカードを一覧で取得します。
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に対して登録されたカードの一覧を取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerCard.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/cards'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const customerId = "<Customer ID>";

                try {
                    // リクエストの送信
                    const cards = await fincode.cards.retrieveList(customerId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/cards\", customerID), nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/cards";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            from calendar import c
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/cards'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                endpoint = "/v1/customers/#{customer_id}/cards"

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/customers/{customer_id}/cards/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - カード
      operationId: retrieveCustomerCard
      summary: カード 取得
      description: |
        `customer_id`で指定した顧客に対し紐づくカードのうち`id`で指定したものを取得します。

        <span class="smallText">※ カード情報の取得は決済手段API（<code>GET /v1/customers/{customer_id}/payment_methods/{id}</code>, <code>pay_type = "Card"</code>）でも行えます。新規に実装する場合は決済手段APIの利用を推奨します。</span>
      parameters:
        - name: customer_id
          in: path
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          description: このカードが紐づく顧客のID
          required: true
        - name: id
          in: path
          schema:
            allOf:
              - $ref: '#/components/schemas/CardId_schema'
          description: 取得するカードのID
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に対して登録されたカードから取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerCard.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/cards/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const customerId = "<Customer ID>";
                const cardId = "<Card ID>";

                try {
                    // リクエストの送信
                    const card = await fincode.cards.retrieve(customerId, cardId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\tcardID := \"<Card ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/cards/%s\", customerID, cardID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';
            $cardId = '<Card ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/cards/{$cardId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'
            card_id = '<Card ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/cards/{card_id}/'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                card_id = '<Card ID>'
                
                endpoint = "/v1/customers/#{customer_id}/cards/#{card_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - カード
      operationId: updateCustomerCard
      summary: カード 更新
      description: |
        `customer_id`で指定した顧客に対し紐づくカードのうち`id`で指定したものを更新します。

        <span class="smallText">※ カード情報の更新は決済手段API（<code>PUT /v1/customers/{customer_id}/payment_methods/{id}</code>, <code>pay_type = "Card"</code>）でも行えます。新規に実装する場合は決済手段APIの利用を推奨します。</span>
      parameters:
        - name: customer_id
          in: path
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          description: このカードが紐づく顧客のID
          required: true
        - name: id
          in: path
          schema:
            allOf:
              - $ref: '#/components/schemas/CardId_schema'
          description: 更新するカードのID
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に対して登録されたカードの情報を更新します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerCard.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerCard.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "default_flag": "1",
            }' \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/cards/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const customerId = "<Customer ID>";
                const cardId = "<Card ID>";

                try {
                    // リクエストの送信
                    const card = await fincode.cards.update(customerId, cardId, {
                        default_flag: "0",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := UpdatingCustomerCardRequest{\n\t\tDefaultFlag: stringPointer(\"1\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.test.fincode.jp/v1/customers/{customer_id}/cards/{id}\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingCustomerCardRequest struct {\n\tDefaultFlag *string `json:\"default_flag,omitempty\"`\n\tToken       *string `json:\"token,omitempty\"`\n\tHolderName  *string `json:\"holder_name,omitempty\"`\n\tExpire      *string `json:\"expire,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';
            $cardId = '<Card ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/cards/{$cardId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $data = json_encode([
                "default_flag" => "0"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'
            card_id = '<Card ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/cards/{card_id}/'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "default_flag": "0",
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                card_id = '<Card ID>'

                endpoint = "/v1/customers/#{customer_id}/cards/#{card_id}"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    default_flag: '0'
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    delete:
      tags:
        - カード
      operationId: deleteCustomerCard
      summary: カード 削除
      description: |
        `customer_id`で指定した顧客に対し紐づくカードのうち`id`で指定したものを削除します。

        <span class="smallText">※ カード情報の削除は決済手段API（<code>DELETE /v1/customers/{customer_id}/payment_methods/{id}</code>, <code>pay_type = "Card"</code>）でも行えます。新規に実装する場合は決済手段APIの利用を推奨します。</span>
      parameters:
        - name: customer_id
          in: path
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          description: このカードが紐づく顧客のID
          required: true
        - name: id
          in: path
          schema:
            allOf:
              - $ref: '#/components/schemas/CardId_schema'
          description: 削除するカードのID
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に対して登録されたカードを削除します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerCard.Deleting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/cards/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const customerId = "<Customer ID>";
                const cardId = "<Card ID>";

                try {
                    // リクエストの送信
                    const result = await fincode.cards.delete(customerId, cardId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\tcardID := \"<Card ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"DELETE\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/cards/%s\", customerID, cardID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';
            $cardId = '<Card ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/cards/{$cardId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'DELETE');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'
            card_id = '<Card ID>' 

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/cards/{card_id}/'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.delete(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                card_id = '<Card ID>'

                endpoint = "/v1/customers/#{customer_id}/cards/#{card_id}"

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Delete.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/cards:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - カード
      operationId: retrieveCardList
      summary: カード 一覧取得（顧客情報共有グループ単位）
      description: |
        顧客情報共有グループ単位でカード情報を一覧取得する API
      parameters:
        - in: query
          name: クエリ
          description: |
            カード情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/Card.ListRetrieving.QueryParams'
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客情報共有グループのカード情報から一覧で取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Card.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/cards?limit=10&page=1&customer_id=<Customer ID>'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const endpoint = new URL(`${BASE_URL}/v1/cards`);
                endpoint.search = new URLSearchParams({
                    limit: "10",
                    page: "1",
                    customer_id: "<Customer ID>",
                }).toString();

                const response = await fetch(endpoint, {
                    method: "GET",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });
                const cards = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", \"https://api.test.fincode.jp/v1/cards\", nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\tparams.Add(\"page\", \"1\")\n\tparams.Add(\"customer_id\", \"<Customer ID>\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/cards";
            $queryParams = [
                "limit" => 10,
                "page" => 1,
                "customer_id" => '<Customer ID>',
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/cards'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }
            query_params = {
                'limit': 10,
                'page': 1,
                'customer_id': '<Customer ID>',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/cards"
                query_params = {
                    limit: 10,
                    page: 1,
                    customer_id: '<Customer ID>'
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/customers/{customer_id}/payment_methods:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createCustomerPaymentMethod
      tags:
        - 決済手段
      summary: 決済手段 登録
      description: |
        `customer_id`で指定した顧客に対し、決済手段を登録します。
        <span class="smallText">
        \
        \
        **PayPayアカウントを連携する場合（`pay_type = Paypay`）**\
        \
        このAPIの時点では連携は完了しません。レスポンスの認可URL（`redirect_url`）へ購入者を遷移させ、購入者がPayPayアプリで連携を承認すると`status`が`ACTIVATED`になり、継続課金に利用できるようになります。\
        連携の完了は結果通知（`customers.payment_methods.updated`）または決済手段取得APIで確認してください。\
        \
        購入者が承認しなかった場合や認可画面の有効期限が切れた場合は`status`が`FAILED`になります。この場合は新規登録ではなく、決済手段更新APIの再認可（`reauth`）で同じ決済手段IDのまま認可URLを再発行できます。\
        \
        1人の顧客に対して連携できるPayPayアカウントは、決済方式（`paypay_method`）ごとに最大10件です。
        </span>
      parameters:
        - name: customer_id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に対して決済手段を登録します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerPaymentMethod.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaymentMethod.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Directdebit",
                "default_flag": "1",
                "return_url": "https://your-service.example.com/return",
                "directdebit":  {
                    "application_type": "ONLINE",
                    "bank_code": "0310",
                    "branch_code": "000",
                    "account_type": "1",
                    "account_number": "0999999",
                    "account_name_kana": "ナマエカナ"
                }
            }' \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods'
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\n\tbody := CreatingPaymentMethodRequest{\n\t\tPayType:     \"Directdebit\",\n\t\tDefaultFlag: \"1\",\n\t\tReturnURL:   \"https://your-service.example.com/return\",\n\t\tDirectdebit: Directdebit{\n\t\t\tApplicationType: \"ONLINE\",\n\t\t\tBankCode:        \"0310\",\n\t\t\tBranchCode:      stringPointer(\"000\"),\n\t\t\tAccountType:     stringPointer(\"1\"),\n\t\t\tAccountNumber:   stringPointer(\"0999999\"),\n\t\t\tAccountNameKana: \"ナマエカナ\",\n\t\t},\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\turl := fmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/payment_methods\", customerID)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"POST\",\n\t\turl,\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingPaymentMethodRequest struct {\n\tPayType     string      `json:\"pay_type\"`\n\tDefaultFlag string      `json:\"default_flag\"`\n\tDirectdebit Directdebit `json:\"directdebit\"`\n\tReturnURL   string      `json:\"return_url\"`\n}\n\ntype Directdebit struct {\n\tApplicationType  string            `json:\"application_type\"`\n\tBankCode         string            `json:\"bank_code\"`\n\tBranchCode       *string           `json:\"branch_code,omitempty\"`\n\tAccountType      *string           `json:\"account_type,omitempty\"`\n\tAccountNumber    *string           `json:\"account_number,omitempty\"`\n\tAccountName      *string           `json:\"account_name,omitempty\"`\n\tAccountNameKana  string            `json:\"account_name_kana\"`\n\tPaperApplication *PaperApplication `json:\"paper_application,omitempty\"`\n}\n\ntype PaperApplication struct {\n\tPostalAccountNumber1 *string `json:\"postal_account_number_1,omitempty\"`\n\tPostalAccountNumber2 *string `json:\"postal_account_number_2,omitempty\"`\n\tRequestFormId        string  `json:\"request_form_id\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const customerId = "<Customer ID>";

                const endpoint = `${BASE_URL}/v1/customers/${customerId}/payment_methods`;

                const response = await fetch(endpoint, {
                    method: "POST",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                    body: JSON.stringify({
                        pay_type: "Directdebit",
                        default_flag: "1",
                        return_url: "https://your-service.example.com/return",
                        directdebit: {
                            application_type: "ONLINE",
                            bank_code: "0310",
                            branch_code: "000",
                            account_type: "1",
                            account_number: "0999999",
                            account_name_kana: "ナマエカナ",
                        },
                    }),
                });
                const paymentMethods = await response.json();
            })();
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/payment_methods";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "Directdebit",
                "default_flag" => "1",
                "return_url" => "https://your-service.example.com/return",
                "directdebit" => [
                    "application_type" => "ONLINE",
                    "bank_code" => "0310",
                    "branch_code" => "000",
                    "account_type" => "1",
                    "account_number" => "0999999",
                    "account_name_kana" => "ナマエカナ"
                ]
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Directdebit",
                "default_flag": "1",
                "return_url": "https://your-service.example.com/return",
                "directdebit": {
                    "application_type": "ONLINE",
                    "bank_code": "0310",
                    "branch_code": "000",
                    "account_type": "1",
                    "account_number": "0999999",
                    "account_name_kana": "ナマエカナ"
                }
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                endpoint = "/v1/customers/#{customer_id}/payment_methods"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Directdebit",
                    default_flag: "1",
                    return_url: "https://your-service.example.com/return",
                    directdebit: {
                        application_type: "ONLINE",
                        bank_code: "9999",
                        branch_code: "000",
                        account_type: "1",
                        account_number: "0999999",
                        account_name_kana: "ナマエカナ"
                    }   
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    get:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveCustomerPaymentMethodList
      tags:
        - 決済手段
      summary: 決済手段 一覧取得
      description: |
        `customer_id`で指定した顧客に対し紐づく決済手段を一覧で取得します。
      parameters:
        - name: customer_id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: クエリ
          in: query
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerPaymentMethod.ListRetrieving.QueryParams'
          description: |
            決済手段の一覧取得において検索条件となるクエリパラメータ
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に紐づく決済手段から一覧で取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaymentMethod.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods?pay_type=Directdebit'
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/payment_methods\", customerID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"pay_type\", \"Directdebit\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const customerId = "<Customer ID>";

                const endpoint = `${BASE_URL}/v1/customers/${customerId}/payment_methods`;

                const response = await fetch(endpoint, {
                    method: "GET",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });
                const paymentMethods = await response.json();
            })();
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/payment_methods";
            $queryParams = [
                "pay_type" => "Directdebit",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . "?" . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods'
            query_params = {
                'pay_type': 'Directdebit',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'

                endpoint = "/v1/customers/#{customer_id}/payment_methods"
                query_params =  { 
                    limit: 10,
                    pay_type: 'Directdebit',
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/customers/{customer_id}/payment_methods/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveCustomerPaymentMethod
      tags:
        - 決済手段
      summary: 決済手段 取得
      description: |
        `customer_id`で指定した顧客に対し紐づく決済手段のうち、`id`で指定したものを取得します。
      parameters:
        - name: customer_id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: id
          in: path
          description: |
            決済手段ID\
            <span class="smallText">※ `pay_type = Card`（カード）の場合は `cs_` から始まるIDになります。</span>
          schema:
            allOf:
              - $ref: '#/components/schemas/PaymentMethodId_schema'
          required: true
          examples:
            payment_method:
              $ref: '#/components/examples/payment_method'
            card:
              $ref: '#/components/examples/card'
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に紐づく決済手段からIDで指定した決済手段を取得します。
        - name: クエリ
          in: query
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerPaymentMethod.Retrieving.QueryParams'
          description: |
            決済手段の取得において検索条件となるクエリパラメータ
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaymentMethod.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{id}?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const customerId = "<Customer ID>";
                const paymentMethodId = "<Payment Method ID>";

                const queryParams = new URLSearchParams({
                    pay_type: "Card",
                });

                const endpoint = `${BASE_URL}/v1/customers/${customerId}/payment_methods/${paymentMethodId}?${queryParams}`;

                const response = await fetch(endpoint, {
                    method: "GET",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });
                const paymentMethod = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\tpaymentMethodID := \"<Payment Method ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/payment_methods/%s\", customerID, paymentMethodID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';
            $paymentMethodId = '<Payment Method ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/payment_methods/{$paymentMethodId}";
            $queryParams = [
                "pay_type" => "Card",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'
            payment_method_id = '<Payment Method ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{payment_method_id}/'
            query_params = {
                'pay_type': 'Card',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                payment_method_id = '<Payment Method ID>'

                endpoint = "/v1/customers/#{customer_id}/payment_methods/#{payment_method_id}"
                query_params =  {
                    limit: 10,
                    pay_type: 'Card',
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    delete:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: deleteCustomerPaymentMethod
      tags:
        - 決済手段
      summary: 決済手段 削除
      description: |
        `customer_id`で指定した顧客に対し紐づく決済手段のうち、`id`で指定したものを削除します。
        <span class="smallText">
        \
        \
        ※ `pay_type = Paypay`の場合、PayPay側のアカウント連携も解除されます。削除した決済手段では継続課金を行えません。\
        なお削除は`delete_flag`で表現するため、レスポンスの`status`は削除前の値（連携済みの場合は`ACTIVATED`）のまま返ります。
        </span>
      parameters:
        - name: customer_id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: id
          in: path
          description: |
            決済手段ID\
            <span class="smallText">※ `pay_type = Card`（カード）の場合は `cs_` から始まるIDになります。</span>
          schema:
            allOf:
              - $ref: '#/components/schemas/PaymentMethodId_schema'
          required: true
          examples:
            payment_method:
              $ref: '#/components/examples/payment_method'
            card:
              $ref: '#/components/examples/card'
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に紐づく決済手段からIDで指定した決済手段を削除します。
        - in: query
          name: pay_type
          required: true
          description: |
            決済種別
            - `Card` - カード
            - `Directdebit` - 口座振替
            - `Virtualaccount` - 銀行振込（バーチャル口座）
            - `Paypay` - PayPay
            - `Amazonpay` - Amazon Pay
          schema:
            type: string
            minLength: 1
            maxLength: 50
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaymentMethod.Deleting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{id}?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const customerId = "<Customer ID>";
                const paymentMethodId = "<Payment Method ID>";

                const queryParams = new URLSearchParams({
                    pay_type: "Card",
                });

                const endpoint = `${BASE_URL}/v1/customers/${customerId}/payment_methods/${paymentMethodId}?${queryParams}`;

                const response = await fetch(endpoint, {
                    method: "DELETE",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });
                const result = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\tpaymentMethodID := \"<Payment Method ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"DELETE\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/payment_methods/%s\", customerID, paymentMethodID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';
            $paymentMethodId = '<Payment Method ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/payment_methods/{$paymentMethodId}";
            $queryParams = [
                "pay_type" => "Card",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . "?" . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'DELETE');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'
            payment_method_id = '<Payment Method ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{payment_method_id}/'
            query_params = {
                'pay_type': 'Card',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.delete(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                payment_method_id = '<Payment Method ID>'
                
                endpoint = "/v1/customers/#{customer_id}/payment_methods/#{payment_method_id}"
                query_params =  {
                    limit: 10,
                    pay_type: 'Card',
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Delete.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updateCustomerPaymentMethod
      tags:
        - 決済手段
      summary: 決済手段 更新
      description: |
        `customer_id`で指定した顧客に対し紐づく決済手段のうち、`id`で指定したものを更新します。
        <span class="smallText">
        \
        \
        ※ `pay_type = Paypay`の場合は、デフォルト決済手段の変更（`default_flag`）・再認可（`reauth`）・加盟店自由項目（`client_field_1`〜`client_field_3`）の更新が行えます。`default_flag`と`reauth`は同時に指定できません（加盟店自由項目はどちらとも同時に指定できます）。\
        再認可は連携が成立していない・失効した決済手段（`status`が`FAILED` / `EXPIRED` / `REVOKED` / `CANCELED`）に対してのみ実行できます。
        </span>
      parameters:
        - name: customer_id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: id
          in: path
          description: |
            決済手段ID\
            <span class="smallText">※ `pay_type = Card`（カード）の場合は `cs_` から始まるIDになります。</span>
          schema:
            allOf:
              - $ref: '#/components/schemas/PaymentMethodId_schema'
          required: true
          examples:
            payment_method:
              $ref: '#/components/examples/payment_method'
            card:
              $ref: '#/components/examples/card'
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に紐づく決済手段からIDで指定した決済手段を削除します。
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - pay_type
              properties:
                pay_type:
                  type: string
                  minLength: 1
                  maxLength: 50
                  description: |
                    決済種別

                    * `Card` - カード
                    * `Virtualaccount` - 銀行振込（バーチャル口座）
                    * `Paypay` - PayPay
                    * `Amazonpay` - Amazon Pay

                    <span class="smallText">
                      ※ 現時点では<code>Card</code>（カード）、<code>Virtualaccount</code>（銀行振込（バーチャル口座））、<code>Paypay</code>（PayPay）、<code>Amazonpay</code>（Amazon Pay）のみ指定可能です。
                    </span>
                default_flag:
                  type: string
                  enum:
                    - '1'
                  minLength: 1
                  maxLength: 1
                  description: |
                    デフォルトフラグ
                    * `1` - デフォルト

                    <span class="smallText">
                      ※ <code>pay_type = Paypay</code>の場合は省略可能です（省略時はデフォルトフラグを変更しません）。それ以外の決済種別では必須です。
                    </span>
                reauth:
                  allOf:
                    - $ref: '#/components/schemas/reauth'
                  description: |
                    再認可フラグ
                    * `1` - 認可URLを再発行する

                    <span class="smallText">
                      ※ <code>pay_type = Paypay</code>の場合のみ利用可能です。<code>default_flag</code>とは同時に指定できません。
                    </span>
                return_url:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/return_url'
                  description: |
                    <span class="smallText">※ `pay_type = "Card"`のとき指定可能</span>
                return_url_on_failure:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/return_url_on_failure'
                  description: |
                    <span class="smallText">※ `pay_type = "Card"`のとき指定可能</span>
                client_field_1:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/client_field_1'
                  description: |
                    加盟店自由項目 1\
                    <span class="smallText">※ `pay_type = "Card"` / `"Paypay"`のとき指定可能</span>
                client_field_2:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/client_field_2'
                  description: |
                    加盟店自由項目 2\
                    <span class="smallText">※ `pay_type = "Card"` / `"Paypay"`のとき指定可能</span>
                client_field_3:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/client_field_3'
                  description: |
                    加盟店自由項目 3\
                    <span class="smallText">※ `pay_type = "Card"` / `"Paypay"`のとき指定可能</span>
                card:
                  type: object
                  nullable: true
                  description: |
                    <span class="smallText">※ `pay_type = "Card"`のとき指定可能。カード情報自体（カード番号）は変更できません。省略した場合は`default_flag`/`client_field_*`のみが更新されます。</span>
                  properties:
                    token:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/token'
                      description: |
                        カードトークン\
                        <span class="smallText">指定した場合、トークンを用いてカード情報（有効期限・セキュリティコード等）を更新します。`expire`/`holder_name`/`security_code`を直接指定する場合は省略可能です。</span>
                    expire:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/properties-expire'
                      description: |
                        カード有効期限\
                        <span class="smallText">`token`未指定時は必須</span>\
                        形式：`YYMM`
                    holder_name:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/properties-holder_name'
                      description: |
                        カード名義人名\
                        <span class="smallText">`token`未指定時のみ指定可能</span>
                    security_code:
                      nullable: true
                      type: string
                      minLength: 1
                      maxLength: 6
                      example: '123'
                      description: |
                        セキュリティコード\
                        <span class="smallText">`token`未指定時のみ指定可能</span>
                    card_updater_mode:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/card_updater_mode'
                      description: |
                        洗替対象設定\
                        <span class="smallText">洗替対象設定を変更する場合のみ指定します（省略可能）</span>

                        - `enabled`：カード更新する
                        - `disabled`：カード更新しない
                        - `inherit`：ショップ設定に準ずる（デフォルト）
                    tds_type:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds_type'
                      description: |
                        3Dセキュア認証を利用するか。\
                        <span class="smallText">※ カード情報（`token`・`holder_name`・`expire`等）を更新する場合は必須</span>

                        - `0`: 3Dセキュア認証を利用しない
                        - `2`: 3Dセキュア2.0認証を利用する
                    tds2_type:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_type'
                    td_tenant_name:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/td_tenant_name'
                    tds2_ret_url:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ret_url'
                    tds2_ch_acc_change:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ch_acc_change'
                    tds2_ch_acc_date:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ch_acc_date'
                    tds2_ch_acc_pw_change:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ch_acc_pw_change'
                    tds2_nb_purchase_account:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_nb_purchase_account'
                    tds2_payment_acc_age:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_payment_acc_age'
                    tds2_provision_attempts_day:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_provision_attempts_day'
                    tds2_ship_address_usage:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_address_usage'
                    tds2_ship_name_ind:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_name_ind'
                    tds2_suspicious_acc_activity:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_suspicious_acc_activity'
                    tds2_txn_activity_day:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_txn_activity_day'
                    tds2_txn_activity_year:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_txn_activity_year'
                    tds2_three_ds_req_auth_data:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_three_ds_req_auth_data'
                    tds2_three_ds_req_auth_method:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_three_ds_req_auth_method'
                    tds2_three_ds_req_auth_timestamp:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_three_ds_req_auth_timestamp'
                    tds2_email:
                      allOf:
                        - $ref: '#/components/schemas/tds2_email'
                    tds2_addr_match:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_addr_match'
                    tds2_bill_addr_country:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_bill_addr_country'
                    tds2_bill_addr_state:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_bill_addr_state'
                    tds2_bill_addr_city:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_bill_addr_city'
                    tds2_bill_addr_line_1:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_bill_addr_line_1'
                    tds2_bill_addr_line_2:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_bill_addr_line_2'
                    tds2_bill_addr_line_3:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_bill_addr_line_3'
                    tds2_bill_addr_post_code:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_bill_addr_post_code'
                    tds2_ship_addr_country:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_addr_country'
                    tds2_ship_addr_state:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_addr_state'
                    tds2_ship_addr_city:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_addr_city'
                    tds2_ship_addr_line_1:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_addr_line_1'
                    tds2_ship_addr_line_2:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_addr_line_2'
                    tds2_ship_addr_line_3:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_addr_line_3'
                    tds2_ship_addr_post_code:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_addr_post_code'
                    tds2_ship_ind:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_ship_ind'
                    tds2_delivery_email_address:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_delivery_email_address'
                    tds2_home_phone_cc:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_home_phone_cc'
                    tds2_home_phone_no:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_home_phone_no'
                    tds2_mobile_phone_cc:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_mobile_phone_cc'
                    tds2_mobile_phone_no:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_mobile_phone_no'
                    tds2_work_phone_cc:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_work_phone_cc'
                    tds2_work_phone_no:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_work_phone_no'
                    tds2_delivery_timeframe:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_delivery_timeframe'
                    tds2_pre_order_date:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_pre_order_date'
                    tds2_pre_order_purchase_ind:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_pre_order_purchase_ind'
                    tds2_reorder_items_ind:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_reorder_items_ind'
                    tds2_recurring_expiry:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_recurring_expiry'
                    tds2_recurring_frequency:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_recurring_frequency'
                    tds2_gift_card_amount:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_gift_card_amount'
                    tds2_gift_card_count:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_gift_card_count'
                    tds2_gift_card_curr:
                      nullable: true
                      allOf:
                        - $ref: '#/components/schemas/tds2_gift_card_curr'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaymentMethod.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type:application/json" \
                -d '{"pay_type": "Card", "default_flag": "1"}' \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{id}'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const customerId = "<Customer ID>";
                const paymentMethodId = "<Payment Method ID>";

                const endpoint = `${BASE_URL}/v1/customers/${customerId}/payment_methods/${paymentMethodId}`;

                const body = {
                    pay_type: "Card",
                    default_flag: "1",
                };

                const response = await fetch(endpoint, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                    body: JSON.stringify(body),
                });
                const result = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\tpaymentMethodID := \"<Payment Method ID>\"\n\n\tbody := UpdatingPaymentMethodRequest{\n\t\tPayType:     \"Card\",\n\t\tDefaultFlag: \"1\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\turl := fmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/payment_methods/%s\", customerID, paymentMethodID)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\turl,\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n\ntype UpdatingPaymentMethodRequest struct {\n\tPayType     string `json:\"pay_type\"`\n\tDefaultFlag string `json:\"default_flag\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';
            $paymentMethodId = '<Payment Method ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/payment_methods/{$paymentMethodId}";
            $body = [
                "pay_type" => "Card",
                "default_flag" => "1",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json",
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, json_encode($body));
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'
            payment_method_id = '<Payment Method ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{payment_method_id}/'
            body = {
                'pay_type': 'Card',
                'default_flag': '1',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json',
            }

            try:
                response = requests.put(url, headers=headers, json=body)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                payment_method_id = '<Payment Method ID>'

                endpoint = "/v1/customers/#{customer_id}/payment_methods/#{payment_method_id}"
                body = {
                    pay_type: 'Card',
                    default_flag: '1',
                }

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'
                request.body = body.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/customers/{customer_id}/payment_methods/{id}/reactivate:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: reactivateCustomerPaymentMethod
      tags:
        - 決済手段
      summary: 決済手段 再有効化
      description: |
        `customer_id`で指定した顧客に対し紐づくバーチャル口座決済手段のうち、`id`で指定したものを再有効化します。
      parameters:
        - name: customer_id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: id
          in: path
          description: |
            決済手段ID\
            <span class="smallText">※ `pay_type = Card`（カード）の場合は `cs_` から始まるIDになります。</span>
          schema:
            allOf:
              - $ref: '#/components/schemas/PaymentMethodId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に紐づく決済手段からIDで指定した決済手段を削除します。
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - pay_type
              properties:
                pay_type:
                  type: string
                  minLength: 1
                  maxLength: 50
                  description: |
                    決済種別

                    * `Virtualaccount` - 銀行振込（バーチャル口座）
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaymentMethod.Inactivating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{id}/reactivate?pay_type=Virtualaccount'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const customerId = "<Customer ID>";
                const paymentMethodId = "<Payment Method ID>";

                const queryParams = new URLSearchParams({
                    pay_type: "Virtualaccount",
                });

                const endpoint = `${BASE_URL}/v1/customers/${customerId}/payment_methods/${paymentMethodId}/reactivate?${queryParams}`;

                const response = await fetch(endpoint, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });
                const result = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\tpaymentMethodID := \"<Payment Method ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/payment_methods/%s/reactivate\", customerID, paymentMethodID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"pay_type\", \"Virtualaccount\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';
            $paymentMethodId = '<Payment Method ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/payment_methods/{$paymentMethodId}/reactivate";
            $queryParams = [
                "pay_type" => "Virtualaccount",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . "?" . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'
            payment_method_id = '<Payment Method ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{payment_method_id}/reactivate'
            query_params = {
                'pay_type': 'Virtualaccount',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.put(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                payment_method_id = '<Payment Method ID>'
                
                endpoint = "/v1/customers/#{customer_id}/payment_methods/#{payment_method_id}/reactivate"
                query_params =  {
                    pay_type: 'Virtualaccount',
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/customers/{customer_id}/payment_methods/{id}/inactivate:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: inactivateCustomerPaymentMethod
      tags:
        - 決済手段
      summary: 決済手段 停止
      description: |
        `customer_id`で指定した顧客に対し紐づくバーチャル口座決済手段のうち、`id`で指定したものを停止します。
      parameters:
        - name: customer_id
          in: path
          description: 顧客ID
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomerId_schema'
          required: true
        - name: id
          in: path
          description: |
            決済手段ID\
            <span class="smallText">※ `pay_type = Card`（カード）の場合は `cs_` から始まるIDになります。</span>
          schema:
            allOf:
              - $ref: '#/components/schemas/PaymentMethodId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく顧客のうち、指定したIDの顧客に紐づく決済手段からIDで指定した決済手段を削除します。
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - pay_type
              properties:
                pay_type:
                  type: string
                  minLength: 1
                  maxLength: 50
                  description: |
                    決済種別

                    * `Virtualaccount` - 銀行振込（バーチャル口座）
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerPaymentMethod.Inactivating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{id}/inactivate?pay_type=Virtualaccount'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const customerId = "<Customer ID>";
                const paymentMethodId = "<Payment Method ID>";

                const queryParams = new URLSearchParams({
                    pay_type: "Virtualaccount",
                });

                const endpoint = `${BASE_URL}/v1/customers/${customerId}/payment_methods/${paymentMethodId}/inactivate?${queryParams}`;

                const response = await fetch(endpoint, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });
                const result = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tcustomerID := \"<Customer ID>\"\n\tpaymentMethodID := \"<Payment Method ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/customers/%s/payment_methods/%s/inactivate\", customerID, paymentMethodID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"pay_type\", \"Virtualaccount\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $customerId = '<Customer ID>';
            $paymentMethodId = '<Payment Method ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/customers/{$customerId}/payment_methods/{$paymentMethodId}/inactivate";
            $queryParams = [
                "pay_type" => "Virtualaccount",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . "?" . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            customer_id = '<Customer ID>'
            payment_method_id = '<Payment Method ID>'

            url = f'https://api.test.fincode.jp/v1/customers/{customer_id}/payment_methods/{payment_method_id}/inactivate'
            query_params = {
                'pay_type': 'Virtualaccount',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.put(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                customer_id = '<Customer ID>'
                payment_method_id = '<Payment Method ID>'
                
                endpoint = "/v1/customers/#{customer_id}/payment_methods/#{payment_method_id}/inactivate"
                query_params =  {
                    pay_type: 'Virtualaccount',
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePaymentList
      tags:
        - 決済
      summary: 決済 一覧取得
      description: |
        決済情報の一覧を取得します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づく決済から一覧で取得します。
        - name: クエリ
          in: query
          required: true
          schema:
            oneOf:
              - allOf:
                  - $ref: '#/components/schemas/Payment.ListRetrieving.QueryParams'
                  - $ref: '#/components/schemas/Payment.ListRetrieving.Card.QueryParams'
                  - $ref: '#/components/schemas/Pagination.QueryParams'
                title: カード決済
              - allOf:
                  - $ref: '#/components/schemas/Payment.ListRetrieving.QueryParams'
                  - $ref: '#/components/schemas/Payment.ListRetrieving.ApplePay.QueryParams'
                  - $ref: '#/components/schemas/Pagination.QueryParams'
                title: Apple Pay
              - allOf:
                  - $ref: '#/components/schemas/Payment.ListRetrieving.QueryParams'
                  - $ref: '#/components/schemas/Payment.ListRetrieving.Googlepay.QueryParams'
                  - $ref: '#/components/schemas/Pagination.QueryParams'
                title: Google Pay
              - allOf:
                  - $ref: '#/components/schemas/Payment.ListRetrieving.QueryParams'
                  - $ref: '#/components/schemas/Payment.ListRetrieving.Konbini.QueryParams'
                  - $ref: '#/components/schemas/Pagination.QueryParams'
                title: コンビニ決済
              - allOf:
                  - $ref: '#/components/schemas/Payment.ListRetrieving.QueryParams'
                  - $ref: '#/components/schemas/Payment.ListRetrieving.PayPay.QueryParams'
                  - $ref: '#/components/schemas/Pagination.QueryParams'
                title: PayPay
              - allOf:
                  - $ref: '#/components/schemas/Payment.ListRetrieving.QueryParams'
                  - $ref: '#/components/schemas/Payment.ListRetrieving.DirectDebit.QueryParams'
                  - $ref: '#/components/schemas/Pagination.QueryParams'
                title: 口座振替
              - allOf:
                  - $ref: '#/components/schemas/Payment.ListRetrieving.QueryParams'
                  - $ref: '#/components/schemas/Payment.ListRetrieving.VirtualAccount.QueryParams'
                  - $ref: '#/components/schemas/Pagination.QueryParams'
                title: 銀行振込（バーチャル口座）
              - allOf:
                  - $ref: '#/components/schemas/Payment.ListRetrieving.QueryParams'
                  - $ref: '#/components/schemas/Payment.ListRetrieving.Amazonpay.QueryParams'
                  - $ref: '#/components/schemas/Pagination.QueryParams'
                title: Amazon Pay
          description: |
            決済の一覧取得において検索条件となるクエリパラメータ
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Card.ListRetrieving.Response'
                    title: カード決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.ApplePay.ListRetrieving.Response'
                    title: Apple Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.GooglePay.ListRetrieving.Response'
                    title: Google Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Konbini.ListRetrieving.Response'
                    title: コンビニ決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.PayPay.ListRetrieving.Response'
                    title: PayPay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.DirectDebit.ListRetrieving.Response'
                    title: 口座振替
                  - allOf:
                      - $ref: '#/components/schemas/Payment.VirtualAccount.ListRetrieving.Response'
                    title: 銀行振込（バーチャル口座）
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.ListRetrieving.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/payments?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const payments = await fincode.payments.retrieveList({
                        pay_type: "Card",
                        limit: 10,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", \"https://api.test.fincode.jp/v1/payments\", nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments";
            $queryParams = [
                "pay_type" => "Card",
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/payments'
            query_params = {
                'pay_type': 'Card',
                'limit': 10,
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/payments"
                query_params =  {
                    limit: 10,
                    pay_type: 'Card',
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createPayment
      tags:
        - 決済
      summary: 決済 登録
      description: |
        決済情報をfincodeに登録します。決済登録に成功した時点ではまだ顧客に対して請求はされていません。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主として決済を登録します。テナントが`pay_type`で指定する決済手段契約の審査を完了させている必要があります。
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/Payment.Card.Creating.Request'
                  title: カード決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.ApplePay.Creating.Request'
                  title: Apple Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.GooglePay.Creating.Request'
                  title: Google Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.Konbini.Creating.Request'
                  title: コンビニ決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.PayPay.Creating.Request'
                  title: PayPay
                - allOf:
                    - $ref: '#/components/schemas/Payment.DirectDebit.Creating.Request'
                  title: 口座振替
                - allOf:
                    - $ref: '#/components/schemas/Payment.VirtualAccount.Creating.Request'
                  title: 銀行振込（バーチャル口座）
                - allOf:
                    - $ref: '#/components/schemas/Payment.Amazonpay.Creating.Request'
                  title: Amazon Pay
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Card.Creating.Response'
                    title: カード決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.ApplePay.Creating.Response'
                    title: Apple Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.GooglePay.Creating.Response'
                    title: Google Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Konbini.Creating.Response'
                    title: コンビニ決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.PayPay.Creating.Response'
                    title: PayPay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.DirectDebit.Creating.Response'
                    title: 口座振替
                  - allOf:
                      - $ref: '#/components/schemas/Payment.VirtualAccount.Creating.Response'
                    title: 銀行振込（バーチャル口座）
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.Creating.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "amount": "1000",
                "job_code": "CAPTURE",
                "tds_type": "2"
            }' \
            'https://api.test.fincode.jp/v1/payments'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const payment = await fincode.payments.create({
                        pay_type: "Card",
                        job_code: "CAPTURE",
                        amount: "1000",
                        tds_type: "2",
                        td_tenant_name: "My Store",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := CreatingPaymentRequest{\n\t\tPayType: \"Card\",\n\t\tJobCode: \"CAPTURE\",\n\t\tAmount:  stringPointer(\"1000\"),\n\t\tTdsType: stringPointer(\"2\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"POST\",\n\t\t\"https://api.test.fincode.jp/v1/payments\",\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingPaymentRequest struct {\n\tPayType      string  `json:\"pay_type\"`\n\tID           *string `json:\"id,omitempty\"`\n\tJobCode      string  `json:\"job_code\"`\n\tAmount       *string `json:\"amount,omitempty\"`\n\tTax          *string `json:\"tax,omitempty\"`\n\tClientField1 *string `json:\"client_field_1,omitempty\"`\n\tClientField2 *string `json:\"client_field_2,omitempty\"`\n\tClientField3 *string `json:\"client_field_3,omitempty\"`\n\tTdsType      *string `json:\"tds_type,omitempty\"`\n\tTdTenantName *string `json:\"td_tenant_name,omitempty\"`\n\tTds2Type     *string `json:\"tds2_type,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "Card",
                "job_code" => "CAPTURE",
                "amount" => "1000",

                "tds_type" => "2",
                "td_tenant_name" => "My Store",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/payments'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Card",
                "amount": "1000",
                "job_code": "CAPTURE",
                "tds_type": "2"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/payments"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    amount: "1000",
                    job_code: "CAPTURE",
                    tds_type: "2",
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/{id}:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: executePayment
      tags:
        - 決済
      summary: 決済 実行
      description: |
        fincodeに登録された決済情報を指定し、請求を実行します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済処理を実行します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/Payment.Card.Executing.Request'
                  title: カード決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.ApplePay.Executing.Request'
                  title: Apple Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.GooglePay.Executing.Request'
                  title: Google Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.Konbini.Executing.Request'
                  title: コンビニ決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.PayPay.Executing.Request'
                  title: PayPay
                - allOf:
                    - $ref: '#/components/schemas/Payment.DirectDebit.Executing.Request'
                  title: 口座振替
                - allOf:
                    - $ref: '#/components/schemas/Payment.VirtualAccount.Executing.Request'
                  title: 銀行振込（バーチャル口座）
                - allOf:
                    - $ref: '#/components/schemas/Payment.Amazonpay.Executing.Request'
                  title: Amazon Pay
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Card.Executing.Response'
                    title: カード決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.ApplePay.Executing.Response'
                    title: Apple Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.GooglePay.Executing.Response'
                    title: Google Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Konbini.Executing.Response'
                    title: コンビニ決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.PayPay.Executing.Response'
                    title: PayPay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.DirectDebit.Executing.Response'
                    title: 口座振替
                  - allOf:
                      - $ref: '#/components/schemas/Payment.VirtualAccount.Executing.Response'
                    title: 銀行振込（バーチャル口座）
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.Executing.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "access_id": "<Access ID>",
                "token": "<Token from fincodeJS>",
            }' \
            'https://api.test.fincode.jp/v1/payments/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const orderId = "<Order ID>";
                const accessId = "<Access ID>";

                const customerId = "<Customer ID>";
                const cardId = "<Card ID>";

                try {
                    // リクエストの送信
                    const payment = await fincode.payments.execute(orderId, {
                        pay_type: "Card",
                        access_id: accessId,
                        customer_id: customerId,
                        card_id: cardId,
                        tds2_ret_url: "https://your-service.example.com/tds2_return",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := ExecutingPaymentRequest{\n\t\tPayType:    \"Card\",\n\t\tAccessID:   \"<Access ID>\",\n\t\tCustomerID: stringPointer(\"<Customer ID>\"),\n\t\tCardID:     stringPointer(\"<Card ID>\"),\n\t\tMethod:     stringPointer(\"1\"),\n\t\tTds2RetURL: stringPointer(\"https://your-service.example.com/tds2_returns\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.test.fincode.jp/v1/payments/{id}\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype ExecutingPaymentRequest struct {\n\tPayType    string  `json:\"pay_type\"`\n\tAccessID   string  `json:\"access_id\"`\n\tToken      *string `json:\"token,omitempty\"`\n\tCustomerID *string `json:\"customer_id,omitempty\"`\n\tCardID     *string `json:\"card_id,omitempty\"`\n\tMethod     *string `json:\"method,omitempty\"`\n\tPayTimes   *string `json:\"pay_times,omitempty\"`\n\tTds2RetURL *string `json:\"tds2_ret_url,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $orderId = '<Order ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/{$orderId}";

            $data = json_encode([
                "pay_type" => "Card",
                "access_id" => "<Access ID>",
                "customer_id" => "<Customer ID>",
                "card_id" => "<Card ID>",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            order_id = '<Order ID>'

            url = f'https://api.test.fincode.jp/v1/payments/{order_id}/'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Card",
                "access_id": "<Access ID>",
                "token": "<Token from fincodeJS>",
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                order_id = '<Order ID>'
                endpoint = "/v1/payments/#{order_id}"
                query_params =  {
                    pay_type: 'Card',
                }

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    access_id: "<Access ID>",
                    token: "<Token from fincodeJS>",
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePayment
      tags:
        - 決済
      summary: 決済 取得
      description: |
        指定した決済情報を取得します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済情報を取得します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
        - name: クエリ
          in: query
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/Payment.Retrieving.QueryParams'
          description: |
            決済の取得において検索条件となるクエリパラメータ
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Card.Retrieving.Response'
                    title: カード決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.ApplePay.Retrieving.Response'
                    title: Apple Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.GooglePay.Retrieving.Response'
                    title: Google Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Konbini.Retrieving.Response'
                    title: コンビニ決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.PayPay.Retrieving.Response'
                    title: PayPay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.DirectDebit.Retrieving.Response'
                    title: 口座振替
                  - allOf:
                      - $ref: '#/components/schemas/Payment.VirtualAccount.Retrieving.Response'
                    title: 銀行振込（バーチャル口座）
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.Retrieving.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/payments/{id}?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const orderId = "<Order ID>";

                try {
                    // リクエストの送信
                    const payment = await fincode.payments.retrieve(orderId, {
                        pay_type: "Card",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\torderID := \"<Order ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/%s\", orderID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $orderId = '<Order ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/{$orderId}";
            $queryParams = [
                "pay_type" => "Card",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            order_id = '<Order ID>'

            url = f'https://api.test.fincode.jp/v1/payments/{order_id}/'
            query_params = {
                'pay_type': 'Card',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                order_id = '<Order ID>'
                endpoint = "/v1/payments/#{order_id}"
                query_params =  {
                    pay_type: 'Card',
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/{id}/capture:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: capturePayment
      tags:
        - 決済
      summary: 決済 売上確定
      description: |
        `status`が仮売上（`AUTHORIZED`）またはキャンセル（`CANCELED`）である決済に対して売上確定を行います。\
        成功すると、ステータスが`CAPTURED`に遷移し、その時点を集計対象とした売上入金に反映されます。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済の売上確定を実行します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/Payment.Card.Capturing.Request'
                  title: カード決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.ApplePay.Capturing.Request'
                  title: Apple Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.GooglePay.Capturing.Request'
                  title: Google Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.PayPay.Capturing.Request'
                  title: PayPay
                - allOf:
                    - $ref: '#/components/schemas/Payment.Amazonpay.Capturing.Request'
                  title: Amazon Pay
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Card.Capturing.Response'
                    title: カード決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.ApplePay.Capturing.Response'
                    title: Apple Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.GooglePay.Capturing.Response'
                    title: Google Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.PayPay.Capturing.Response'
                    title: PayPay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.Capturing.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "access_id": "<Access ID>"
            }' \
            'https://api.test.fincode.jp/v1/payments/{id}/capture'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const orderId = "<Order ID>";
                const accessId = "<Access ID>";

                try {
                    // リクエストの送信
                    const payment = await fincode.payments.capture(orderId, {
                        pay_type: "Card",
                        access_id: accessId,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\torderID := \"<Order ID>\"\n\n\tbody := CapturingPaymentRequest{\n\t\tPayType:  \"Card\",\n\t\tAccessID: \"<Access ID>\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/%s/capture\", orderID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CapturingPaymentRequest struct {\n\tPayType  string  `json:\"pay_type\"`\n\tAccessID string  `json:\"access_id\"`\n\tMethod   *string `json:\"method,omitempty\"`\n\tPayTimes *string `json:\"pay_times,omitempty\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $orderId = '<Order ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/{$orderId}/capture";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "<Pay Type>",
                "access_id" => "<Access ID>",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            order_id = '<Order ID>'

            url = f'https://api.test.fincode.jp/v1/payments/{order_id}/capture'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Card",
                "access_id": "<Access ID>"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                order_id = '<Order ID>'
                endpoint = "/v1/payments/#{order_id}/capture"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    access_id: "<Access ID>",
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/{id}/cancel:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: cancelPayment
      tags:
        - 決済
      summary: 決済 キャンセル
      description: |
        決済をキャンセルします。キャンセルに成功すると`status`はキャンセル済み（`CANCELED`）に遷移します。\
        \
        ユーザーへの返金の行われ方などは決済手段によって異なります。\
        詳細は[Docs > 決済](/payment)から参照できます。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済をキャンセルします。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/Payment.Card.Canceling.Request'
                  title: カード決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.ApplePay.Canceling.Request'
                  title: Apple Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.GooglePay.Canceling.Request'
                  title: Google Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.Konbini.Canceling.Request'
                  title: コンビニ決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.PayPay.Canceling.Request'
                  title: PayPay
                - allOf:
                    - $ref: '#/components/schemas/Payment.DirectDebit.Canceling.Request'
                  title: 口座振替
                - allOf:
                    - $ref: '#/components/schemas/Payment.VirtualAccount.Canceling.Request'
                  title: 銀行振込（バーチャル口座）
                - allOf:
                    - $ref: '#/components/schemas/Payment.Amazonpay.Canceling.Request'
                  title: Amazon Pay
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Card.Canceling.Response'
                    title: カード決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.ApplePay.Canceling.Response'
                    title: Apple Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.GooglePay.Canceling.Response'
                    title: Google Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Konbini.Canceling.Response'
                    title: コンビニ決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.PayPay.Canceling.Response'
                    title: PayPay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.DirectDebit.Canceling.Response'
                    title: 口座振替
                  - allOf:
                      - $ref: '#/components/schemas/Payment.VirtualAccount.Canceling.Response'
                    title: 銀行振込（バーチャル口座）
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.Canceling.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "access_id": "<Access ID>"
            }' \
            'https://api.test.fincode.jp/v1/payments/{id}/cancel'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const orderId = "<Order ID>";
                const accessId = "<Access ID>";

                try {
                    // リクエストの送信
                    const payment = await fincode.payments.cancel(orderId, {
                        pay_type: "Card",
                        access_id: accessId,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\torderID := \"<Order ID>\"\n\n\tbody := CancelingPaymentRequest{\n\t\tPayType:  \"Card\",\n\t\tAccessID: \"<Access ID>\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/%s/cancel\", orderID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CancelingPaymentRequest struct {\n\tPayType  string `json:\"pay_type\"`\n\tAccessID string `json:\"access_id\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $orderId = '<Order ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/{$orderId}/cancel";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "<Pay Type>",
                "access_id" => "<Access ID>",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            order_id = '<Order ID>'

            url = f'https://api.test.fincode.jp/v1/payments/{order_id}/cancel'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Card",
                "access_id": "<Access ID>"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                order_id = '<Order ID>'
                endpoint = "/v1/payments/#{order_id}/cancel"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    access_id: "<Access ID>",
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/{id}/auth:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: authorizePayment
      tags:
        - 決済
      summary: 決済 再オーソリ
      description: |
        決済のオーソリを再度実行します。\
        \
        `pay_type`が`Card`かつ`status`が`CANCELED`の決済（キャンセル済みのカード決済）に対して実行ができ、初回決済時の情報を引き継いで再オーソリを行います。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済のオーソリを再度実行します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/Payment.Card.Reauthorizing.Request'
                  title: カード決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.GooglePay.Reauthorizing.Request'
                  title: Google Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.Amazonpay.Reauthorizing.Request'
                  title: Amazon Pay
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Card.Reauthorizing.Response'
                    title: カード決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.GooglePay.Reauthorizing.Response'
                    title: Google Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.Reauthorizing.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "access_id": "<Access ID>",
                "method": "1"
            }' \
            'https://api.test.fincode.jp/v1/payments/{id}/auth'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const orderId = "<Order ID>";
                const accessId = "<Access ID>";

                try {
                    // リクエストの送信
                    const payment = await fincode.payments.reauthorize(orderId, {
                        pay_type: "Card",
                        access_id: accessId,
                        method: "1",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := ReauthorizingPaymentRequest{\n\t\tPayType:  \"Card\",\n\t\tAccessID: \"<Access ID>\",\n\t\tMethod:   \"1\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.test.fincode.jp/v1/payments/{id}/auth\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype ReauthorizingPaymentRequest struct {\n\tPayType  string `json:\"pay_type\"`\n\tAccessID string `json:\"access_id\"`\n\tMethod   string `json:\"method\"`\n\tPayTimes string `json:\"pay_times\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $orderId = '<Order ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/{$orderId}/auth";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "Card",
                "access_id" => "<Access ID>",
                "method" => "1",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            order_id = '<Order ID>'

            url = f'https://api.test.fincode.jp/v1/payments/{order_id}/auth'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Card",
                "access_id": "<Access ID>",
                "method": "1"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                order_id = '<Order ID>'
                endpoint = "/v1/payments/#{order_id}/auth"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    access_id: "<Access ID>",
                    method: "1"
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/{id}/change:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: changeAmountOfPayment
      tags:
        - 決済
      summary: 決済 金額変更
      description: |
        決済の利用金額を変更します。\
        既に売上確定となっている決済は請求金額が変更され、仮売上となっている決済は確保している与信枠の金額が変更されます。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済の利用金額を変更します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/Payment.Card.ChangingAmount.Request'
                  title: カード決済
                - allOf:
                    - $ref: '#/components/schemas/Payment.GooglePay.ChangingAmount.Request'
                  title: Google Pay
                - allOf:
                    - $ref: '#/components/schemas/Payment.PayPay.ChangingAmount.Request'
                  title: PayPay
                - allOf:
                    - $ref: '#/components/schemas/Payment.DirectDebit.ChangingAmount.Request'
                  title: 口座振替
                - allOf:
                    - $ref: '#/components/schemas/Payment.Amazonpay.ChangingAmount.Request'
                  title: Amazon Pay
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Card.ChangingAmount.Response'
                    title: カード決済
                  - allOf:
                      - $ref: '#/components/schemas/Payment.GooglePay.ChangingAmount.Response'
                    title: Google Pay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.PayPay.ChangingAmount.Response'
                    title: PayPay
                  - allOf:
                      - $ref: '#/components/schemas/Payment.DirectDebit.ChangingAmount.Response'
                    title: 口座振替
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.ChangingAmount.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "access_id": "<Access ID>",
                "job_code": "CAPTURE",
                "amount": "1500"
            }' \
            'https://api.test.fincode.jp/v1/payments/{id}/change'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const orderId = "<Order ID>";
                const accessID = "<Access ID>";

                try {
                    // リクエストの送信
                    const payment = await fincode.payments.changeAmount(orderId, {
                        pay_type: "Card",
                        access_id: accessID,
                        job_code: "CAPTURE",
                        amount: "1200",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\torderID := \"<Order ID>\"\n\n\tbody := ChangingAmountRequest{\n\t\tPayType:  \"Card\",\n\t\tAccessID: \"<Access ID>\",\n\t\tJobCode:  \"1\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/%s/change\", orderID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype ChangingAmountRequest struct {\n\tPayType  string `json:\"pay_type\"`\n\tAccessID string `json:\"access_id\"`\n\tJobCode  string `json:\"job_code\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $orderId = '<Order ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/{$orderId}/change";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "<Pay Type>",
                "access_id" => "<Access ID>",
                "job_code" => "CAPTURE",
                "amount" => "1000",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            order_id = '<Order ID>'

            url = f'https://api.test.fincode.jp/v1/payments/{order_id}/change'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Card",
                "access_id": "<Access ID>",
                "job_code": "CAPTURE",
                "amount": "1500"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                order_id = '<Order ID>'
                endpoint = "/v1/payments/#{order_id}/change"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    access_id: "<Access ID>",
                    job_code: "CAPTURE",
                    amount: "1500"
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/{id}/secure:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: executePaymentAfterThreeDSecureecure
      tags:
        - 決済
      summary: 認証後決済 実行
      description: |
        3Dセキュア認証後の決済を実行します。\
        \
        3Dセキュア認証APIもしくは認証結果確定APIのレスポンスの3Dセキュア認証結果（`tds2_trans_result`）が`Y`または`A`のとき、このAPIを実行して3Dセキュア認証後の決済を実行します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済の3Dセキュア認証後決済を実行します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Payment.Card.ExecutingAfterThreeDSecure.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Payment.Card.ExecutingAfterThreeDSecure.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "access_id": "<Access ID>"
            }' \
            'https://api.test.fincode.jp/v1/payments/{id}/secure'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const orderId = "<Order ID>";
                const accessId = "<Access ID>";

                try {
                    // リクエストの送信
                    const payment = await fincode.payments.executeAfter3DSecureAuth(
                        orderId,
                        {
                            pay_type: "Card",
                            access_id: accessId,
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\torderID := \"<Order ID>\"\n\n\tbody := ExecutingPaymentAfter3DSecureRequest{\n\t\tPayType:  \"Card\",\n\t\tAccessID: \"<Access ID>\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/%s/secure\", orderID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype ExecutingPaymentAfter3DSecureRequest struct {\n\tPayType  string `json:\"pay_type\"`\n\tAccessID string `json:\"access_id\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $orderId = '<Order ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/{$orderId}/secure";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "Card",
                "access_id" => "<Access ID>",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            order_id = '<Order ID>'

            url = f'https://api.test.fincode.jp/v1/payments/{order_id}/secure'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Card",
                "access_id": "<Access ID>"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                order_id = '<Order ID>'
                endpoint = "/v1/payments/#{order_id}/secure"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    access_id: "<Access ID>",
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/{id}/barcode:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: generateBarcodeOfPayment
      tags:
        - 決済
      summary: バーコード発行
      description: |
        リクエストしたデバイスの情報に合わせてコンビニ決済のバーコードを再度発行します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主としたコンビニ決済のうち、`id`で指定した決済のバーコードを再度発行します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Payment.Konbini.GeneratingBarcode.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Payment.Konbini.GeneratingBarcode.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Konbini",
                "access_id": "<Access ID>",
                "device_name": "iPhone",
                "win_width": "390",
                "win_height": "844",
                "pixel_ratio": "3.00",
                "win_size_type": "2"
            }' \
            'https://api.test.fincode.jp/v1/payments/{id}/barcode'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const orderId = "<Order ID>";
                const accessId = "<Access ID>";

                const payment = await fincode.payments.generateKonbiniPaymentBarcode(
                    orderId,
                    {
                        access_id: accessId,
                        pay_type: "Konbini",
                        device_name: "iPhone",
                        win_width: "390",
                        win_height: "844",
                        pixel_ratio: "3.00",
                        win_size_type: "2",
                    }
                );
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\torderID := \"<Order ID>\"\n\n\tbody := GeneratingBarcodeRequest{\n\t\tPayType:     \"Konbini\",\n\t\tAccessID:    \"<Access ID>\",\n\t\tDeviceName:  \"iPhone\",\n\t\tWinWidth:    \"390\",\n\t\tWinHeight:   \"844\",\n\t\tPixelRatio:  \"3.00\",\n\t\tWinSizeType: \"2\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/%s/barcode\", orderID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype GeneratingBarcodeRequest struct {\n\tPayType     string `json:\"pay_type\"`\n\tAccessID    string `json:\"access_id\"`\n\tDeviceName  string `json:\"device_name\"`\n\tWinWidth    string `json:\"win_width\"`\n\tWinHeight   string `json:\"win_height\"`\n\tPixelRatio  string `json:\"pixel_ratio\"`\n\tWinSizeType string `json:\"win_size_type\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $orderId = '<Order ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/{$orderId}/barcode";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "Konbini",
                "access_id" => "<Access ID>",
                "device_name" => "iPhone",
                "win_width" => "390",
                "win_height" => "844",
                "pixel_ratio" => "3.00",
                "win_size_type" => "2"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            order_id = '<Order ID>'

            url = f'https://api.test.fincode.jp/v1/payments/{order_id}/barcode'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Konbini",
                "access_id": "<Access ID>",
                "device_name": "iPhone",
                "win_width": "390",
                "win_height": "844",
                "pixel_ratio": "3.00",
                "win_size_type": "2"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                order_id = '<Order ID>'
                endpoint = "/v1/payments/#{order_id}/barcode"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Konbini",
                    access_id: "<Access ID>",
                    device_name: "iPhone",
                    win_width: "390",
                    win_height: "844",
                    pixel_ratio: "3.00",
                    win_size_type: "2" 
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/{id}/payment_request:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: requestPaymentPayPay
      tags:
        - 決済
      summary: 支払依頼リクエスト（PayPay 継続課金）
      description: |
        <span class="smallText color--red-400">※ PayPay（継続課金）のみ利用可</span>\
        \
        残高不足などで失敗したPayPay継続課金の決済に対し、購入者へ支払いを依頼します。\
        \
        継続課金の決済は購入者の操作を必要としませんが、残高不足などで失敗した場合はその決済のままでは回収できません。\
        このAPIで支払依頼を送信すると、購入者のPayPayアプリに支払いの依頼が通知され、購入者が支払うことで決済が完了します。\
        \
        支払依頼の送信に成功すると`status`は支払い待ち（`AWAITING_CUSTOMER_PAYMENT`）に遷移します。\
        購入者が支払うと売上確定済み（`CAPTURED`）へ、支払期限までに支払われなかった場合は期限切れ（`EXPIRED`）へ遷移します。\
        いずれも結果通知（Webhook）または決済取得APIで確認してください。
        <span class="smallText">
        \
        \
        **請求する金額はこのAPIでは指定できません。** 対象の決済の利用金額（`amount`）と税送料（`tax`）の合計が請求されます。\
        \
        支払依頼を送信できるのは、決済実行API（`PUT /v1/payments/{id}`）で実行した継続課金の決済のうち、支払いが完了していないものです。\
        サブスクリプションによって発生した決済は対象外です（サブスクリプションの失敗はリトライにより自動で再請求されます）。\
        \
        支払い待ちの決済に対して重複して支払依頼を送信することはできません。送信済みの支払依頼を取り消す場合は決済キャンセルAPIを使用してください。
        </span>
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済に対し支払依頼を送信します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Payment.PayPay.PaymentRequesting.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Payment.PayPay.PaymentRequesting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Paypay",
                "expiry_date": "2022/05/16 23:59:59"
            }' \
            'https://api.test.fincode.jp/v1/payments/{id}/payment_request'
  /v1/payments/logs/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePaymentLogList
      tags:
        - 決済
      summary: 決済ログ 一覧取得
      description: |
        指定した決済に対して行われた処理の履歴を一覧で取得します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済のうち、`id`で指定した決済のログを取得します。
        - name: id
          in: path
          description: オーダーID（決済情報のID）
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderId_schema'
          required: true
        - name: クエリ
          in: query
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/Payment.LogRetrieving.QueryParams'
          description: |
            決済ログの取得において検索条件となるクエリパラメータ
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                oneOf:
                  - allOf:
                      - $ref: '#/components/schemas/Payment.Amazonpay.LogRetrieving.Response'
                    title: Amazon Pay
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
  /v1/secure2/{access_id}:
    put:
      operationId: executeThreeDSecureecureAuthentication
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - 3Dセキュア認証
      summary: 3Dセキュア 認証実行
      description: |
        `access_id`で指定したカード決済取引の3Dセキュア2.0認証を開始します。\
        \
        用意した`tds2_ret_url`に対し`event`パラメータで`ThreeDSecureMethodFinished`もしくは`ThreeDSecureMethodSkipped`イベントが通知されたとき、このAPIを呼び出します。

        - レスポンスの`tds2_trans_result`が`Y`または`A`のとき、認証後決済 実行APIを呼び出し3Dセキュア認証された決済を完了させます。
        - レスポンスの`tds2_trans_result`が`C`のとき、`challenge_url`にリダイレクトし購入者にチャレンジ認証を実施させ、結果を3Dセキュア認証 結果確定APIで確定します。
        - レスポンスの`tds2_trans_result`が上記以外の場合、3Dセキュア認証で決済が拒否されたことを示します。
      parameters:
        - name: access_id
          in: path
          description: 取引ID
          schema:
            allOf:
              - $ref: '#/components/schemas/AccessId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップの決済情報のうち、指定した`access_id`のカード決済の3Dセキュア認証を開始します。
          required: false
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThreeDSecure.Authorizing.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreeDSecure.Authorizing.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "param": "valuereturnedfrom3dsprocess"
            }' \
            'https://api.test.fincode.jp/v1/secure2/{access_id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const accessId = "<Access ID>";

                try {
                    // リクエストの送信
                    const result = await fincode.payments.execute3DSecureAuth(accessId, {
                        param: "<Value you received in tds2_ret_url>",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\taccessID := \"<Access ID>\"\n\n\tbody := Executing3DSecureAuthRequest{\n\t\tParam: \"<Value you received in tds2_ret_url>\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/secure2/%s\", accessID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype Executing3DSecureAuthRequest struct {\n\tParam string `json:\"param\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $accessId = '<Access ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/secure2/{$accessId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "param" => "<Value you received in tds2_ret_url>"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            access_id = '<Access ID>'

            url = f'https://api.test.fincode.jp/v1/secure2/{access_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "param": "<Value you received in tds2_ret_url>"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                access_id = '<Access ID>'
                endpoint = "/v1/secure2/#{access_id}"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    param: '<Value you received in tds2_ret_url>'
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    get:
      operationId: confirmThreeDSecureecureAuthentication
      security:
        - Secret-Bearer-Auth: []
        - Public-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - 3Dセキュア認証
      summary: 3Dセキュア 認証結果確定
      description: |
        `access_id`で指定したカード決済取引の3Dセキュア認証の結果を確定します。\
        \
        `challenge_url`上で購入者がチャレンジ認証実施後、`tds2_ret_url`に対し`event`パラメータで`AuthResultReady`イベントが通知されたとき、このAPIを呼び出します。

        - レスポンスの`tds2_trans_result`が`Y`または`A`のとき、認証後決済 実行APIを呼び出し3Dセキュア認証された決済を完了させます。
        - レスポンスの`tds2_trans_result`が上記以外の場合、3Dセキュア認証で決済が拒否されたことを示します。
      parameters:
        - name: access_id
          in: path
          description: 取引ID
          schema:
            allOf:
              - $ref: '#/components/schemas/AccessId_schema'
          required: true
        - name: pay_type
          in: query
          description: |
            この決済で利用する決済手段です。未指定の場合、`Card`となります。

            - `Card`: カード（デフォルト）
            - `Googlepay`: Google Pay
          schema:
            type: string
            example: Card
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップの決済情報のうち、指定した`access_id`のカード決済の3Dセキュア認証の結果を確定します。
          required: false
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreeDSecure.Confirming.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/secure2/{access_id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const accessId = "<Access ID>";

                try {
                    // リクエストの送信
                    const result = await fincode.payments.retrieve3DSecureAuthResult(
                        accessId
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\taccessID := \"<Access ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/secure2/%s\", accessID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $accessId = '<Access ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/secure2/{$accessId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            access_id = '<Access ID>'

            url = f'https://api.test.fincode.jp/v1/secure2/{access_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                access_id = '<Access ID>'
                endpoint = "/v1/secure2/#{access_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/sessions:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createPaymentSession
      tags:
        - リダイレクト型決済
      summary: 決済URL 作成
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップで決済を行います。
      description: |
        fincodeが提供するリダイレクト型決済ページを発行し、その決済ページへのURLをレスポンスします。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentSession.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentSession.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization: Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "success_url": "https://your-service.example.com/success",
                "cancel_url": "https://your-service.example.com/cancel",
                "transaction": {
                    "pay_type": ["Card", "Konbini", "Paypay"],
                    "amount": "1000"
                },
                "card": {
                    "job_code": "CAPTURE",
                    "tds_type": "2",
                    "tds2_type": "2"
                },
                "konbini": {
                    "payment_term_day": 2,
                    "konbini_reception_mail_send_flag": "0"
                },
                "paypay": {
                    "job_code": "CAPTURE"
                }
            }' \
            "https://api.test.fincode.jp/v1/sessions"
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const paymentSession = await fincode.paymentSessions.create({
                        success_url: "https://your-service.example.com/success",
                        cancel_url: "https://your-service.example.com/cancel",
                        shop_service_name: "My Store",
                        transaction: {
                            pay_type: ["Card"],
                            amount: "1000",
                        },
                        card: {
                            job_code: "CAPTURE",
                            tds_type: "2",
                            tds2_type: "2",
                            td_tenant_name: "My Store",
                        },
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := CreatingPaymentSessionRequest{\n\t\tSuccessURL: stringPointer(\"https://your-service.example.com/success\"),\n\t\tCancelURL:  stringPointer(\"https://your-service.example.com/cancel\"),\n\t\tTransaction: Transaction{\n\t\t\tPayType: []string{\"Card\", \"Konbini\", \"Paypay\"},\n\t\t\tAmount:  \"1234\",\n\t\t},\n\t\tCard: &CardPaymentSession{\n\t\t\tJobCode:  \"CAPTURE\",\n\t\t\tTdsType:  stringPointer(\"2\"),\n\t\t\tTds2Type: stringPointer(\"2\"),\n\t\t},\n\t\tKonbini: &KonbiniPaymentSession{\n\t\t\tPaymentTermDay:               2,\n\t\t\tKonbiniReceptionMailSendFlag: \"0\",\n\t\t},\n\t\tPayPay: &PayPayPaymentSession{\n\t\t\tJobCode: \"CAPTURE\",\n\t\t},\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"POST\",\n\t\t\"https://api.test.fincode.jp/v1/sessions\",\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingPaymentSessionRequest struct {\n\tSuccessURL         *string                `json:\"success_url,omitempty\"`\n\tCancelURL          *string                `json:\"cancel_url,omitempty\"`\n\tExpire             *string                `json:\"expire,omitempty\"`\n\tShopServiceName    *string                `json:\"shop_service_name,omitempty\"`\n\tReceiverMail       *string                `json:\"receiver_mail,omitempty\"`\n\tMailCustomerName   *string                `json:\"mail_customer_name,omitempty\"`\n\tGuildeMailSendFlag *string                `json:\"guilde_mail_send_flag,omitempty\"`\n\tThanksMailSendFlag *string                `json:\"thanks_mail_send_flag,omitempty\"`\n\tShopMailTemplateID *string                `json:\"shop_mail_template_id,omitempty\"`\n\tTransaction        Transaction            `json:\"transaction\"`\n\tCard               *CardPaymentSession    `json:\"card,omitempty\"`\n\tKonbini            *KonbiniPaymentSession `json:\"konbini,omitempty\"`\n\tPayPay             *PayPayPaymentSession  `json:\"paypay,omitempty\"`\n}\ntype Transaction struct {\n\tPayType      []string `json:\"pay_type\"`\n\tOrderID      *string  `json:\"order_id,omitempty\"`\n\tAmount       string   `json:\"amount\"`\n\tTax          *string  `json:\"tax,omitempty\"`\n\tClientField1 *string  `json:\"client_field_1,omitempty\"`\n\tClientField2 *string  `json:\"client_field_2,omitempty\"`\n\tClientField3 *string  `json:\"client_field_3,omitempty\"`\n}\n\ntype CardPaymentSession struct {\n\tJobCode      string  `json:\"job_code,omitempty\"`\n\tTdsType      *string `json:\"tds_type,omitempty\"`\n\tTds2Type     *string `json:\"tds2_type,omitempty\"`\n\tTdTenantName *string `json:\"td_tenant_name,omitempty\"`\n}\n\ntype KonbiniPaymentSession struct {\n\tPaymentTermDay               int    `json:\"payment_term_day,omitempty\"`\n\tKonbiniReceptionMailSendFlag string `json:\"konbini_reception_mail_send_flag,omitempty\"`\n}\n\ntype PayPayPaymentSession struct {\n\tJobCode          string  `json:\"job_code,omitempty\"`\n\tOrderDescrpition *string `json:\"order_description,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/sessions";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "success_url" => "https://your-service.example.com/success",
                "cancel_url" => "https://your-service.example.com/cancel",
                "transaction" => [
                    "pay_type" => ["Card", "Konbini", "Paypay"],
                    "amount" => "1000",
                ],
                "card" => [
                    "job_code" => "CAPTURE",
                    "tds_type" => "2",
                    "tds2_type" => "2",
                ],
                "konbini" => [
                    "payment_term_day" => 2,
                    "konbini_reception_mail_send_flag" => "0"
                ],
                "paypay" => [
                    "job_code" => "CAPTURE",
                ]
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/sessions'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "success_url": "https://your-service.example.com/success",
                "cancel_url": "https://your-service.example.com/cancel",
                "transaction": {
                    "pay_type": ["Card", "Konbini", "Paypay"],
                    "amount": "1000"
                },
                "card": {
                    "job_code": "CAPTURE",
                    "tds_type": "2",
                    "tds2_type": "2"
                },
                "konbini": {
                    "payment_term_day": 3,
                    "konbini_reception_mail_send_flag": "0"
                },
                "paypay": {
                    "job_code": "CAPTURE"
                }
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/sessions"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    success_url: "https://your-service.example.com/success",
                    cancel_url: "https://your-service.example.com/cancel",
                    transaction: {
                        pay_type: ["Card", "Konbini", "Paypay"],
                        amount: "1000"
                    },
                    card: {
                        job_code: "CAPTURE",
                        tds_type: "2",
                        tds2_type: "2"
                    },
                    konbini: {
                        payment_term_day: 2,
                        konbini_reception_mail_send_flag: "0"
                    },
                    paypay: {
                        job_code: "CAPTURE"
                    }
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/card_sessions:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createCardRegistrationSession
      tags:
        - リダイレクト型カード登録
      summary: カード登録URL 作成
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ 顧客情報を共有しないプラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップ上の顧客に対してカードを登録するためのカード登録URLを発行します。
      description: |
        fincodeが提供するリダイレクト型カード登録ページを発行し、そのカード登録ページへのURLをレスポンスします。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CardRegistrationSession.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardRegistrationSession.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |+
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "success_url": "http://your-service.example.com/success",
                "cancel_url": "http://your-service.example.com/cancel",
            }' \
            'https://api.test.fincode.jp/v1/card_sessions'

        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const cardRegistrationSession =
                        await fincode.cardRegistrationSessions.create({
                            success_url: "https://your-service.example.com/success",
                            cancel_url: "https://your-service.example.com/cancel",
                        });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := PaymentSessionCreatingRequest{\n\t\tSuccessURL: \"https://your-service.example.com/success\",\n\t\tCancelURL:  \"https://your-service.example.com/cancel\",\n\t\tTransaction: Transaction{\n\t\t\tPayType: []string{\"Card\"},\n\t\t\tAmount:  \"1234\",\n\t\t},\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", \"https://api.test.fincode.jp/v1/card_sessions\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype PaymentSessionCreatingRequest struct {\n\tSuccessURL  string      `json:\"success_url\"`\n\tCancelURL   string      `json:\"cancel_url\"`\n\tTransaction Transaction `json:\"transaction\"`\n}\n\ntype Transaction struct {\n\tPayType []string `json:\"pay_type\"`\n\tAmount  string   `json:\"amount\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/card_sessions";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "success_url" => "http://your-service.example.com/success",
                "cancel_url" => "http://your-service.example.com/cancel",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/card_sessions'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "success_url": "http://your-service.example.com/success",
                "cancel_url": "http://your-service.example.com/cancel",
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/card_sessions"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true


                data = {
                    success_url: "http://your-service.example.com/success",
                    cancel_url: "http://your-service.example.com/cancel",
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/plans:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createPlan
      tags:
        - プラン
      summary: プラン 登録
      description: |
        プラン情報を登録します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Plan.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "plan_name": "Gold Plan",
                "amount": "1000",
                "interval_pattern": "month",
                "interval_count": "1"
            }' \
            'https://api.test.fincode.jp/v1/plans'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const plan = await fincode.plans.create({
                        plan_name: "Gold Plan",
                        amount: "1000",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := CreatingPlanRequest{\n\t\tPlanName:        \"Gold Plan\",\n\t\tAmount:          \"1000\",\n\t\tIntervalPattern: stringPointer(\"month\"),\n\t\tIntervalCount:   stringPointer(\"1\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", \"https://api.test.fincode.jp/v1/plans\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingPlanRequest struct {\n\tID              *string `json:\"id,omitempty\"`\n\tPlanName        string  `json:\"plan_name\"`\n\tDescription     *string `json:\"description,omitempty\"`\n\tAmount          string  `json:\"amount\"`\n\tTax             *string `json:\"tax,omitempty\"`\n\tIntervalPattern *string `json:\"interval_pattern,omitempty\"`\n\tIntervalCount   *string `json:\"interval_count,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/plans";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "plan_name" => "Gold Plan",
                "amount" => "1000",
                "interval_pattern" => "month",
                "interval_count" => "1",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/plans'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "plan_name": "Gold Plan",
                "amount": "1000",
                "interval_pattern": "month",
                "interval_count": "1"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: ", response.json())
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/plans"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    plan_name: "Gold Plan",
                    amount: "1000",
                    interval_pattern: "month",
                    interval_count: "1"
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePlanList
      tags:
        - プラン
      summary: プラン 一覧取得
      description: |
        プラン情報を一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - in: query
          name: クエリ
          description: |
            プラン情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/Plan.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/plans'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const plans = await fincode.plans.retrieveList({
                        limit: 10,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\t\"https://api.test.fincode.jp/v1/plans\",\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/plans";
            $queryParams = [
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/plans'
            query_params = { 'limit': 10 }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/plans"
                query_params =  { limit: 10 }
                
                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/plans/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePlan
      tags:
        - プラン
      summary: プラン 取得
      description: |
        IDで指定したプラン情報を取得します。
      parameters:
        - name: id
          in: path
          description: プランID
          schema:
            allOf:
              - $ref: '#/components/schemas/PlanId_schema'
          required: true
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/plans/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const planId = "<Plan ID>";

                try {
                    // リクエストの送信
                    const plan = await fincode.plans.retrieve(planId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tplanID := \"<Plan ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/plans/%s\", planID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $planId = '<Plan ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/plans/{$planId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            plan_id = '<Plan ID>'

            url = f'https://api.test.fincode.jp/v1/plans/{plan_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                plan_id = '<Plan ID>'

                endpoint = "/v1/plans/#{plan_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updatePlan
      tags:
        - プラン
      summary: プラン 更新
      description: |
        IDで指定したプラン情報を更新します。\
        プランが1つ以上のサブスクリプションで使用されているとき（`used_flag = 1`のとき）、プランは更新できません。
      parameters:
        - name: id
          in: path
          description: プランID
          schema:
            allOf:
              - $ref: '#/components/schemas/PlanId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Plan.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "plan_name": "Pro Plan",
                "description": "Pro Plan (previous: Gold Plan)"
            }' \
            'https://api.test.fincode.jp/v1/plans/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const planId = "<Plan ID>";

                try {
                    // リクエストの送信
                    const plan = await fincode.plans.update(planId, {
                        plan_name: "Pro Plan",
                        description: "This is a Pro plan. (previously Gold Plan)",
                        amount: "2000",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tplanID := \"<Plan ID>\"\n\tbody := UpdatingPlanRequest{\n\t\tPlanName:    stringPointer(\"Pro Name\"),\n\t\tDescription: stringPointer(\"This is a plan for professionals (previously Gold Plan)\"),\n\t\tAmount:      stringPointer(\"2000\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/plans/%s\", planID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingPlanRequest struct {\n\tPlanName        *string `json:\"plan_name\"`\n\tDescription     *string `json:\"description\"`\n\tAmount          *string `json:\"amount\"`\n\tTax             *string `json:\"tax\"`\n\tIntervalPattern *string `json:\"interval_pattern\"`\n\tIntervalCount   *string `json:\"interval_count\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $planId = '<Plan ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/plans/{$planId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "plan_name" => "Pro Plan",
                "description" => "This is a Pro Plan (previously Gold Plan)",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            plan_id = '<Plan ID>'

            url = f'https://api.test.fincode.jp/v1/plans/{plan_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "plan_name": "Pro Plan",
                "description": "Pro Plan (previous: Gold Plan)"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                plan_id = '<Plan ID>'
                endpoint = "/v1/plans/#{plan_id}"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true
                
                data = {
                    plan_name: "Pro Plan",
                    description: "Pro Plan (previous: Gold Plan)"
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    delete:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: deletePlan
      tags:
        - プラン
      summary: プラン 削除
      description: |
        IDで指定したプラン情報を削除します。\
        プランが1つ以上のサブスクリプションで使用されている場合（`used_flag = 1`のとき）でも削除可能です。  
        プランを削除しても既に登録済みのサブスクリプションには影響しません。  
      parameters:
        - name: id
          in: path
          description: プランID
          schema:
            allOf:
              - $ref: '#/components/schemas/PlanId_schema'
          required: true
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plan.Deleting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/plans/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const planId = "<Plan ID>";

                try {
                    // リクエストの送信
                    const result = await fincode.plans.delete(planId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tplanID := \"<Plan ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"DELETE\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/plans/%s\", planID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $planId = '<Plan ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/plans/{$planId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'DELETE');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            plan_id = '<Plan ID>'

            url = f'https://api.test.fincode.jp/v1/plans/{plan_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.delete(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                plan_id = '<Plan ID>'

                endpoint = "/v1/plans/#{plan_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Delete.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/subscriptions:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createSubscription
      tags:
        - サブスクリプション
      summary: サブスクリプション 登録
      description: |
        `customer_id`で指定した顧客に対して`plan_id`で指定したプランを適用したサブスクリプション情報を登録します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Subscription.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "plan_id": "<Plan ID>",
                "customer_id": "<Customer ID>",
                "card_id": "<Card ID>",
                "start_date": "2025/05/05",
                "stop_date": "2025/06/05"
            }' \
            'https://api.test.fincode.jp/v1/subscriptions'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const planId = "<Plan ID>";

                const customerId = "<Customer ID>";
                const cardId = "<Card ID>";

                try {
                    // リクエストの送信
                    const subscription = await fincode.subscriptions.create({
                        pay_type: "Card",
                        plan_id: planId,
                        customer_id: customerId,
                        card_id: cardId,
                        start_date: "2022/05/16",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := CreatingSubscriptionRequest{\n\t\tPayType:       \"Card\",\n\t\tPlanID:        \"<Plan ID>\",\n\t\tCustomerID:    \"<Customer ID>\",\n\t\tCardID:        stringPointer(\"<Card ID>\"),\n\t\tStartDate:     stringPointer(\"2024/11/01\"),\n\t\tInitialAmount: stringPointer(\"5000\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", \"https://api.test.fincode.jp/v1/subscriptions\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingSubscriptionRequest struct {\n\tID            *string `json:\"id,omitempty\"`\n\tPayType       string  `json:\"pay_type\"`\n\tPlanID        string  `json:\"plan_id\"`\n\tCustomerID    string  `json:\"customer_id\"`\n\tCardID        *string `json:\"card_id,omitempty\"`\n\tStartDate     *string `json:\"start_date,omitempty\"`\n\tStopDate      *string `json:\"stop_date,omitempty\"`\n\tEndMonthFlag  *string `json:\"end_month_flag,omitempty\"`\n\tSendURL       *string `json:\"send_url,omitempty\"`\n\tClientField1  *string `json:\"client_field_1,omitempty\"`\n\tClientField2  *string `json:\"client_field_2,omitempty\"`\n\tClientField3  *string `json:\"client_field_3,omitempty\"`\n\tInitialAmount *string `json:\"initial_amount,omitempty\"`\n\tInitialTax    *string `json:\"initial_tax,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/subscriptions";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "pay_type" => "Card",
                "plan_id" => "<Plan ID>",
                "customer_id" => "<Customer ID>",
                "card_id" => "<Card ID>",
                "start_date" => "2022/05/16",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/subscriptions'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "pay_type": "Card",
                "plan_id": "<Plan ID>",
                "customer_id": "<Customer ID>",
                "card_id": "<Card ID>",
                "start_date": "2022/05/16"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/subscriptions"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    plan_id: "<Plan ID>",
                    customer_id: "<Customer ID>",
                    card_id: "<Card ID>",
                    start_date: "2025/05/05",
                    stop_date: "2025/06/05"
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveSubscriptionList
      tags:
        - サブスクリプション
      summary: サブスクリプション 一覧取得
      description: |
        サブスクリプション情報を一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - in: query
          name: クエリ
          description: |
            サブスクリプション情報の一覧取得において検索条件となるクエリパラメータ
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/Subscription.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/subscriptions?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const subscriptions = await fincode.subscriptions.retrieveList({
                        pay_type: "Card",
                        limit: 10,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\t\"https://api.test.fincode.jp/v1/subscriptions\",\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/subscriptions";
            $queryParams = [
                "pay_type" => "Card",
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/subscriptions'
            query_params = {
                'pay_type': "Card",
                'limit': "10",
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/subscriptions"
                query_params =  { 
                    limit: 10,
                    pay_type: 'Card'
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/subscriptions/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveSubscription
      tags:
        - サブスクリプション
      summary: サブスクリプション 取得
      description: |
        IDで指定したサブスクリプション情報を取得します。
      parameters:
        - name: id
          in: path
          description: サブスクリプションID
          schema:
            allOf:
              - $ref: '#/components/schemas/SubscriptionId_schema'
          required: true
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/subscriptions/{id}?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const subscriptionId = "<Subscription ID>";

                try {
                    // リクエストの送信
                    const subscription = await fincode.subscriptions.retrieve(
                        subscriptionId,
                        {
                            pay_type: "Card",
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tsubscriptionID := \"<Subscription ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/subscriptions/%s\", subscriptionID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $subscriptionId = '<Subscription ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/subscriptions/{$subscriptionId}";
            $queryParams = [
                "pay_type" => "Card",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            subscription_id = '<Subscription ID>'

            url = f'https://api.test.fincode.jp/v1/subscriptions/{subscription_id}'
            query_params = {
                'pay_type': 'Card',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                subscription_id = '<Subscription ID>'
                endpoint = "/v1/subscriptions/#{subscription_id}"
                query_params =  { pay_type: 'Card' }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updateSubscription
      tags:
        - サブスクリプション
      summary: サブスクリプション 更新
      description: |
        IDで指定したサブスクリプション情報を更新します。\
        指定されたパラメータのみ更新します。\
        サブスクリプションの初回課金がすでに行われているとき（`start_date ≤ {{現在時刻}}`のとき）、サブスクリプションは更新できません。
      parameters:
        - name: id
          in: path
          description: サブスクリプションID
          schema:
            allOf:
              - $ref: '#/components/schemas/SubscriptionId_schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Subscription.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "pay_type": "Card",
                "stop_date": "2025/07/05"
            }' \
            'https://api.test.fincode.jp/v1/subscriptions/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const subscriptionId = "<Subscription ID>";

                try {
                    // リクエストの送信
                    const subscription = await fincode.subscriptions.update(
                        subscriptionId,
                        {
                            stop_date: "2023/12/31",
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := UpdatingSubscriptionRequest{\n\t\tPayType:   \"Card\",\n\t\tStartDate: stringPointer(\"2021/01/01\"),\n\t\tStopDate:  stringPointer(\"2021/12/31\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"PUT\", \"https://api.test.fincode.jp/v1/subscriptions/{id}\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingSubscriptionRequest struct {\n\tPayType       string  `json:\"pay_type\"`\n\tPlanID        *string `json:\"plan_id,omitempty\"`\n\tStartDate     *string `json:\"start_date,omitempty\"`\n\tStopDate      *string `json:\"stop_date,omitempty\"`\n\tEndMonthFlag  *string `json:\"end_month_flag,omitempty\"`\n\tClientField1  *string `json:\"client_field_1,omitempty\"`\n\tClientField2  *string `json:\"client_field_2,omitempty\"`\n\tClientField3  *string `json:\"client_field_3,omitempty\"`\n\tInitialAmount *string `json:\"initial_amount,omitempty\"`\n\tInitialTax    *string `json:\"initial_tax,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $subscriptionId = '<Subscription ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/subscriptions/{$subscriptionId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];


            $data = json_encode([
                "stop_date" => "2024/05/16"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            subscription_id = '<Subscription ID>'

            url = f'https://api.test.fincode.jp/v1/subscriptions/{subscription_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "stop_date": "2024/05/16"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                subscription_id = '<Subscription ID>'
                endpoint = "/v1/subscriptions/#{subscription_id}"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    pay_type: "Card",
                    stop_date: "2025/07/05"
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    delete:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: unsubscripbeSubscription
      tags:
        - サブスクリプション
      summary: サブスクリプション 解約
      description: |
        IDで指定したサブスクリプションを解約し、請求を停止します。
      parameters:
        - name: id
          in: path
          description: サブスクリプションID
          schema:
            allOf:
              - $ref: '#/components/schemas/SubscriptionId_schema'
          required: true
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription.Unsubscribing.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/subscriptions/{id}?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const subscriptionId = "<Subscription ID>";

                try {
                    // リクエストの送信
                    const subscription = await fincode.subscriptions.cancel(
                        subscriptionId,
                        {
                            pay_type: "Card",
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tsubscriptionID := \"<Subscription ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"DELETE\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/subscriptions/%s\", subscriptionID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $subscriptionId = '<Subscription ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/subscriptions/{$subscriptionId}";
            $queryParams = [
                "pay_type" => "Card",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'DELETE');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            subscription_id = '<Subscription ID>'

            url = f'https://api.test.fincode.jp/v1/subscriptions/{subscription_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.delete(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                subscription_id = '<Subscription ID>'
                endpoint = "/v1/subscriptions/#{subscription_id}"
                query_params =  { pay_type: 'Card' }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Delete.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/subscriptions/{id}/result:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveSubscriptionResultList
      tags:
        - サブスクリプション
      summary: サブスクリプション結果 一覧取得
      description: |
        サブスクリプションにより発生した課金の結果を一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - in: query
          name: クエリ
          description: |
            サブスクリプション結果の一覧取得において検索条件となるクエリパラメータ
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/SubscriptionResult.ListRetrieving.QueryParams'
        - name: id
          in: path
          description: サブスクリプションID
          schema:
            allOf:
              - $ref: '#/components/schemas/SubscriptionId_schema'
          required: true
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SubscriptionResult.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/subscriptions/{id}/result?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const subscriptionId = "<Subscription ID>";

                try {
                    // リクエストの送信
                    const results = await fincode.subscriptions.retrieveResultList(
                        subscriptionId,
                        {
                            pay_type: "Card",
                            limit: 10,
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tsubscriptionID := \"<Subscription ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/subscriptions/%s/result\", subscriptionID),\n\t\tnil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $subscriptionId = '<Subscription ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/subscriptions/{$subscriptionId}/result";
            $queryParams = [
                "pay_type" => "Card",
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            subscription_id = '<Subscription ID>'

            url = f'https://api.test.fincode.jp/v1/subscriptions/{subscription_id}/result'
            query_params = {
                'pay_type': 'Card',
                'limit': "10",
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                subscription_id = '<Subscription ID>'
                endpoint = "/v1/subscriptions/#{subscription_id}/result"
                query_params =  {
                    pay_type: 'Card',
                    limit: 10
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/payments/bulk:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePaymentBulkList
      tags:
        - 一括決済
      summary: 一括決済 一覧取得
      description: |
        fincodeに登録した一括決済の情報を一覧で取得します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした一括決済情報を一覧で取得します。
        - in: query
          name: クエリ
          description: |
            一括決済情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/PaymentBulk.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentBulk.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/payments/bulk?pay_type=Card'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const paymentBulks = await fincode.paymentBulks.retrieveList({
                        pay_type: "Card",
                        limit: 10,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", \"https://api.test.fincode.jp/v1/payments/bulk\", nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/bulk";
            $queryParams = [
                "limit" => 10,
                "pay_type" => "Card",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/payments/bulk'
            query_params = {
                'pay_type': 'Card',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main

                endpoint = "/v1/payments/bulk"
                query_params =  {
                    pay_type: 'Card',
                    limit: 10,
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createPaymentBulk
      tags:
        - 一括決済
      summary: 一括決済 登録
      description: |
        fincodeにJSON形式のファイルで一括決済情報を登録し、`process_plan_date`で指定した日時に一括決済処理を予約します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした決済情報を一括登録します。
        - in: query
          name: pay_type
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/PaymentBulkPayType'
        - in: query
          name: process_plan_date
          schema:
            allOf:
              - $ref: '#/components/schemas/process_plan_date'
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PaymentBulk.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentBulk.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: multipart/form-data" \
                -F 'pay_type=Card' \
                -F 'process_plan_date=2024/03/15' \
                -F 'file=@<File Name>;type=application/json' \
            'https://api.test.fincode.jp/v1/payments/bulk'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";
            import fs from "fs";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    const filePath = "<Path to File>";
                    const fileName = "<File Name>";
                    const file = fs.createReadStream(filePath);

                    // リクエストの送信
                    const paymentBulk = await fincode.paymentBulks.create(
                        {
                            pay_type: "Card",
                            process_plan_date: "2022/05/16",
                        },
                        {
                            file: file,
                            fileName: fileName,
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tpayType := \"<Pay Type>\"\n\tprocessPlanDate := \"<Process Plan Date>\"\n\n\t// ファイルの読み込み\n\tfilePath := \"<Path To File>\"\n\tfileName := \"<File Name>\"\n\tfile, err := os.Open(filePath)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\t// バッファの作成\n\tbody := &bytes.Buffer{}\n\twriter := multipart.NewWriter(body)\n\n\t// ファイルの書き込み\n\tpart, err := writer.CreateFormFile(\"file\", fileName)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t_, err = io.Copy(part, file)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"POST\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/bulk\"),\n\t\tbody,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", writer.FormDataContentType())\n\n\tparams := req.URL.Query()\n\tparams.Add(\"process_plan_date\", processPlanDate)\n\tparams.Add(\"pay_type\", payType)\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/bulk";
            $queryParams = [
                "pay_type" => "Card",
                "process_plan_date" => "2022/05/16",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $filePath = '<Path to json file>';
            $fileName = '<File Name>';

            $fields = [
                "file" => new CURLFile($filePath, null, $fileName),
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $fields);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            def main():
                api_key = '<Secret API Key>'

                file_path = '<Path to file>'
                file_name = '<File Name>'
                
                with open(file_path, 'rb') as file:
                    files = {'file': (file_name, file)}

                    url = f'https://api.test.fincode.jp/v1/payments/bulk'
                    query_params = {
                        'pay_type': 'Card',
                        'process_plan_date': "2022/05/22"
                    }

                    # ヘッダーを設定
                    headers = {
                        'Authorization': f'Bearer {api_key}',
                    }

                    # HTTP POSTリクエストの送信
                    try:
                        response = requests.post(url, headers=headers, files=files, params=query_params)

                        # レスポンスの処理
                        if response.status_code == 200:
                            # 成功した場合の処理
                            print(f"Success: {response.json()}")
                        else:
                            # エラーの処理
                            print(f"Error: {response.json()}")
                    except requests.RequestException as e:
                        # 通信エラーの処理
                        print(f"Request error: {e}")

            if __name__ == '__main__':
                main()
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'
            require 'mime/types'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/payments/bulk"
                query_params =  {
                    pay_type: 'Card',
                    process_plan_date: '2025/12/31',
                }
                
                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)
                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                file_path = '<Path to file>'
                file_name = '<File Name>'
                
                file = File.open(file_path, 'rb')
                file_data = file.read
                file.close

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # ファイルと追加情報をマルチパートフォームデータに追加
                boundary = '----FincodeMultipartRequest'
                body = []
                insert_file_to_body(body, boundary, 'file', file_name, file_data)
                body << "--#{boundary}--\r\n"

                request['Content-Type'] = "multipart/form-data; boundary=#{boundary}"
                request.body = body.join('')

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            def insert_file_to_body(body, boundary, key, file_name, file_data)
                body << "--#{boundary}\r\n"
                body << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{file_name}\"\r\n"
                body << "Content-Type: #{MIME::Types.type_for(file_name).first.content_type}\r\n"
                body << "\r\n"
                body << file_data
                body << "\r\n"
            end

            main
  /v1/payments/bulk/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePaymentBulkDetailList
      tags:
        - 一括決済
      summary: 一括決済詳細 一覧取得
      description: |
        IDで指定した一括決済情報の詳細（決済1件ごとの情報）と各決済で発生したエラーの情報を一覧で取得します。
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/PaymentBulkId_schema'
          description: |
            一括決済ID。\
            詳細を取得する一括決済情報のIDを指定します。
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした一括決済の詳細を一覧で取得します。
        - in: query
          name: クエリ
          description: |
            一括決済情報の一覧取得において検索条件となるクエリパラメータ
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/PaymentBulkDetail.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentBulkDetail.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/payments/bulk/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const paymentBulkId = "<Payment Bulk ID>";

                try {
                    // リクエストの送信
                    const details = await fincode.paymentBulks.retrieveDetailList(
                        paymentBulkId,
                        {
                            limit: 10,
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbulkPaymentID := \"<Bulk Payment ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/bulk/%s\", bulkPaymentID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\tparams.Add(\"pay_type\", \"Card\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $paymentBulkId = '<Payment Bulk ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/bulk/{$paymentBulkId}";
            $queryParams = [
                "pay_type" => "Card",
                "limit" => 10,
            ];
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            payments_bulk_id = '<Payments Bulk ID>'

            url = f'https://api.test.fincode.jp/v1/payments/bulk/{payments_bulk_id}'
            query_params = {
                'pay_type': 'Card',
                'limit': '10',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                payments_bulk_id = '<Payments Bulk ID>'
                endpoint = "/v1/payments/bulk/#{payments_bulk_id}"
                query_params =  {
                    limit: 10,
                    pay_type: 'Card',
                }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    delete:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: deletePaymentBulk
      tags:
        - 一括決済
      summary: 一括決済 削除
      description: |
        IDで指定した一括決済情報を削除します。\
        一括決済処理がチェック済み（`status`が`CHECKED`）のものに限り削除できます。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした一括決済情報を削除します。
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/PaymentBulkId_schema'
          description: |
            一括決済ID。\
            削除対象の一括決済情報のIDを指定します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentBulk.Deleting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/payments/bulk/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const paymentBulkId = "<Payment Bulk ID>";

                try {
                    // リクエストの送信
                    const result = await fincode.paymentBulks.delete(paymentBulkId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbulkPaymentID := \"<Bulk Payment ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"DELETE\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/payments/bulk/%s\", bulkPaymentID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $paymentBulkId = '<Payment Bulk ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/payments/bulk/{$paymentBulkId}";
            $queryParams = [
                "pay_type" => "Card",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'DELETE');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            payments_bulk_id = '<Payments Bulk ID>'

            url = f'https://api.test.fincode.jp/v1/payments/bulk/{payments_bulk_id}'
            query_params = {
                'pay_type': 'Card',
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.delete(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                payments_bulk_id = '<Payments Bulk ID>'
                endpoint = "/v1/payments/bulk/#{payments_bulk_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Delete.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/invoices:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: getInvoicesList
      tags:
        - インボイス機能
      summary: インボイス 一覧取得
      description: |
        インボイス情報を一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。 
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを請求元とした請求書情報を一覧で取得します。
        - in: query
          name: クエリ
          description: |
            検索条件クエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/Invoice.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/invoices'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const endpoint = `${BASE_URL}/v1/invoices`;

                const response = await fetch(endpoint, {
                    method: "GET",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });
                const invoices = await response.json();
                console.log(invoices); // 取得したインボイスデータを出力
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーの指定\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, err := http.NewRequest(\n\t\t\"GET\",\n\t\t\"https://api.test.fincode.jp/v1/invoices\",\n\t\tnil,\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// レスポンスのステータスコードの表示\n\tfmt.Println(\"Status:\", res.Status)\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices"; // GETリクエストのエンドポイント

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, 2);

            $response = curl_exec($session);

            if ($response === false) {
                // エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                // APIからのデータを処理
                var_dump($response); // レスポンスを出力
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            base_url = "https://api.test.fincode.jp"
            endpoint = "/v1/invoices"  # GETリクエストのエンドポイント

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(f"{base_url}{endpoint}", headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/invoices"  # GETリクエストのエンドポイント

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                    # レスポンスの表示
                    puts JSON.pretty_generate(JSON.parse(response.body))
                else
                    puts 'ERROR'
                    # エラーの表示
                    puts response.body
                end
            end

            main
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: registerInvoices
      tags:
        - インボイス機能
      summary: インボイス 作成
      description: |
        インボイス情報を作成します。\
        取引内容やご利用の決済手段などの各種入力項目は、インボイス 更新APIを利用して後から入力することも可能です。\
        インボイス 発行APIを呼び出すまで請求は行われません。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを請求元とした請求書情報を作成します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoice.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/invoices'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const endpoint = `${BASE_URL}/v1/invoices`; // POSTリクエストのエンドポイント

                const response = await fetch(endpoint, {
                    method: "POST",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                });

                // レスポンスの処理
                const responseData = await response.json();
                if (response.ok) {
                    console.log("Success:", responseData);
                } else {
                    console.error("Error:", responseData);
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーを指定\n\tapiKey := \"<Secret API Key>\"\n\n\t// URLの設定\n\turl := \"https://api.test.fincode.jp/v1/invoices\"\n\n\t// HTTPリクエストの作成\n\treq, err := http.NewRequest(\"POST\", url, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// レスポンスのステータスコードの表示\n\tfmt.Println(\"Status:\", res.Status)\n}"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);

            if ($response === false) {
                // エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                // APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            url = 'https://api.test.fincode.jp/v1/invoices'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/invoices"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/invoices/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: getInvoices
      tags:
        - インボイス機能
      summary: インボイス 取得
      description: |
        指定したIDを持つインボイス情報を取得します。
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: |
            インボイスID  
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定することで、指定したテナントショップのインボイス請求書情報を取得できます。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetail.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/invoices/{id}'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const invoiceId = "<Invoice ID>"; // 実際のインボイスIDを入力してください

                const endpoint = `${BASE_URL}/v1/invoices/${invoiceId}`;

                try {
                    const response = await fetch(endpoint, {
                        method: "GET",
                        headers: {
                            Authorization: `Bearer ${API_KEY}`,
                        },
                    });

                    if (!response.ok) {
                        throw new Error(`Error: ${response.statusText}`);
                    }

                    const invoice = await response.json();
                    console.log(invoice); // 取得したインボイスデータをコンソールに表示
                } catch (error) {
                    console.error('Error:', error);
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tapiKey := \"<Secret API Key>\"\n\tinvoiceID := \"<Invoice ID>\"\n\n\t// リクエストの作成\n\treq, err := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/invoices/%s\", invoiceID),\n\t\tnil,\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// HTTPステータスコードを表示\n\tfmt.Println(\"HTTPステータスコード:\", res.StatusCode)\n\n\t// レスポンスボディを読み取って表示\n\tbody, err := io.ReadAll(res.Body)\n\tif err != nil {\n\t\tlog.Fatalf(\"レスポンスボディの読み取りエラー: %v\", err)\n\t}\n\tfmt.Println(\"レスポンスボディ:\", string(body))\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $invoiceId = '<Invoice ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices/{$invoiceId}";
            $queryParams = [
                // 必要なクエリパラメータがあればここに追加
                // "example_param" => "value",
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);

            if ($response === false) {
                // エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                // APIからのデータを処理
                $responseData = json_decode($response, true);
                if (json_last_error() === JSON_ERROR_NONE) {
                    // JSONが正しく解析された場合
                    var_dump($responseData);
                } else {
                    // JSON解析エラー
                    echo "JSON Decode Error: " . json_last_error_msg();
                }
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            invoice_id = '<Invoice ID>'

            url = f'https://api.test.fincode.jp/v1/invoices/{invoice_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                invoice_id = '<Invoice ID>'

                endpoint = "/v1/invoices/#{invoice_id}"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts JSON.pretty_generate(JSON.parse(response.body))
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updateInvoices
      tags:
        - インボイス機能
      summary: インボイス 更新
      description: |
        指定したIDを持つインボイス情報を更新します。\
        インボイス 発行APIを呼び出すまで請求は行われません。発行後は 回収困難フラグ、および 加盟店自由項目 のみが更新可能です。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした請求書情報を更新します。
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: |
            インボイスID
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceDetail.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetail.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                  "is_uncollectible": false,
                  "bill_mail_send_flag": "0",
                  "receipt_mail_send_flag": "0",
                  "underpayment_mail_send_flag": "0",
                  "invoice_number": "INV123456",
                  "customer_id": "CUST001",
                  "customer_honorific": "様",
                  "customer_overwrite": {
                    "name": "株式会社テスト",
                    "email": "test@example.com",
                    "addr_country": "JP",
                    "addr_state": "13",
                    "addr_city": "新宿区",
                    "addr_line_1": "1-1-1",
                    "addr_line_2": "テストビル",
                    "addr_line_3": "",
                    "addr_post_code": "1600022"
                  },
                  "issuer_overwrite": {
                    "addr_country": "JP",
                    "addr_state": "13",
                    "addr_city": "新宿区",
                    "addr_line_1": "1-1-1",
                    "addr_line_2": "テストビル",
                    "addr_line_3": "",
                    "addr_post_code": "1600022",
                    "email": "issuer@example.com",
                    "phone_number": "0312345678"
                  },
                  "lines": [
                    {
                      "date": "2023/10/01",
                      "name": "商品A",
                      "unit_price": 1000,
                      "quantity": 2,
                      "tax_rate": 10
                    }
                  ],
                  "pay_types": [
                    "Virtualaccount",
                    "Card"
                  ],
            }' \
            'https://api.test.fincode.jp/v1/invoices/{id}'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
              const invoiceId = "<Invoice ID>"; // ここにInvoice IDを設定

              const endpoint = `${BASE_URL}/v1/invoices/${invoiceId}`;

              const response = await fetch(endpoint, {
                method: "PUT",
                headers: {
                  Authorization: `Bearer ${API_KEY}`,
                  "Content-Type": "application/json",
                },
                body: JSON.stringify({
                  is_uncollectible: false,
                  bill_mail_send_flag: "0",
                  receipt_mail_send_flag: "0",
                  underpayment_mail_send_flag: "0",
                  invoice_number: "INV123456",
                  customer_id: "CUST001",
                  customer_honorific: "様",
                  customer_overwrite: {
                    name: "株式会社テスト",
                    email: "test@example.com",
                    addr_country: "JP",
                    addr_state: "13",
                    addr_city: "新宿区",
                    addr_line_1: "1-1-1",
                    addr_line_2: "テストビル",
                    addr_line_3: "",
                    addr_post_code: "1600022",
                  },
                  issuer_overwrite: {
                    addr_country: "JP",
                    addr_state: "13",
                    addr_city: "新宿区",
                    addr_line_1: "1-1-1",
                    addr_line_2: "テストビル",
                    addr_line_3: "",
                    addr_post_code: "1600022",
                    email: "issuer@example.com",
                    phone_number: "0312345678",
                  },
                  lines: [
                    {
                      date: "2023/10/01",
                      name: "商品A",
                      unit_price: 1000,
                      quantity: 2,
                      tax_rate: 10,
                    },
                  ],
                  pay_types: ["Virtualaccount", "Card"],
                }),
              });

              if (response.ok) {
                const invoiceData = await response.json();
                console.log("Invoice Updated:", invoiceData);
              } else {
                console.error("Error updating invoice:", await response.text());
              }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーとインボイスIDを指定\n\tapiKey := \"<Secret API Key>\"\n\tinvoiceID := \"<Invoice ID>\"\n\n\t// リクエストボディの作成\n\tbody := UpdateInvoiceRequest{\n\t\tIsUncollectible:         false,\n\t\tBillMailSendFlag:        \"0\",\n\t\tReceiptMailSendFlag:     \"0\",\n\t\tUnderpaymentMailSendFlag: \"0\",\n\t\tInvoiceNumber:           \"INV123456\",\n\t\tCustomerID:              \"CUST001\",\n\t\tCustomerHonorific:       \"様\",\n\t\tCustomerOverwrite: CustomerOverwrite{\n\t\t\tName:        \"株式会社テスト\",\n\t\t\tEmail:       \"test@example.com\",\n\t\t\tAddrCountry: \"JP\",\n\t\t\tAddrState:   \"13\",\n\t\t\tAddrCity:    \"新宿区\",\n\t\t\tAddrLine1:   \"1-1-1\",\n\t\t\tAddrLine2:   \"テストビル\",\n\t\t\tAddrLine3:   \"\",\n\t\t\tAddrPostCode: \"1600022\",\n\t\t},\n\t\tIssuerOverwrite: IssuerOverwrite{\n\t\t\tAddrCountry: \"JP\",\n\t\t\tAddrState:   \"13\",\n\t\t\tAddrCity:    \"新宿区\",\n\t\t\tAddrLine1:   \"1-1-1\",\n\t\t\tAddrLine2:   \"テストビル\",\n\t\t\tAddrLine3:   \"\",\n\t\t\tAddrPostCode: \"1600022\",\n\t\t\tEmail:       \"issuer@example.com\",\n\t\t\tPhoneNumber: \"0312345678\",\n\t\t},\n\t\tLines: []Line{\n\t\t\t{\n\t\t\t\tDate:     \"2023/10/01\",\n\t\t\t\tName:     \"商品A\",\n\t\t\t\tUnitPrice: 1000,\n\t\t\t\tQuantity: 2,\n\t\t\t\tTaxRate:  10,\n\t\t\t},\n\t\t},\n\t\tPayTypes: []string{\"Virtualaccount\", \"Card\"},\n\t}\n\n\t// JSONにエンコード\n\tmarshalledBody, err := json.Marshal(body)\n\tif err != nil {\n\t\tlog.Fatalf(\"エンコードエラー: %v\", err)\n\t}\n\n\t// URLの設定\n\turl := fmt.Sprintf(\"https://api.test.fincode.jp/v1/invoices/%s\", invoiceID)\n\n\t// HTTPリクエストの作成\n\treq, err := http.NewRequest(\"PUT\", url, bytes.NewBuffer(marshalledBody))\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// レスポンスのステータスコードの表示\n\tfmt.Println(\"Status:\", res.Status)\n}\n\ntype UpdateInvoiceRequest struct {\n\tIsUncollectible         bool              `json:\"is_uncollectible\"`\n\tBillMailSendFlag        string            `json:\"bill_mail_send_flag\"`\n\tReceiptMailSendFlag     string            `json:\"receipt_mail_send_flag\"`\n\tUnderpaymentMailSendFlag string            `json:\"underpayment_mail_send_flag\"`\n\tInvoiceNumber           string            `json:\"invoice_number\"`\n\tCustomerID              string            `json:\"customer_id\"`\n\tCustomerHonorific       string            `json:\"customer_honorific\"`\n\tCustomerOverwrite       CustomerOverwrite `json:\"customer_overwrite\"`\n\tIssuerOverwrite         IssuerOverwrite   `json:\"issuer_overwrite\"`\n\tLines                   []Line            `json:\"lines\"`\n\tPayTypes                []string          `json:\"pay_types\"`\n}\n\ntype CustomerOverwrite struct {\n\tName        string `json:\"name\"`\n\tEmail       string `json:\"email\"`\n\tAddrCountry string `json:\"addr_country\"`\n\tAddrState   string `json:\"addr_state\"`\n\tAddrCity    string `json:\"addr_city\"`\n\tAddrLine1   string `json:\"addr_line_1\"`\n\tAddrLine2   string `json:\"addr_line_2\"`\n\tAddrLine3   string `json:\"addr_line_3,omitempty\"`\n\tAddrPostCode string `json:\"addr_post_code\"`\n}\n\ntype IssuerOverwrite struct {\n\tAddrCountry string `json:\"addr_country\"`\n\tAddrState   string `json:\"addr_state\"`\n\tAddrCity    string `json:\"addr_city\"`\n\tAddrLine1   string `json:\"addr_line_1\"`\n\tAddrLine2   string `json:\"addr_line_2\"`\n\tAddrLine3   string `json:\"addr_line_3,omitempty\"`\n\tAddrPostCode string `json:\"addr_post_code\"`\n\tEmail       string `json:\"email\"`\n\tPhoneNumber string `json:\"phone_number\"`\n}\n\ntype Line struct {\n\tDate      string `json:\"date\"`\n\tName      string `json:\"name\"`\n\tUnitPrice int    `json:\"unit_price\"`\n\tQuantity  int    `json:\"quantity\"`\n\tTaxRate   int    `json:\"tax_rate\"`\n}"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $invoiceId = '<Invoice ID>';  // ここにInvoice IDを設定

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices/{$invoiceId}";

            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "is_uncollectible" => false,
                "bill_mail_send_flag" => "0",
                "receipt_mail_send_flag" => "0",
                "underpayment_mail_send_flag" => "0",
                "invoice_number" => "INV123456",
                "customer_id" => "CUST001",
                "customer_honorific" => "様",
                "customer_overwrite" => [
                    "name" => "株式会社テスト",
                    "email" => "test@example.com",
                    "addr_country" => "JP",
                    "addr_state" => "13",
                    "addr_city" => "新宿区",
                    "addr_line_1" => "1-1-1",
                    "addr_line_2" => "テストビル",
                    "addr_line_3" => "",
                    "addr_post_code" => "1600022"
                ],
                "issuer_overwrite" => [
                    "addr_country" => "JP",
                    "addr_state" => "13",
                    "addr_city" => "新宿区",
                    "addr_line_1" => "1-1-1",
                    "addr_line_2" => "テストビル",
                    "addr_line_3" => "",
                    "addr_post_code" => "1600022",
                    "email" => "issuer@example.com",
                    "phone_number" => "0312345678"
                ],
                "lines" => [
                    [
                        "date" => "2023/10/01",
                        "name" => "商品A",
                        "unit_price" => 1000,
                        "quantity" => 2,
                        "tax_rate" => 10
                    ]
                ],
                "pay_types" => [
                    "Virtualaccount",
                    "Card"
                ]
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, "PUT");
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, 2);

            $response = curl_exec($session);

            if ($response === false) {
                // エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                // APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            invoice_id = '<Invoice ID>'  # ここにInvoice IDを設定

            url = f'https://api.test.fincode.jp/v1/invoices/{invoice_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "is_uncollectible": False,
                "bill_mail_send_flag": "0",
                "receipt_mail_send_flag": "0",
                "underpayment_mail_send_flag": "0",
                "invoice_number": "INV123456",
                "customer_id": "CUST001",
                "customer_honorific": "様",
                "customer_overwrite": {
                    "name": "株式会社テスト",
                    "email": "test@example.com",
                    "addr_country": "JP",
                    "addr_state": "13",
                    "addr_city": "新宿区",
                    "addr_line_1": "1-1-1",
                    "addr_line_2": "テストビル",
                    "addr_line_3": "",
                    "addr_post_code": "1600022"
                },
                "issuer_overwrite": {
                    "addr_country": "JP",
                    "addr_state": "13",
                    "addr_city": "新宿区",
                    "addr_line_1": "1-1-1",
                    "addr_line_2": "テストビル",
                    "addr_line_3": "",
                    "addr_post_code": "1600022",
                    "email": "issuer@example.com",
                    "phone_number": "0312345678"
                },
                "lines": [
                    {
                        "date": "2023/10/01",
                        "name": "商品A",
                        "unit_price": 1000,
                        "quantity": 2,
                        "tax_rate": 10
                    }
                ],
                "pay_types": [
                    "Virtualaccount",
                    "Card"
                ]
            }

            # HTTP PUTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                invoice_id = '<Invoice ID>'  # ここにInvoice IDを設定
                endpoint = "/v1/invoices/#{invoice_id}"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    is_uncollectible: false,
                    bill_mail_send_flag: "0",
                    receipt_mail_send_flag: "0",
                    underpayment_mail_send_flag: "0",
                    invoice_number: "INV123456",
                    customer_id: "CUST001",
                    customer_honorific: "様",
                    customer_overwrite: {
                        name: "株式会社テスト",
                        email: "test@example.com",
                        addr_country: "JP",
                        addr_state: "13",
                        addr_city: "新宿区",
                        addr_line_1: "1-1-1",
                        addr_line_2: "テストビル",
                        addr_line_3: "",
                        addr_post_code: "1600022"
                    },
                    issuer_overwrite: {
                        addr_country: "JP",
                        addr_state: "13",
                        addr_city: "新宿区",
                        addr_line_1: "1-1-1",
                        addr_line_2: "テストビル",
                        addr_line_3: "",
                        addr_post_code: "1600022",
                        email: "issuer@example.com",
                        phone_number: "0312345678"
                    },
                    lines: [
                        {
                            date: "2023/10/01",
                            name: "商品A",
                            unit_price: 1000,
                            quantity: 2,
                            tax_rate: 10
                        }
                    ],
                    pay_types: [
                        "Virtualaccount",
                        "Card"
                    ]
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    delete:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: deleteInvoices
      tags:
        - インボイス機能
      summary: インボイス 削除
      description: |
        指定したIDを持つ、下書き状態のインボイス情報を削除します。\
        発行済みのインボイス情報は削除できません。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを販売主とした請求書情報を削除します。
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: |
            インボイスID
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetail.Deleting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/invoices/{id}'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const invoiceId = "<Invoice ID>"; // 実際のInvoice IDを設定

                const endpoint = `${BASE_URL}/v1/invoices/${invoiceId}`;

                const response = await fetch(endpoint, {
                    method: "DELETE",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });

                if (response.ok) {
                    const result = await response.json();
                    console.log('削除成功:', result);
                } else {
                    console.error('削除に失敗しました:', await response.text());
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーとインボイスIDを指定\n\tapiKey := \"<Secret API Key>\"\n\tinvoiceID := \"<Invoice ID>\" // 削除するインボイスIDを指定\n\n\t// リクエストの作成\n\treq, err := http.NewRequest(\n\t\t\"DELETE\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/invoices/%s\", invoiceID),\n\t\tnil,\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// HTTPステータスコードを表示\n\tfmt.Println(\"HTTPステータスコード:\", res.StatusCode)\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $invoiceId = '<Invoice ID>'; // 実際のInvoice IDを設定

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices/{$invoiceId}";

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'DELETE');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            invoice_id = '<Invoice ID>'  # 実際のInvoice IDを設定

            url = f'https://api.test.fincode.jp/v1/invoices/{invoice_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.delete(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
              invoice_id = '<Invoice ID>' # 実際のInvoice IDを設定

              endpoint = "/v1/invoices/#{invoice_id}"

              uri = URI.parse(BASE_URL + endpoint)
              http = Net::HTTP.new(uri.host, uri.port)
              http.use_ssl = true

              # リクエストの作成
              request = Net::HTTP::Delete.new(uri.request_uri)
              request['Authorization'] = "Bearer #{API_KEY}"

              # リクエストの送信
              response = http.request(request)

              case response
              when Net::HTTPSuccess
                puts 'SUCCESS'
              else
                puts 'ERROR'
              end

              # レスポンスの表示
              puts response.body
            end

            main
  /v1/invoices/{id}/open:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: openInvoices
      tags:
        - インボイス機能
      summary: インボイス 発行
      description: |
        IDで指定したインボイス情報をもとに請求を開始します。請求書WebページのURL発行、請求先顧客へのメール送信などを行います。\
        このAPIの呼び出し以降はインボイス 更新APIでは 回収困難フラグ 、および 加盟店自由項目 のみ更新できます。
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: |
            インボイスID
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを請求元としたインボイス請求書の請求を実施します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceDetail.Opening.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetail.Opening.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                  "bill_mail_send_flag": "1",
                  "receipt_mail_send_flag": "0",
                  "underpayment_mail_send_flag": "1"
            }' \
            'https://api.test.fincode.jp/v1/invoices/{id}/open'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const invoiceId = "<Invoice ID>";  // 実際のInvoice IDに置き換えてください

                const endpoint = `${BASE_URL}/v1/invoices/${invoiceId}/open`;

                const response = await fetch(endpoint, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                    body: JSON.stringify({
                        bill_mail_send_flag: "1",
                        receipt_mail_send_flag: "0",
                        underpayment_mail_send_flag: "1",
                    }),
                });

                if (response.ok) {
                    const result = await response.json();
                    console.log("成功:", result);
                } else {
                    const error = await response.json();
                    console.error("エラー:", error);
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーとインボイスIDを指定\n\tapiKey := \"<Secret API Key>\"\n\tinvoiceID := \"<Invoice ID>\" // インボイスIDを指定\n\n\t// リクエストボディの作成\n\tbody := map[string]string{\n\t\t\"bill_mail_send_flag\":       \"1\",\n\t\t\"receipt_mail_send_flag\":    \"0\",\n\t\t\"underpayment_mail_send_flag\": \"1\",\n\t}\n\t\n\t// JSONエンコード\n\tmarshalledBody, err := json.Marshal(body)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストボディのエンコードエラー: %v\", err)\n\t}\n\n\t// URLの設定\n\turl := fmt.Sprintf(\"https://api.test.fincode.jp/v1/invoices/%s/open\", invoiceID)\n\n\t// HTTPリクエストの作成\n\treq, err := http.NewRequest(\"PUT\", url, bytes.NewBuffer(marshalledBody))\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// レスポンスのステータスコードの表示\n\tfmt.Println(\"Status:\", res.Status)\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $invoiceId = '<Invoice ID>';  // 実際のInvoice IDに置き換えてください

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices/{$invoiceId}/open";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "bill_mail_send_flag" => "1",
                "receipt_mail_send_flag" => "0",
                "underpayment_mail_send_flag" => "1"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, "PUT");
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);

            if ($response === false) {
                // エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                // APIからのデータを処理
                echo "レスポンス: " . $response;
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            invoice_id = '<Invoice ID>'  # 実際のInvoice IDに置き換えてください

            url = f'https://api.test.fincode.jp/v1/invoices/{invoice_id}/open'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "bill_mail_send_flag": "1",
                "receipt_mail_send_flag": "0",
                "underpayment_mail_send_flag": "1"
            }

            # HTTP PUTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
              invoice_id = '<Invoice ID>'  # 実際のInvoice IDに置き換えてください
              endpoint = "/v1/invoices/#{invoice_id}/open"
              
              uri = URI.parse(BASE_URL + endpoint)

              http = Net::HTTP.new(uri.host, uri.port)
              http.use_ssl = true

              data = {
                bill_mail_send_flag: "1",
                receipt_mail_send_flag: "0",
                underpayment_mail_send_flag: "1"
              }

              # リクエストの作成
              request = Net::HTTP::Put.new(uri.request_uri)
              request['Authorization'] = "Bearer #{API_KEY}"
              request['Content-Type'] = 'application/json'

              request.body = data.to_json

              # リクエストの送信
              response = http.request(request)

              case response
              when Net::HTTPSuccess
                puts 'SUCCESS'
              else
                puts 'ERROR'
              end

              # レスポンスの表示
              puts response.body
            end

            main
  /v1/invoices/{id}/cancel:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: cancelInvoices
      tags:
        - インボイス機能
      summary: インボイス キャンセル
      description: |
        指定したIDを持つ、発行済みのインボイス情報をキャンセルします。\
        キャンセルは請求の取り下げを意味し、一度キャンセルしたインボイス情報をもとに再度請求することはできません。
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: |
            インボイスID
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを請求元としたインボイス請求書のキャンセルができます。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetail.Canceling.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
            \
            'https://api.test.fincode.jp/v1/invoices/{id}/cancel'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const invoiceId = "<Invoice ID>";

                const endpoint = `${BASE_URL}/v1/invoices/${invoiceId}/cancel`;

                const response = await fetch(endpoint, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                });

                if (!response.ok) {
                    console.error("Error cancelling invoice:", await response.text());
                } else {
                    const result = await response.json();
                    console.log("Invoice cancellation successful:", result);
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーとインボイスIDを指定\n\tapiKey := \"<Secret API Key>\"\n\tinvoiceID := \"<Invoice ID>\" // インボイスIDを指定\n\n\t// URLの設定\n\turl := fmt.Sprintf(\"https://api.test.fincode.jp/v1/invoices/%s/cancel\", invoiceID)\n\n\t// HTTPリクエストの作成\n\treq, err := http.NewRequest(\"PUT\", url, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// レスポンスのステータスコードの表示\n\tfmt.Println(\"Status:\", res.Status)\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $invoiceId = '<Invoice ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices/{$invoiceId}/cancel";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, "PUT");
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);

            if ($response === false) {
                // エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                // APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            invoice_id = '<Invoice ID>'

            url = f'https://api.test.fincode.jp/v1/invoices/{invoice_id}/cancel'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            # HTTP PUTリクエストの送信
            try:
                response = requests.put(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                invoice_id = '<Invoice ID>'
                endpoint = "/v1/invoices/#{invoice_id}/cancel"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/invoices/{id}/paid_externally:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: paidExternallyInvoices
      tags:
        - インボイス機能
      summary: インボイス 外部支払いマーク
      description: |
        指定したIDを持つ発行済みのインボイス情報を、fincodeによる決済機能でない方法で支払われたとしてマークします。\
        このインボイス情報のステータスは支払い完了（`PAID`）へ遷移し、fincode外支払フラグ（`is_paid_externally`）が`true` になります。
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: |
            インボイスID
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップを請求元としたインボイス請求書についての更新ができます。
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                transaction_date:
                  type: string
                  minLength: 10
                  maxLength: 10
                  description: |
                    支払い完了日  
                    yyyy/MM/dd形式  
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetail.Marking.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                  "transaction_date": "2024/01/01"
            }' \
            'https://api.test.fincode.jp/v1/invoices/{id}/paid_externally'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const invoiceId = "<Invoice ID>";  // 適切なInvoice IDに置き換えてください
                const endpoint = `${BASE_URL}/v1/invoices/${invoiceId}/paid_externally`;

                const response = await fetch(endpoint, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                    body: JSON.stringify({
                        transaction_date: "2024/01/01",  // 日付を適切に設定
                    }),
                });

                if (!response.ok) {
                    console.error(`Error: ${response.statusText}`);
                    return;
                }

                const data = await response.json();
                console.log(data);
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーとインボイスIDを指定\n\tapiKey := \"<Secret API Key>\"\n\tinvoiceID := \"<Invoice ID>\" // インボイスIDを指定\n\n\t// リクエストボディの作成\n\tbody := map[string]string{\n\t\t\"transaction_date\": \"2024/01/01\",\n\t}\n\t\n\t// JSONエンコード\n\tmarshalledBody, err := json.Marshal(body)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストボディのエンコードエラー: %v\", err)\n\t}\n\n\t// URLの設定\n\turl := fmt.Sprintf(\"https://api.test.fincode.jp/v1/invoices/%s/paid_externally\", invoiceID)\n\n\t// HTTPリクエストの作成\n\treq, err := http.NewRequest(\"PUT\", url, bytes.NewBuffer(marshalledBody))\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// レスポンスのステータスコードの表示\n\tfmt.Println(\"Status:\", res.Status)\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $invoiceId = '<Invoice ID>';  // 適切なInvoice IDに置き換えてください
            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices/{$invoiceId}/paid_externally";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "transaction_date" => "2024/01/01",  // 日付を適切に設定
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, "PUT");
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            invoice_id = '<Invoice ID>'  # 適切なInvoice IDに置き換えてください

            url = f'https://api.test.fincode.jp/v1/invoices/{invoice_id}/paid_externally'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "transaction_date": "2024/01/01",  # 日付を適切に設定
            }

            # HTTP PUTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
              invoice_id = '<Invoice ID>'  # 適切なInvoice IDに置き換えてください
              endpoint = "/v1/invoices/#{invoice_id}/paid_externally"
              
              uri = URI.parse(BASE_URL + endpoint)

              http = Net::HTTP.new(uri.host, uri.port)
              http.use_ssl = true

              data = {
                transaction_date: "2024/01/01"  # 日付を適切に設定
              }

              # リクエストの作成
              request = Net::HTTP::Put.new(uri.request_uri)
              request['Authorization'] = "Bearer #{API_KEY}"
              request['Content-Type'] = 'application/json'

              request.body = data.to_json

              # リクエストの送信
              response = http.request(request)

              case response
              when Net::HTTPSuccess
                puts 'SUCCESS'
              else
                puts 'ERROR'
              end

              # レスポンスの表示
              puts response.body
            end

            main
  /v1/invoices/{id}/virtual_account/refresh:
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: refreshInvoicesVirtualaccount
      tags:
        - インボイス機能
      summary: インボイス バーチャル口座再発行
      description: |
        指定したインボイスに割り当てられているバーチャル口座について、期限が切れていて口座がクローズされている場合、新たなバーチャル口座を割り当てます。
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 30
          description: インボイスID
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceDetail.Refresh.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
            \
            'https://api.test.fincode.jp/v1/invoices/{id}/refresh'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const invoiceId = "<Invoice ID>";

                const endpoint = `${BASE_URL}/v1/invoices/${invoiceId}/refresh`;

                const response = await fetch(endpoint, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                });

                if (!response.ok) {
                    console.error("Error cancelling invoice:", await response.text());
                } else {
                    const result = await response.json();
                    console.log("Invoice cancellation successful:", result);
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーとインボイスIDを指定\n\tapiKey := \"<Secret API Key>\"\n\tinvoiceID := \"<Invoice ID>\" // インボイスIDを指定\n\n\t// URLの設定\n\turl := fmt.Sprintf(\"https://api.test.fincode.jp/v1/invoices/%s/refresh\", invoiceID)\n\n\t// HTTPリクエストの作成\n\treq, err := http.NewRequest(\"PUT\", url, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// レスポンスのステータスコードの表示\n\tfmt.Println(\"Status:\", res.Status)\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $invoiceId = '<Invoice ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/invoices/{$invoiceId}/refresh";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, "PUT");
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);

            if ($response === false) {
                // エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                // APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            invoice_id = '<Invoice ID>'

            url = f'https://api.test.fincode.jp/v1/invoices/{invoice_id}/refresh'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            # HTTP PUTリクエストの送信
            try:
                response = requests.put(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                invoice_id = '<Invoice ID>'
                endpoint = "/v1/invoices/#{invoice_id}/refresh"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/accounts:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveAccountList
      tags:
        - 売上入金
      summary: 売上入金 一覧取得
      description: |
        売上入金情報を一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップの売上入金情報から一覧で取得します。
        - name: クエリ
          in: query
          description: |
            売上入金情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/Account.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/accounts'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const accounts = await fincode.accounts.retrieveList({
                        limit: 10,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", \"https://api.test.fincode.jp/v1/accounts\", nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/accounts";
            $queryParams = [
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/accounts'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }
            query_params = { 'limit': 10 }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/accounts"
                query_params =  { limit: 10 }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params) 

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/accounts/{id}:
    get:
      operationId: retrieveAccount
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - 売上入金
      summary: 売上入金 取得
      description: |
        IDで指定した売上入金を取得します。\
        `aggregate_term_start`から`aggregate_term_end`までの期間における売上の集計結果が含まれます。\
        \
        集計された個々のレコードについては 売上入金明細 一覧取得API を利用することで取得できます。
      parameters:
        - name: id
          in: path
          description: 売上入金ID
          schema:
            allOf:
              - $ref: '#/components/schemas/AccountId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップの売上入金情報のうち、指定したIDの売上入金情報を取得します。
          required: false
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/accounts/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const accountId = "<Account ID>";

                try {
                    // リクエストの送信
                    const account = await fincode.accounts.retrieve(accountId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\taccountID := \"<Account ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/accounts/%s\", accountID), nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $accountId = '<Account ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/accounts/{$accountId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            account_id = '<Account ID>'

            url = f'https://api.test.fincode.jp/v1/accounts/{account_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                account_id = '<Account ID>'
                endpoint = "/v1/accounts/#{account_id}"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/accounts/{id}/detail:
    get:
      operationId: retrieveAccountDetailList
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      tags:
        - 売上入金
      summary: 売上入金詳細 一覧取得
      description: |
        IDで指定した売上入金に紐づく売上入金詳細を一覧で取得します。\
        1つの売上入金明細は、1件の決済／キャンセル／チャージバック／チャージバック取消調整のいずれかに対応します。
      parameters:
        - name: id
          in: path
          description: 売上入金ID
          schema:
            $ref: '#/components/schemas/AccountId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップの売上入金情報のうち、指定したIDの売上入金情報の売上入金詳細を取得します。
          required: false
        - in: query
          name: クエリ
          description: |
            売上入金詳細の一覧取得において検索条件となるクエリパラメータ
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
          required: false
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountDetail.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/accounts/{id}/detail'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const accountId = "<Account ID>";

                try {
                    // リクエストの送信
                    const accountDetails = await fincode.accounts.retrieveDetailList(
                        accountId,
                        { limit: 10 }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\taccountID := \"<Account ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/accounts/%s/detail\", accountID), nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $accountId = '<Account ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/accounts/{$accountId}/detail";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            account_id = '<Account ID>'

            url = f'https://api.test.fincode.jp/v1/accounts/{account_id}/detail'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }
            query_params = { 'limit': 10 }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                account_id = '<Account ID>'
                endpoint = "/v1/accounts/#{account_id}/detail"

                query_params =  { limit: 10 }
                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/platform_accounts:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePlatformAccountList
      tags:
        - プラットフォーム利用料収入
      summary: プラットフォーム利用料収入 一覧取得
      description: |
        プラットフォーム利用料による売上入金情報を一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - name: クエリ
          in: query
          description: |
            プラットフォーム利用料による売上入金情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/PlatformAccount.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformAccount.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/platform_accounts'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const platformAccounts = await fincode.platformAccounts.retrieveList({
                        limit: 10,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\t\"https://api.test.fincode.jp/v1/platform_accounts\",\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';


            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/platform_accounts";
            $queryParams = [
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/platform_accounts'
            query_params = {
                'limit': "10",
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/platform_accounts"
                query_params =  { limit: 10 }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/platform_accounts/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePlatformAccount
      tags:
        - プラットフォーム利用料収入
      summary: プラットフォーム利用料収入 取得
      description: |
        IDで指定したプラットフォーム利用料による売上入金情報を取得します。\
        `aggregate_term_start`から`aggregate_term_end`までの期間におけるプラットフォーム利用料による売上の集計結果が含まれます。\
        \
        テナントショップごとの利用料収入については プラットフォーム利用料収入サマリー 一覧取得API を利用することで取得できます。
      parameters:
        - name: id
          in: path
          description: プラットフォーム利用料収入ID
          schema:
            allOf:
              - $ref: '#/components/schemas/PlatformAccountId_schema'
          required: true
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformAccount.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/platform_accounts/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const platformAccountId = "<Platform Account ID>";

                try {
                    // リクエストの送信
                    const customer = await fincode.platformAccounts.retrieve(
                        platformAccountId
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tplatformAccountID := \"<Platform Account ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/platform_accounts/%s\", platformAccountID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $platformAccountId = '<Platform Account ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/platform_accounts/{$platformAccountId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            platform_account_id = '<Platform Account ID>'

            url = f'https://api.test.fincode.jp/v1/platform_accounts/{platform_account_id}'


            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                platform_account_id = '<Platform Account ID>'

                endpoint = "/v1/platform_accounts/#{platform_account_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/platform_accounts/{id}/summary:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePlatformAccountSummaryList
      tags:
        - プラットフォーム利用料収入
      summary: プラットフォーム利用料収入サマリー 一覧取得
      description: |
        IDで指定したプラットフォーム利用料収入のサマリーを一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。\
        サマリー情報の中にはテナントショップごとの利用料収入についての情報が含まれます。
      parameters:
        - name: id
          in: path
          description: プラットフォーム利用料収入ID
          schema:
            allOf:
              - $ref: '#/components/schemas/PlatformAccountId_schema'
          required: true
        - name: クエリ
          in: query
          description: |
            プラットフォーム利用料による売上入金情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/PlatformAccountSummary.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformAccountSummary.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/platform_accounts/{id}/summary'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const platformAccountId = "<Platform Account ID>";

                try {
                    // リクエストの送信
                    const platformSummaries =
                        await fincode.platformAccounts.retrieveSummaryList(
                            platformAccountId
                        );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tplatformAccountID := \"<Platform Account ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/platform_accounts/%s/summary\", platformAccountID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $platformAccountId = '<Platform Account ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/platform_accounts/{$platformAccountId}/summary";
            $queryParams = [
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            platform_account_id = '<Platform Account ID>'

            url = f'https://api.test.fincode.jp/v1/platform_accounts/{platform_account_id}/summary'
            query_params = {
                'limit': "10",
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                platform_account_id = '<Platform Account ID>'

                endpoint = "/v1/platform_accounts/#{platform_account_id}/summary"
                query_params =  { limit: 10 }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/shop_charge_backs:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveChargebackList
      tags:
        - チャージバック
      summary: チャージバック 一覧取得
      description: |
        チャージバック情報を一覧で取得します。クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップの売上入金情報から一覧で取得します。
        - name: クエリ
          in: query
          description: |
            チャージバック情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/ShopChargeBack.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopChargeBack.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |-
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/shop_charge_backs'
        - lang: node
          label: Node.js
          source: |-
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const endpoint = `${BASE_URL}/v1/shop_charge_backs`;

                const response = await fetch(endpoint, {
                    method: "GET",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                    },
                });
                const chargebacks = await response.json();
                console.log(chargebacks); // 取得したチャージバックデータを出力
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// APIキーの指定\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, err := http.NewRequest(\n\t\t\"GET\",\n\t\t\"https://api.test.fincode.jp/v1/shop_charge_backs\",\n\t\tnil,\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストの作成エラー: %v\", err)\n\t}\n\n\t// ヘッダーの設定\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// クライアントの作成とリクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエストエラー: %v\", err)\n\t}\n\tdefer res.Body.Close()\n\n\t// レスポンスのステータスコードの表示\n\tfmt.Println(\"Status:\", res.Status)\n}"
        - lang: php
          label: PHP
          source: |-
            <?php

            $apiKey = '<Secret API Key>';
            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/shop_charge_backs"; // GETリクエストのエンドポイント

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, 2);

            $response = curl_exec($session);

            if ($response === false) {
                // エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                // APIからのデータを処理
                var_dump($response); // レスポンスを出力
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |-
            import requests

            api_key = '<Secret API Key>'
            base_url = "https://api.test.fincode.jp"
            endpoint = "/v1/shop_charge_backs"  # GETリクエストのエンドポイント

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(f"{base_url}{endpoint}", headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |-
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/shop_charge_backs"  # GETリクエストのエンドポイント

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                    # レスポンスの表示
                    puts JSON.pretty_generate(JSON.parse(response.body))
                else
                    puts 'ERROR'
                    # エラーの表示
                    puts response.body
                end
            end

            main
  /v1/shop_charge_backs/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveChargeback
      tags:
        - チャージバック
      summary: チャージバック 取得
      description: |
        チャージバック情報を取得します。
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: |
            チャージバックID
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            代理実行対象のテナントショップID。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopChargeBack.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
  /v1/shop_charge_backs/{id}/reply:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: replyChargeback
      tags:
        - チャージバック
      summary: チャージバック 回答登録
      description: |
        チャージバックに対する回答を登録します。
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: |
            チャージバックID
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            代理実行対象のテナントショップID。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopChargeBack.Reply.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopChargeBack.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
  /v1/charge_backs/file_upload:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: uploadChargebackFile
      tags:
        - チャージバック
      summary: チャージバック 反証資料アップロード
      description: |
        チャージバックの反証資料ファイルをアップロードします。
      parameters:
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            代理実行対象のテナントショップID。
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ExaminationFile.Uploading.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExaminationFile.Uploading.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
  /v1/platforms:
    get:
      tags:
        - プラットフォームショップ
      operationId: retrievePlatformShopList
      summary: プラットフォームショップ 一覧取得
      description: |
        プラットフォームショップ（メインショップ・サブショップ）を一覧で取得します。\
        クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - name: クエリ
          in: query
          description: |
            プラットフォーム情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/PlatformShop.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformShop.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/platforms'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const platformShops = await fincode.platforms.retrieveList({
                        limit: 1,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\t\"https://api.test.fincode.jp/v1/platforms\",\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/platforms";
            $queryParams = [
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/platforms'
            query_params = {
                'limit': "10",
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/platforms"
                query_params =  { limit: 10 }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/platforms/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrievePlatformShop
      tags:
        - プラットフォームショップ
      summary: プラットフォームショップ 取得
      description: |
        `id`で指定したプラットフォームショップ（メインショップ・サブショップ）を取得します。
      parameters:
        - name: id
          in: path
          description: ショップID
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformShop.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/platforms/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const platformShopId = "<Platform Shop ID>";

                try {
                    // リクエストの送信
                    const platformShop = await fincode.platforms.retrieve(platformShopId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tplatformShopID := \"<Platform Shop ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/platforms/%s\", platformShopID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $platformShopId = '<Platform Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/platforms/{$platformShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            platform_shop_id = '<Platform Shop ID>'

            url = f'https://api.test.fincode.jp/v1/platforms/{platform_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                platform_shop_id = '<Platform Shop ID>'
                endpoint = "/v1/platforms/#{platform_shop_id}"
                query_params =  { limit: 10 }
                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updatePlatformShop
      tags:
        - プラットフォームショップ
      summary: プラットフォームショップ 更新
      description: |
        `examination_master_id`で指定した決済手段に関してプラットフォーム利用料を更新します。
      parameters:
        - name: id
          in: path
          description: ショップID
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformShop.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformShop.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "examination_master_id": "vm",
                "platform_rate": "5.00"
            }' \
            'https://api.test.fincode.jp/v1/platforms/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const platformShopId = "<Platform Shop ID>";

                try {
                    // リクエストの送信
                    const platformShop = await fincode.platforms.update(platformShopId, {
                        examination_master_id: "vm",
                        platform_rate: "5.0",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tplatformShopID := \"<Platform Shop ID>\"\n\n\tbody := UpdatingPlatformShopRequest{\n\t\tExaminationMasterID: stringPointer(\"vm\"),\n\t\tPlatformRate:        stringPointer(\"5.00\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/platforms/%s\", platformShopID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingPlatformShopRequest struct {\n\tExaminationMasterID *string `json:\"examination_master_id,omitempty\"`\n\tPlatformRate        *string `json:\"platform_rate,omitempty\"`\n\tFixedFee            *string `json:\"fixed_fee,omitempty\"`\n\tWebRegistrationFee  *string `json:\"web_registration_fee,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $platformShopId = '<Platform Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/platforms/{$platformShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "examination_master_id" => "vm",
                "platform_rate" => "5.0",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            platform_shop_id = '<Platform Shop ID>'

            url = f'https://api.test.fincode.jp/v1/platforms/{platform_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "examination_master_id": "jad",
                "platform_rate": "5.00"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                platform_shop_id = 's_22080402900'
                endpoint = "/v1/platforms/#{platform_shop_id}"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    examination_master_id: 'vm',
                    platform_rate: '5.6'
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/tenants:
    get:
      tags:
        - テナントショップ
      operationId: retrieveTenantShopList
      summary: テナントショップ 一覧取得
      description: |
        テナントショップを一覧で取得します。\
        クエリパラメータを指定して取得する条件を絞り込めます。
      parameters:
        - name: クエリ
          in: query
          description: |
            テナント情報の一覧取得において検索条件となるクエリパラメータ
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/Pagination.QueryParams'
              - $ref: '#/components/schemas/TenantShop.ListRetrieving.QueryParams'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantShop.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/tenants'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const tenants = await fincode.tenants.retrieveList({
                        limit: 10,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", \"https://api.test.fincode.jp/v1/tenants\", nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/tenants";
            $queryParams = [
                "limit" => 10,
            ];

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint . '?' . http_build_query($queryParams));
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'


            url = f'https://api.test.fincode.jp/v1/tenants'
            query_params = {
                'limit': "10",
            }

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers, params=query_params)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/tenants"
                query_params =  { limit: 10 }

                uri = URI.parse(BASE_URL + endpoint)
                uri.query = URI.encode_www_form(query_params)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/tenants/{id}:
    get:
      tags:
        - テナントショップ
      operationId: retrieveTenantShop
      summary: テナントショップ 取得
      description: |
        `id`で指定したテナント情報を取得します。
      parameters:
        - name: id
          in: path
          description: |
            ショップID
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantShop.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/tenants/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const tenantShopId = "<Tenant Shop ID>";

                try {
                    // リクエストの送信
                    const tenantShop = await fincode.tenants.retrieve(tenantShopId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/tenants/%s\", tenantShopID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/tenants/{$tenantShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            tenant_shop_id = '<Tenant Shop ID>'

            url = f'https://api.test.fincode.jp/v1/tenants/{tenant_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/tenants/#{tenant_shop_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updateTenantShop
      tags:
        - テナントショップ
      summary: テナントショップ 更新
      description: |
        `examination_master_id`で指定した決済手段におけるプラットフォーム利用料などの設定の変更を`id`で指定したテナントに対して実行します。
      parameters:
        - name: id
          in: path
          description: |
            ショップID
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantShop.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantShop.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "examination_master_id": "<Examination Master ID>",
                "platform_rate": "4.8"
            }' \
            'https://api.test.fincode.jp/v1/tenants/{id}'
        - lang: node
          label: Node.js
          source: "import { createFincode } from \"@fincode/node\"\n\nconst API_KEY = \"<Secret API Key>\";\n\n(async () => {\n    const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });\n\n\t[TODO] path params\n\n    try {\n        // リクエストの送信\n        const customer = await fincode.tenants.update({\n            [TODO] body or query\n        });\n    } catch (e) {\n        // エラーの処理\n    }\n})();\n"
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\tbody := UpdatingTenantShopRequest{\n\t\tExaminationMasterID:       stringPointer(\"paypay\"),\n\t\tPayPayContentCategoryType: stringPointer(\"1\"),\n\t\tPlatformRate:              stringPointer(\"8.0\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/tenants/%s\", tenantShopID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingTenantShopRequest struct {\n\tExaminationMasterID       *string `json:\"examination_master_id,omitempty\"`\n\tPlatformRate              *string `json:\"platform_rate,omitempty\"`\n\tFixedFee                  *string `json:\"fixed_fee,omitempty\"`\n\tWebRegistrationFee        *string `json:\"web_registration_fee,omitempty\"`\n\tPayPayContentCategoryType *string `json:\"paypay_content_category_type,omitempty\"`\n\tAPIKeyDisplayFlag         *string `json:\"api_key_display_flag,omitempty\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/tenants/{$tenantShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $data = json_encode([
                "examination_master_id" => "vm",
                "platform_rate" => "5.0"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            tenant_shop_id = '<Tenant Shop ID>'

            url = f'https://api.test.fincode.jp/v1/tenants/{tenant_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "examination_master_id": "jad",
                "platform_rate": "5.00"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/tenants/#{tenant_shop_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    examination_master_id: 'jad',
                    platform_rate: '6.0',
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/tenant_entries:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createTenantWithNewUser
      tags:
        - テナント申請管理
      summary: テナントショップ 作成（新規ユーザー登録）
      description: |
        新規ユーザーを作成し、作成されたユーザーをオーナーとして新規テナントショップを作成するAPIです。\
        このAPIでのテナント作成に成功すると、登録されたメールアドレス宛にメールアドレス認証メールが送信されます。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/POST.TenantEntries.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST.TenantEntries.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "email": "<New User Email Address>",
                "password": "<New User Password>",
                "name": "<New User Name>",
                "tenant_url_id": "<Tenant Invitation URL ID>"
            }' \
            'https://api.test.fincode.jp/v1/tenant_entries'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const tenantShop = await fincode.tenants.createWithNewUser({
                        name: "New User",
                        email: "new-user@example.com",
                        password: "new-user-password",
                        tenant_url_id: "<Tenant Invitaion URL ID>",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := CreatingTenantWithNewUserRequest{\n\t\tEmail:       \"new-user@example.com\",\n\t\tPassword:    \"new-user-password\",\n\t\tName:        \"New User\",\n\t\tTenantURLID: \"<Tenant URL ID>\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", \"https://api.test.fincode.jp/v1/tenant_entries\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingTenantWithNewUserRequest struct {\n\tEmail       string `json:\"email\"`\n\tPassword    string `json:\"password\"`\n\tName        string `json:\"name\"`\n\tTenantURLID string `json:\"tenant_url_id\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/tenant_entries";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "email" => "new-user@example.com",
                "password" => "new-user-password",
                "name" => "New User",
                "tenant_url_id" => "<Tenant Invitaion URL ID>",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/tenant_entries'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "email": "<New User Email Address>",
                "password": "<New User Password>",
                "name": "<New User Name>",
                "tenant_url_id": "<Tenant Invitation URL ID>"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/tenant_entries"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true
                
                data = {
                    email: "<New User Email Address>",
                    password: "<New User Password>",
                    name: "<New User Name>",
                    tenant_url_id: "<Tenant Invitation URL ID>"
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/join_tenants:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createTenantWithExistingUser
      tags:
        - テナント申請管理
      summary: テナントショップ 作成（既存ユーザー参加）
      description: |
        指定したプラットフォームショップのユーザーを新規テナントショップのオーナーとして新規テナントショップを作成するAPIです。\
        \
        `password`パラメータに関して、ユーザーのパスワードがfincode管理画面アプリケーション上で更新されることを想定して実装・運用することが推奨されます。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/POST.JoinTenants.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST.JoinTenants.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "email": "platform-user@example.com",
                "password": "platform-user-password",
                "tenant_url_id": "<Tenant Invitation URL ID>"
            }' \
            'https://api.test.fincode.jp/v1/join_tenants'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const tenantShop = await fincode.tenants.createWithExistingUser({
                        email: "existing-user@example.com",
                        password: "existing-user-password",
                        tenant_url_id: "<Tenant Invitation URL ID>",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := CreatingTenantWithNewUserRequest{\n\t\tEmail:    \"new-user@example.com\",\n\t\tPassword: \"new-user-password\",\n\t\tName:     \"New User\",\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", \"https://api.test.fincode.jp/v1/join_tenants\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n\ntype CreatingTenantWithNewUserRequest struct {\n\tEmail       string `json:\"email\"`\n\tPassword    string `json:\"password\"`\n\tName        string `json:\"name\"`\n\tTenantUrlId string `json:\"tenant_url_id\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/join_tenants";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "email" => "platform-user@example.com",
                "password" => "platform-user-password",
                "tenant_url_id" => "<Tenant Invitation URL ID>"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/join_tenants'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "email": "platform-user@example.com",
                "password": "platform-user-password",
                "tenant_url_id": "<Tenant Invitation URL ID>"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/join_tenants"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    email: "platform-user@example.com",
                    password: "platform-user-password",
                    tenant_url_id: "<Tenant Invitation URL ID>"
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/contracts/examinations_v2/tenants/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveTenantExaminationInfoV2
      tags:
        - テナント申請管理
      summary: テナントショップ本番環境申請情報 取得
      description: |
        `id`で指定したテナントショップの本番環境申請情報を取得します。
      parameters:
        - name: id
          in: path
          description: |
            指定したテナントショップの本番環境申請情報を取得します。`Tenant-Shop-Id`ヘッダーも併せて指定してください。
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップの本番環境申請情報を取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExaminationInfo.V2.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Tenant-Shop-Id: <Tenant Shop ID>" \
            'https://api.test.fincode.jp/v1/contracts/examinations_v2/tenants/{Tenant Shop ID}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const tenantShoptId = "<Tenant Shop ID>";

                try {
                    // リクエストの送信
                    const examinationInfo = await fincode.tenants.retrieveExaminationInfoV2(
                        tenantShoptId,
                        {
                            tenantShoptId: tenantShoptId,
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/contracts/examinations_v2/tenants/%s\", tenantShopID), nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Tenant-Shop-Id\", tenantShopID)\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/contracts/examinations_v2/tenants/{$tenantShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Tenant-Shop-Id: " . $tenantShopId,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );


            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            tenant_shop_id = '<Tenant Shop ID>'

            url = f'https://api.test.fincode.jp/v1/contracts/examinations_v2/tenants/{tenant_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Tenant-Shop-Id': tenant_shop_id,
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/contracts/examinations_v2/tenants/#{tenant_shop_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Tenant-Shop-Id'] = tenant_shop_id

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updateTenantExaminationInfoV2
      tags:
        - テナント申請管理
      summary: テナントショップ本番環境申請情報 更新
      description: |
        `id`で指定したテナントショップの本番環境申請情報を登録します。既に本番環境申請済みのショップのidはご指定いただけません。
      parameters:
        - name: id
          in: path
          description: |
            指定したテナントショップの本番環境申請情報を更新します。`Tenant-Shop-Id`ヘッダーも併せて指定してください。
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップの本番環境申請情報を更新します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExaminationInfo.V2.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExaminationInfo.V2.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -H "Tenant-Shop-Id: <Tenant Shop ID>" \
                -d '{
                "contract_info": {
                    "representative_last_name": "山田",
                    "representative_last_name_kana": "ヤマダ",
                    "representative_first_name": "太郎",
                    "representative_first_name_kana": "タロウ",
                    "representative_postal_code": "123-4567",
                    "representative_prefecture": "東京都",
                    "representative_prefecture_kana": "トウキョウト",
                    "representative_address_municipality": "渋谷区",
                    "representative_address_municipality_kana": "シブヤク",
                    "representative_address_section": "道玄坂",
                    "representative_address_section_kana": "ドウゲンザカ",
                    "representative_address_chrome": "1-2-3",
                    "representative_address_chrome_kana": "イチニサン",
                    "representative_tel": "0312345678",
                    "representative_birthday": "1998/11/01",
                    "representative_gender": 0,
                    "staff1_last_name": "鈴木",
                    "staff1_last_name_kana": "スズキ",
                    "staff1_first_name": "次郎",
                    "staff1_first_name_kana": "ジロウ",
                    "staff1_company_name": "株式会社テスト",
                    "staff1_belongs": "EC運営部",
                    "staff1_tel": "08012345678",
                    "staff1_mail": "staff-1@exampple.com",
                    "corporate": true,
                    "corporate_info": {
                        "corporate_number": "1234567890123",
                        "corporate_name": "株式会社テスト",
                        "corporate_name_kana": "カブシキガイシャテスト",
                        "company_postal_code": "123-4567",
                        "company_prefecture": "東京都",
                        "company_prefecture_kana": "トウキョウト",
                        "company_address_municipality": "渋谷区",
                        "company_address_municipality_kana": "シブヤク",
                        "company_address_section": "道玄坂",
                        "company_address_section_kana": "ドウゲンザカ",
                        "company_address_chrome": "1-2-3",
                        "company_address_chrome_kana": "イチニサン",
                        "company_tel": "0312345678",
                        "capital": 1000000,
                        "established_at": "2018/11/01",
                        "yearly_sales": 100000000,
                        "business_details": "○○の販売"
                    }
                }
            }' \
            'https://api.test.fincode.jp/v1/contracts/examinations_v2/tenants/{Tenant Shop ID}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const tenantShoptId = "<Tenant Shop ID>";

                try {
                    // リクエストの送信
                    const examinationInfo = await fincode.tenants.updateExaminationInfoV2(
                        tenantShoptId,
                        {
                            contract_info: {
                                corporate: true,
                                corporate_info: {
                                    corporate_number: "1234567890123",
                                    corporate_name: "株式会社テスト",
                                    corporate_name_kana: "カブシキガイシャテスト",
                                    // hp: "",
                                    company_prefecture: "東京都",
                                    company_prefecture_kana: "トウキョウト",
                                    company_address_municipality: "渋谷区",
                                    company_address_municipality_kana: "シブヤク",
                                    company_address_section: "道玄坂",
                                    company_address_section_kana: "ドウゲンザカ",
                                    company_address_chrome: "1-2-3",
                                    company_address_chrome_kana: "イチニサン",
                                    company_tel: "0312345678",
                                    company_postal_code: "123-4567",

                                    capital: 1000000,
                                    established_at: "2018/11/01",
                                    yearly_sales: 100000000,
                                    business_details: "○○の販売",
                                },
                                representative_first_name: "山田",
                                representative_first_name_kana: "ヤマダ",
                                representative_last_name: "太郎",
                                representative_last_name_kana: "タロウ",
                                representative_postal_code: "123-4567",
                                representative_prefecture: "東京都",
                                representative_prefecture_kana: "トウキョウト",
                                representative_address_municipality: "渋谷区",
                                representative_address_municipality_kana: "シブヤク",
                                representative_address_section: "道玄坂",
                                representative_address_section_kana: "ドウゲンザカ",
                                representative_address_chrome: "1-2-3",
                                representative_address_chrome_kana: "イチニサン",
                                representative_tel: "0312345678",
                                representative_birthday: "1998/11/01",
                                representative_gender: 0,

                                staff1_first_name: "鈴木",
                                staff1_first_name_kana: "スズキ",
                                staff1_last_name: "次郎",
                                staff1_last_name_kana: "ジロウ",
                                staff1_company_name: "株式会社テスト",
                                staff1_belongs: "EC運営部",
                                staff1_tel: "08012345678",
                                staff1_mail: "staff-1@example.com",
                            },
                        },
                        { tenantShoptId: tenantShoptId }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\tbody := UpdatingExaminationInfoRequest_v2{\n\t\tContractInfo: ContractInfo{\n\t\t\tRepresentativeLastName:                \"山田\",\n\t\t\tRepresentativeLastNameKana:            \"ヤマダ\",\n\t\t\tRepresentativeFirstName:               \"太郎\",\n\t\t\tRepresentativeFirstNameKana:           \"タロウ\",\n\t\t\tRepresentativePostalCode:              \"123-4567\",\n\t\t\tRepresentativePrefecture:              \"東京都\",\n\t\t\tRepresentativePrefectureKana:          \"トウキョウト\",\n\t\t\tRepresentativeAddressMunicipality:     \"渋谷区\",\n\t\t\tRepresentativeAddressMunicipalityKana: \"シブヤク\",\n\t\t\tRepresentativeAddressSection:          \"道玄坂\",\n\t\t\tRepresentativeAddressSectionKana:      \"ドウゲンザカ\",\n\t\t\tRepresentativeAddressChrome:           \"1-2-3\",\n\t\t\tRepresentativeAddressChromeKana:       \"イチニサン\",\n\t\t\tRepresentativeTel:                     \"0312345678\",\n\t\t\tRepresentativeBirthday:                \"1998/11/01\",\n\t\t\tRepresentativeGender:                  0,\n\t\t\tStaff1LastName:                        \"鈴木\",\n\t\t\tStaff1LastNameKana:                    \"スズキ\",\n\t\t\tStaff1FirstName:                       \"次郎\",\n\t\t\tStaff1FirstNameKana:                   \"ジロウ\",\n\t\t\tStaff1CompanyName:                     \"株式会社テスト\",\n\t\t\tStaff1Belongs:                         \"EC運営部\",\n\t\t\tStaff1Tel:                             \"08012345678\",\n\t\t\tStaff1Mail:                            \"staff-1@example.com\",\n\t\t\tCorporate:                             true,\n\t\t\tCorporateInfo: CorporateInfo{\n\t\t\t\tCorporateNumber:                \"1234567890123\",\n\t\t\t\tCorporateName:                  \"株式会社テスト\",\n\t\t\t\tCorporateNameKana:              \"カブシキガイシャテスト\",\n\t\t\t\tCompanyPostalCode:              \"123-4567\",\n\t\t\t\tCompanyPrefecture:              \"東京都\",\n\t\t\t\tCompanyPrefectureKana:          \"トウキョウト\",\n\t\t\t\tCompanyAddressMunicipality:     \"渋谷区\",\n\t\t\t\tCompanyAddressMunicipalityKana: \"シブヤク\",\n\t\t\t\tCompanyAddressSection:          \"道玄坂\",\n\t\t\t\tCompanyAddressSectionKana:      \"ドウゲンザカ\",\n\t\t\t\tCompanyAddressChrome:           \"1-2-3\",\n\t\t\t\tCompanyAddressChromeKana:       \"イチニサン\",\n\t\t\t\tCompanyTel:                     \"0312345678\",\n\t\t\t\tCapital:                        1000000,\n\t\t\t\tEstablishedAt:                  \"2018/11/01\",\n\t\t\t\tYearlySales:                    100000000,\n\t\t\t\tBusinessDetails:                \"○○の販売\",\n\t\t\t},\n\t\t},\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"PUT\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/contracts/examinations_v2/tenants/%s\", tenantShopID), bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\treq.Header.Set(\"Tenant-Shop-Id\", tenantShopID)\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingExaminationInfoRequest_v2 struct {\n\tContractInfo ContractInfo `json:\"contract_info\"`\n}\ntype ContractInfo struct {\n\tRepresentativeLastName                string        `json:\"representative_last_name\"`\n\tRepresentativeLastNameKana            string        `json:\"representative_last_name_kana\"`\n\tRepresentativeFirstName               string        `json:\"representative_first_name\"`\n\tRepresentativeFirstNameKana           string        `json:\"representative_first_name_kana\"`\n\tRepresentativePostalCode              string        `json:\"representative_postal_code\"`\n\tRepresentativePrefecture              string        `json:\"representative_prefecture\"`\n\tRepresentativePrefectureKana          string        `json:\"representative_prefecture_kana\"`\n\tRepresentativeAddressMunicipality     string        `json:\"representative_address_municipality\"`\n\tRepresentativeAddressMunicipalityKana string        `json:\"representative_address_municipality_kana\"`\n\tRepresentativeAddressSection          string        `json:\"representative_address_section\"`\n\tRepresentativeAddressSectionKana      string        `json:\"representative_address_section_kana\"`\n\tRepresentativeAddressChrome           string        `json:\"representative_address_chrome\"`\n\tRepresentativeAddressChromeKana       string        `json:\"representative_address_chrome_kana\"`\n\tRepresentativeAddressBuildingName     *string       `json:\"representative_address_building_name,omitempty\"`\n\tRepresentativeAddressBuildingNameKana *string       `json:\"representative_address_building_name_kana,omitempty\"`\n\tRepresentativeTel                     string        `json:\"representative_tel\"`\n\tRepresentativeBirthday                string        `json:\"representative_birthday\"`\n\tRepresentativeGender                  int           `json:\"representative_gender\"`\n\tStaff1LastName                        string        `json:\"staff1_last_name\"`\n\tStaff1LastNameKana                    string        `json:\"staff1_last_name_kana\"`\n\tStaff1FirstName                       string        `json:\"staff1_first_name\"`\n\tStaff1FirstNameKana                   string        `json:\"staff1_first_name_kana\"`\n\tStaff1CompanyName                     string        `json:\"staff1_company_name\"`\n\tStaff1Belongs                         string        `json:\"staff1_belongs\"`\n\tStaff1Tel                             string        `json:\"staff1_tel\"`\n\tStaff1Mail                            string        `json:\"staff1_mail\"`\n\tStaff2LastName                        *string       `json:\"staff2_last_name,omitempty\"`\n\tStaff2LastNameKana                    *string       `json:\"staff2_last_name_kana,omitempty\"`\n\tStaff2FirstName                       *string       `json:\"staff2_first_name,omitempty\"`\n\tStaff2FirstNameKana                   *string       `json:\"staff2_first_name_kana,omitempty\"`\n\tStaff2CompanyName                     *string       `json:\"staff2_company_name,omitempty\"`\n\tStaff2Belongs                         *string       `json:\"staff2_belongs,omitempty\"`\n\tStaff2Tel                             *string       `json:\"staff2_tel,omitempty\"`\n\tStaff2Mail                            *string       `json:\"staff2_mail,omitempty\"`\n\tCorporate                             bool          `json:\"corporate\"`\n\tCorporateInfo                         CorporateInfo `json:\"corporate_info\"`\n}\ntype CorporateInfo struct {\n\tCorporateNumber                string  `json:\"corporate_number\"`\n\tCorporateName                  string  `json:\"corporate_name\"`\n\tCorporateNameKana              string  `json:\"corporate_name_kana\"`\n\tCompanyPostalCode              string  `json:\"company_postal_code\"`\n\tCompanyPrefecture              string  `json:\"company_prefecture\"`\n\tCompanyPrefectureKana          string  `json:\"company_prefecture_kana\"`\n\tCompanyAddressMunicipality     string  `json:\"company_address_municipality\"`\n\tCompanyAddressMunicipalityKana string  `json:\"company_address_municipality_kana\"`\n\tCompanyAddressSection          string  `json:\"company_address_section\"`\n\tCompanyAddressSectionKana      string  `json:\"company_address_section_kana\"`\n\tCompanyAddressChrome           string  `json:\"company_address_chrome\"`\n\tCompanyAddressChromeKana       string  `json:\"company_address_chrome_kana\"`\n\tCompanyAddressBuildingName     *string `json:\"company_address_building_name,omitempty\"`\n\tCompanyAddressBuildingNameKana *string `json:\"company_address_building_name_kana,omitempty\"`\n\tCompanyTel                     string  `json:\"company_tel\"`\n\tCapital                        int     `json:\"capital\"`\n\tEstablishedAt                  string  `json:\"established_at\"`\n\tYearlySales                    int     `json:\"yearly_sales\"`\n\tBusinessDetails                string  `json:\"business_details\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/contracts/examinations_v2/tenants/{$tenantShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json",
                "Tenant-Shop-Id: " . $tenantShopId,
            ];

            $data = json_encode([
                "contract_info" => [
                    "representative_last_name" => "山田",
                    "representative_last_name_kana" => "ヤマダ",
                    "representative_first_name" => "太郎",
                    "representative_first_name_kana" => "タロウ",
                    "representative_postal_code" => "123-4567",
                    "representative_prefecture" => "東京都",
                    "representative_prefecture_kana" => "トウキョウト",
                    "representative_address_municipality" => "渋谷区",
                    "representative_address_municipality_kana" => "シブヤク",
                    "representative_address_section" => "道玄坂",
                    "representative_address_section_kana" => "ドウゲンザカ",
                    "representative_address_chrome" => "1-2-3",
                    "representative_address_chrome_kana" => "イチニサン",
                    "representative_tel" => "0312345678",
                    "representative_birthday" => "1998/11/01",
                    "representative_gender" => 0,
                    "staff1_last_name" => "鈴木",
                    "staff1_last_name_kana" => "スズキ",
                    "staff1_first_name" => "次郎",
                    "staff1_first_name_kana" => "ジロウ",
                    "staff1_company_name" => "株式会社テスト",
                    "staff1_belongs" => "EC運営部",
                    "staff1_tel" => "08012345678",
                    "staff1_mail" => "staff-1@example.com",
                    "corporate" => true,
                    "corporate_info" => [
                        "corporate_number" => "1234567890123",
                        "corporate_name" => "株式会社テスト",
                        "corporate_name_kana" => "カブシキガイシャテスト",
                        "company_postal_code" => "123-4567",
                        "company_prefecture" => "東京都",
                        "company_prefecture_kana" => "トウキョウト",
                        "company_address_municipality" => "渋谷区",
                        "company_address_municipality_kana" => "シブヤク",
                        "company_address_section" => "道玄坂",
                        "company_address_section_kana" => "ドウゲンザカ",
                        "company_address_chrome" => "1-2-3",
                        "company_address_chrome_kana" => "イチニサン",
                        "company_tel" => "0312345678",
                        "capital" => 1000000,
                        "established_at" => "2018/11/01",
                        "yearly_sales" => 100000000,
                        "business_details" => "○○の販売"
                    ]
                ]
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            tenant_shop_id = '<Tenant Shop ID>'

            url = f'https://api.test.fincode.jp/v1/contracts/examinations_v2/tenants/{tenant_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json',
                'Tenant-Shop-Id': tenant_shop_id,
            }

            data = {
                "contract_info": {
                    "representative_last_name": "山田",
                    "representative_last_name_kana": "ヤマダ",
                    "representative_first_name": "太郎",
                    "representative_first_name_kana": "タロウ",
                    "representative_postal_code": "123-4567",
                    "representative_prefecture": "東京都",
                    "representative_prefecture_kana": "トウキョウト",
                    "representative_address_municipality": "渋谷区",
                    "representative_address_municipality_kana": "シブヤク",
                    "representative_address_section": "道玄坂",
                    "representative_address_section_kana": "ドウゲンザカ",
                    "representative_address_chrome": "1-2-3",
                    "representative_address_chrome_kana": "イチニサン",
                    "representative_tel": "0312345678",
                    "representative_birthday": "1998/11/01",
                    "representative_gender": 0,
                    "staff1_last_name": "鈴木",
                    "staff1_last_name_kana": "スズキ",
                    "staff1_first_name": "次郎",
                    "staff1_first_name_kana": "ジロウ",
                    "staff1_company_name": "株式会社テスト",
                    "staff1_belongs": "EC運営部",
                    "staff1_tel": "08012345678",
                    "staff1_mail": "staff-1@example.com",
                    "corporate": True,
                    "corporate_info": {
                        "corporate_number": "1234567890123",
                        "corporate_name": "株式会社テスト",
                        "corporate_name_kana": "カブシキガイシャテスト",
                        "company_postal_code": "123-4567",
                        "company_prefecture": "東京都",
                        "company_prefecture_kana": "トウキョウト",
                        "company_address_municipality": "渋谷区",
                        "company_address_municipality_kana": "シブヤク",
                        "company_address_section": "道玄坂",
                        "company_address_section_kana": "ドウゲンザカ",
                        "company_address_chrome": "1-2-3",
                        "company_address_chrome_kana": "イチニサン",
                        "company_tel": "0312345678",
                        "capital": 1000000,
                        "established_at": "2018/11/01",
                        "yearly_sales": 100000000,
                        "business_details": "○○の販売"
                    }
                }
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/contracts/examinations_v2/tenants/#{tenant_shop_id}"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    contract_info: {
                        representative_last_name: '山田',
                        representative_last_name_kana: 'ヤマダ',
                        representative_first_name: '太郎',
                        representative_first_name_kana: 'タロウ',
                        representative_postal_code: '123-4567',
                        representative_prefecture: '東京都',
                        representative_prefecture_kana: 'トウキョウト',
                        representative_address_municipality: '渋谷区',
                        representative_address_municipality_kana: 'シブヤク',
                        representative_address_section: '道玄坂',
                        representative_address_section_kana: 'ドウゲンザカ',
                        representative_address_chrome: '1-2-3',
                        representative_address_chrome_kana: 'イチニサン',
                        representative_tel: '0312345678',
                        representative_birthday: '1998/11/01',
                        representative_gender: 0,
                        staff1_last_name: '鈴木',
                        staff1_last_name_kana: 'スズキ',
                        staff1_first_name: '次郎',
                        staff1_first_name_kana: 'ジロウ',
                        staff1_company_name: '株式会社テスト',
                        staff1_belongs: 'EC運営部',
                        staff1_tel: '08012345678',
                        staff1_mail: 'staff-1@example.com',
                        corporate: true,
                        corporate_info: {
                            corporate_number: '1234567890123',
                            corporate_name: '株式会社テスト',
                            corporate_name_kana: 'カブシキガイシャテスト',
                            company_postal_code: '123-4567',
                            company_prefecture: '東京都',
                            company_prefecture_kana: 'トウキョウト',
                            company_address_municipality: '渋谷区',
                            company_address_municipality_kana: 'シブヤク',
                            company_address_section: '道玄坂',
                            company_address_section_kana: 'ドウゲンザカ',
                            company_address_chrome: '1-2-3',
                            company_address_chrome_kana: 'イチニサン',
                            company_tel: '0312345678',
                            capital: 1000000,
                            established_at: '2018/11/01',
                            yearly_sales: 100000000,
                            business_details: '○○の販売'
                        }
                    }
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'
                request['Tenant-Shop-Id'] = tenant_shop_id

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/contracts/examinations/tenants/{id}/files:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: uploadExaminationFile
      tags:
        - テナント申請管理
      summary: テナントショップ 審査ファイルアップロード
      description: |
        `id`で指定したテナントショップの審査に必要なファイルのアップロードを行います。
      parameters:
        - name: id
          in: path
          description: |
            指定したテナントショップのものとしてファイルをアップロードします。`Tenant-Shop-Id`ヘッダーも併せて指定してください。
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップのものとしてファイルをアップロードします。
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ExaminationFile.Uploading.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExaminationFile.Uploading.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: multipart/form-data" \
                -H "Tenant-Shop-Id: <Tenant Shop ID>" \
                -F "data=@<Path To File>;type=application/json;filename=\"<File Name>\"" \
                -F "type=DRIVER_LICENSE_FRONT"
            'https://api.test.fincode.jp/v1/contracts/examinations/tenants/{Tenant Shop ID}/files'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";
            import FormData from "form-data";
            import * as fs from "fs";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const tenantShopId = "<Tenant Shop ID>";

                const endpoint = `${BASE_URL}/v1/contracts/examinations/tenants/${tenantShopId}/files`;

                const form = new FormData();

                // ファイル種別を指定（例として SALES_LICENSE_1: 販売免許証1）
                form.append("type", "SALES_LICENSE_1");

                // ファイルを指定
                const filePath = "<Path to File>";
                const fileName = "<File Name>";
                const file = fs.createReadStream(filePath);
                form.append("data", file, fileName);

                const response = await fetch(endpoint, {
                    method: "POST",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": `multipart/form-data; boundary=${form._boundary}`,
                        "Tenant-Shop-Id": tenantShopId,
                    },
                    body: form,
                });
                const result = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\t// ファイルの読み込み\n\tfilePath := \"<Path To File>\"\n\tfileName := \"<File Name>\"\n\tfile, err := os.Open(filePath)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\t// バッファの作成\n\tbody := &bytes.Buffer{}\n\twriter := multipart.NewWriter(body)\n\n\t// ファイルの書き込み\n\tpart, err := writer.CreateFormFile(\"data\", fileName)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t_, err = io.Copy(part, file)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// 追加情報（ファイル種別）の書き込み\n\t_ = writer.WriteField(\"type\", \"DRIVER_LICENSE_FRONT\")\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/contracts/examinations/tenants/%s/files\", tenantShopID), body)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", writer.FormDataContentType())\n\treq.Header.Set(\"Tenant-Shop-Id\", tenantShopID)\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/contracts/examinations/tenants/{$tenantShopId}/files";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $filePath = '<Path to file>';
            $fileName = '<File Name>';

            // 販売免許等1 をアップロードする場合
            $fields = [
                "data" => new CURLFile($filePath, null, $fileName),
                "type" => 'SALES_LICENSE_1',
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $fields);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            def main():
                api_key = '<Secret API Key>'

                tenant_shop_id = '<Tenant Shop ID>'

                file_path = '<Path to file>'
                file_name = '<File Name>'

                with open(file_path, 'rb') as file:
                    files = {'data': (file_name, file)}

                    # 追加情報（ファイル種別）の指定
                    payload = {'type': 'DRIVER_LICENSE_FRONT'}

                    url = f'https://api.test.fincode.jp/v1/contracts/examinations/tenants/{tenant_shop_id}/files'

                    # ヘッダーを設定
                    headers = {
                        'Authorization': f'Bearer {api_key}',
                        'Tenant-Shop-Id': tenant_shop_id,
                    }

                    # HTTP POSTリクエストの送信
                    try:
                        response = requests.post(url, headers=headers, files=files, data=payload)

                        # レスポンスの処理
                        if response.status_code == 200:
                            # 成功した場合の処理
                            print(f"Success: {response.json()}")
                        else:
                            # エラーの処理
                            print(f"Error: {response.json()} {response.text}")
                    except requests.RequestException as e:
                        # 通信エラーの処理
                        print(f"Request error: {e}")

            if __name__ == '__main__':
                main()
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'mime/types'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/contracts/examinations/tenants/#{tenant_shop_id}/files"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                file_path = '<Path to file>'
                file_name = '<File Name>'
                
                file = File.open(file_path, 'rb')
                file_data = file.read
                file.close

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Tenant-Shop-Id'] = tenant_shop_id

                # ファイルと追加情報をマルチパートフォームデータに追加
                boundary = '----FincodeMultipartRequest'
                body = []
                insert_file_to_body(body, boundary, 'data', file_name, file_data)
                insert_data_to_body(body, boundary, 'type', "DRIVER_LICENSE_FRONT")
                body << "--#{boundary}--\r\n"

                request['Content-Type'] = "multipart/form-data; boundary=#{boundary}"
                request.body = body.join('')

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            def insert_file_to_body(body, boundary, key, file_name, file_data)
                body << "--#{boundary}\r\n"
                body << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{file_name}\"\r\n"
                body << "Content-Type: #{MIME::Types.type_for(file_name).first.content_type}\r\n"
                body << "\r\n"
                body << file_data
                body << "\r\n"
            end

            def insert_data_to_body(body, boundary, key, value)
                body << "--#{boundary}\r\n"
                body << "Content-Disposition: form-data; name=\"#{key}\"\r\n"
                body << "\r\n"
                body << value
                body << "\r\n"
            end

            main
  /v1/contracts/examinations:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: requestProductionEnvironment
      tags:
        - テナント申請管理
      summary: テナントショップ 本番環境申請
      description: |
        `id`で指定したテナントショップの本番環境の利用申請を行います。このAPIを呼び出すまでにテナント本番環境申請情報 更新APIで申請情報を用意しておく必要があります。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップのものとしてファイルをアップロードします。
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/POST.ContractsExaminations.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST.ContractsExaminations.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -H "Tenant-Shop-Id: <Tenant Shop ID>" \
                -d '{
                "shop_id": "<Tenant Shop ID>",
                "enable_immediate_use": true,
            }' \
            'https://api.test.fincode.jp/v1/contracts/examinations'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const tenantShopId = "<Tenant Shop ID>";

                try {
                    // リクエストの送信
                    const result = await fincode.tenants.requestExamination(
                        {
                            shop_id: tenantShopId,
                            enable_immediate_use: false,
                        },
                        { tenantShopId: tenantShopId }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\tbody := RequestExaminationRequestBody{\n\t\tShopID:             \"<Shop ID>\",\n\t\tEnableImmediateUse: false,\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", \"https://api.test.fincode.jp/v1/contracts/examinations\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\treq.Header.Set(\"Tenant-Shop-Id\", tenantShopID)\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype RequestExaminationRequestBody struct {\n\tShopID             string `json:\"shop_id\"`\n\tEnableImmediateUse bool   `json:\"enable_immediate_use\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/contracts/examinations";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json",
                "Tenant-Shop-Id: " . $tenantShopId,
            ];

            $data = json_encode([
                "shop_id" => "s_***********",
                "enable_immediate_use" => true,
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/contracts/examinations'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "shop_id": "<Tenant Shop ID>",
                "enable_immediate_use": True,
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'

                endpoint = "/v1/contracts/examinations"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    shop_id: tenant_shop_id,
                    enable_immediate_use: true,
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'
                request['Tenant-Shop-Id'] = tenant_shop_id

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/contracts/examinations/tenants/{id}/providers/reserve:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: reserveProvider
      tags:
        - テナント申請管理
      summary: テナントショップ 決済手段追加申請
      description: |
        `id`で指定したテナントショップの決済手段の追加申請を行います。  
        ※ 申請状況の管理画面への反映には最大24時間程度のタイムラグがあります
      parameters:
        - name: id
          in: path
          description: |
            指定したテナントショップに対して決済手段を追加申請します。`Tenant-Shop-Id`ヘッダーも併せて指定してください。
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップに対して決済手段を追加申請します。
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/POST.ProviderReserve.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/POST.ProviderReserve.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -H "Tenant-Shop-Id: <Tenant Shop ID>" \
                -d '{
                "provider": ["PAYPAY"]
            }' \
            'https://api.test.fincode.jp/v1/contracts/examinations/tenants/{Tenant Shop ID}/providers/reserve'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const tenantShopId = "<Tenant Shop ID>";

                const endpoint = `${BASE_URL}/v1/contracts/examinations/tenants/${tenantShopId}/providers/reserve`;

                const response = await fetch(endpoint, {
                    method: "POST",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                        "Tenant-Shop-Id": tenantShopId,
                    },
                    body: JSON.stringify({
                        provider: ["PAYSLE", "PAYPAY"],
                    }),
                });
                const reservingResult = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\tbody := ReservingTenantProviderRequest{\n\t\tProvider: []Provider{\n\t\t\tPAYPAY,\n\t\t},\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/contracts/examinations/tenants/%s/providers/reserve\", tenantShopID), bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\treq.Header.Set(\"Tenant-Shop-Id\", tenantShopID)\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype ReservingTenantProviderRequest struct {\n\tProvider []Provider `json:\"provider\"`\n}\n\ntype Provider string\n\nconst (\n\tPAYSLE        Provider = \"PAYSLE\"\n\tPAYPAY        Provider = \"PAYPAY\"\n\tAPPLE_PAY_UC  Provider = \"APPLE_PAY_UC\"\n\tAPPLE_PAY_JCB_AMEX Provider = \"APPLE_PAY_JCB_AMEX\"\n\tDIRECT_DEBIT  Provider = \"DIRECT_DEBIT\"\n)\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/contracts/examinations/tenants/{$tenantShopId}/providers/reserve";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json",
                "Tenant-Shop-Id: " . $tenantShopId,
            ];

            $data = json_encode([
                "provider" => [
                    "PAYSLE",
                    "PAYPAY"
                ]
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            tenant_shop_id = '<Tenant Shop ID>'

            url = f'https://api.test.fincode.jp/v1/contracts/examinations/tenants/{tenant_shop_id}/providers/reserve'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json',
                'Tenant-Shop-Id': tenant_shop_id,
            }

            data = {
                'provider': [ "PAYSLE", "PAYPAY" ]
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/contracts/examinations/tenants/#{tenant_shop_id}/providers/reserve"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    provider: ["PAYSLE", "PAYPAY"],
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'
                request['Tenant-Shop-Id'] = tenant_shop_id

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/contracts/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveTenantContract
      tags:
        - テナント申請管理
      summary: テナントショップ契約情報 取得
      description: |
        `id`で指定したテナントショップの契約情報を取得します。
      parameters:
        - name: id
          in: path
          description: |
            指定したテナントショップの契約情報を取得します。`Tenant-Shop-Id`ヘッダーも併せて指定してください。
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップの契約情報を取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contracts.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Tenant-Shop-Id: <Tenant Shop ID>" \
            'https://api.test.fincode.jp/v1/contracts/{Tenant Shop ID}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const tenantShopId = "<Tenant Shop ID>";

                try {
                    // リクエストの送信
                    const contracts = await fincode.tenants.retrieveContract(tenantShopId, {
                        tenantShopId: tenantShopId,
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/contracts/%s\", tenantShopID), nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Tenant-Shop-Id\", tenantShopID)\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/contracts/{$tenantShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            tenant_shop_id = '<Tenant Shop ID>'

            url = f'https://api.test.fincode.jp/v1/contracts/{tenant_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Tenant-Shop-Id': tenant_shop_id,
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/contracts/#{tenant_shop_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Tenant-Shop-Id'] = tenant_shop_id

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/change_requests:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: registerChangeRequest
      tags:
        - テナント申請管理
      summary: テナントショップ 変更申請 登録
      description: |
        変更申請を登録します。
      parameters:
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            代理実行対象のテナントショップID。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeRequest.Registering.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeRequest.Registering.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
  /v1/change_requests/{shopId}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveChangeRequest
      tags:
        - テナント申請管理
      summary: テナントショップ 変更申請 取得
      description: |
        変更申請を取得します。
      parameters:
        - name: shopId
          in: path
          required: true
          schema:
            type: string
          description: |
            対象テナントショップのショップID
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            代理実行対象のテナントショップID。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangeRequest.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
  /v1/contracts/examinations/tenants/{id}:
    get:
      deprecated: true
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveTenantExaminationInfo
      tags:
        - テナント申請管理
      summary: （旧）テナントショップ本番環境申請情報 取得
      description: |
        ※ このAPIの使用は現在非推奨です。新しいテナントショップ本番環境申請情報 取得APIをご利用ください。\
        `id`で指定したテナントショップの本番環境申請情報を取得します。
      parameters:
        - name: id
          in: path
          description: |
            指定したテナントショップの本番環境申請情報を取得します。`Tenant-Shop-Id`ヘッダーも併せて指定してください。
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップの本番環境申請情報を取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExaminationInfo.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Tenant-Shop-Id: <Tenant Shop ID>" \
            'https://api.test.fincode.jp/v1/contracts/examinations/tenants/{Tenant Shop ID}'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const tenantShopId = "<Tenant Shop ID>";

                const endpoint = `${BASE_URL}/v1/contracts/examinations/tenants/${tenantShopId}`;

                const response = await fetch(endpoint, {
                    method: "GET",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Tenant-Shop-Id": tenantShopId,
                    },
                });
                const examinationInfo = await response.json();

                console.log(examinationInfo);
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/contracts/examinations/tenants/%s\", tenantShopID), nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Tenant-Shop-Id\", tenantShopID)\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/contracts/examinations/tenants/{$tenantShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Tenant-Shop-Id: " . $tenantShopId,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            tenant_shop_id = '<Tenant Shop ID>'

            url = f'https://api.test.fincode.jp/v1/contracts/examinations/tenants/{tenant_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Tenant-Shop-Id': tenant_shop_id,
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/contracts/examinations/tenants/#{tenant_shop_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Tenant-Shop-Id'] = tenant_shop_id

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      deprecated: true
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updateTenantExaminationInfo
      tags:
        - テナント申請管理
      summary: （旧）テナントショップ本番環境申請情報 更新
      description: |
        ※ このAPIの使用は現在非推奨です。新しいテナントショップ本番環境申請情報 更新APIをご利用ください。\
        `id`で指定したテナントショップの本番環境申請情報を更新します。
      parameters:
        - name: id
          in: path
          description: |
            指定したテナントショップの本番環境申請情報を更新します。`Tenant-Shop-Id`ヘッダーも併せて指定してください。
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: true
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップの本番環境申請情報を更新します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExaminationInfo.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExaminationInfo.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -H "Tenant-Shop-Id: <Tenant Shop ID>" \
                -d '{
                "update_contract_detail": true,
                "contract_detail": {
                    "corporate": true,
                    "corporate_number": "1234567890123",
                    "corporate_name": "株式会社テスト",
                    "corporate_name_kana": "カブシキガイシャテスト",
                    "company_postal_code": "123-4567",
                    "company_prefecture": "東京都",
                    "company_prefecture_kana": "トウキョウト",
                    "company_address_municipality": "渋谷区",
                    "company_address_municipality_kana": "シブヤク",
                    "company_address_section": "道玄坂",
                    "company_address_section_kana": "ドウゲンザカ",
                    "company_address_chrome": "1-2-3",
                    "company_address_chrome_kana": "イチニサン",
                    "company_tel": "0312345678",
                    "capital": 1000000,
                    "established_at": "2018/11/01",
                    "yearly_sales": 100000000,
                    "business_details": "○○の販売",
                    "representative_last_name": "山田",
                    "representative_last_name_kana": "ヤマダ",
                    "representative_first_name": "太郎",
                    "representative_first_name_kana": "タロウ",
                    "representative_postal_code": "123-4567",
                    "representative_prefecture": "東京都",
                    "representative_prefecture_kana": "トウキョウト",
                    "representative_address_municipality": "渋谷区",
                    "representative_address_municipality_kana": "シブヤク",
                    "representative_address_section": "道玄坂",
                    "representative_address_section_kana": "ドウゲンザカ",
                    "representative_address_chrome": "1-2-3",
                    "representative_address_chrome_kana": "イチニサン",
                    "representative_tel": "0312345678",
                    "representative_birthday": "1998/11/01",
                    "representative_gender": 0,
                    "staff1_last_name": "鈴木",
                    "staff1_last_name_kana": "スズキ",
                    "staff1_first_name": "次郎",
                    "staff1_first_name_kana": "ジロウ",
                    "staff1_company_name": "株式会社テスト",
                    "staff1_belongs": "EC運営部",
                    "staff1_tel": "08012345678",
                    "staff1_mail": "staff-1@exampple.com"
                }
            }' \
            'https://api.test.fincode.jp/v1/contracts/examinations/tenants/{Tenant Shop ID}'
        - lang: node
          label: Node.js
          source: |
            const BASE_URL = "https://api.test.fincode.jp";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const tenantShopId = "<Tenant Shop ID>";

                const endpoint = `${BASE_URL}/v1/contracts/examinations/tenants/${tenantShopId}`;

                const response = await fetch(endpoint, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                        "Tenant-Shop-Id": tenantShopId,
                    },
                    body: JSON.stringify({
                        update_contract_detail: true,
                        contract_detail: {
                            corporate: true,
                            corporate_number: "1234567890123",
                            corporate_name: "株式会社テスト",
                            corporate_name_kana: "カブシキガイシャテスト",
                            company_postal_code: "123-4567",
                            company_prefecture: "東京都",
                            company_prefecture_kana: "トウキョウト",
                            company_address_municipality: "渋谷区",
                            company_address_municipality_kana: "シブヤク",
                            company_address_section: "道玄坂",
                            company_address_section_kana: "ドウゲンザカ",
                            company_address_chrome: "1-2-3",
                            company_address_chrome_kana: "イチニサン",
                            company_tel: "0312345678",
                            capital: 1000000,
                            established_at: "2018/11/01",
                            yearly_sales: 100000000,
                            business_details: "○○の販売",
                            representative_last_name: "山田",
                            representative_last_name_kana: "ヤマダ",
                            representative_first_name: "太郎",
                            representative_first_name_kana: "タロウ",
                            representative_postal_code: "123-4567",
                            representative_prefecture: "東京都",
                            representative_prefecture_kana: "トウキョウト",
                            representative_address_municipality: "渋谷区",
                            representative_address_municipality_kana: "シブヤク",
                            representative_address_section: "道玄坂",
                            representative_address_section_kana: "ドウゲンザカ",
                            representative_address_chrome: "1-2-3",
                            representative_address_chrome_kana: "イチニサン",
                            representative_tel: "0312345678",
                            representative_birthday: "1998/11/01",
                            representative_gender: 0,
                            staff1_last_name: "鈴木",
                            staff1_last_name_kana: "スズキ",
                            staff1_first_name: "次郎",
                            staff1_first_name_kana: "ジロウ",
                            staff1_company_name: "株式会社テスト",
                            staff1_belongs: "EC運営部",
                            staff1_tel: "08012345678",
                            staff1_mail: "staff-1@exampple.com",
                        },
                    }),
                });
                const examinationInfo = await response.json();
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\ttenantShopID := \"<Tenant Shop ID>\"\n\n\tbody := UpdatingExaminationInfoRequest{\n\t\tUpdateContractDetail: true,\n\t\tContractDetail: ContractDetail{\n\t\t\tCorporate:                             true,\n\t\t\tCorporateNumber:                       \"1234567890123\",\n\t\t\tCorporateName:                         \"株式会社テスト\",\n\t\t\tCorporateNameKana:                     \"カブシキガイシャテスト\",\n\t\t\tCompanyPostalCode:                     \"123-4567\",\n\t\t\tCompanyPrefecture:                     \"東京都\",\n\t\t\tCompanyPrefectureKana:                 \"トウキョウト\",\n\t\t\tCompanyAddressMunicipality:            \"渋谷区\",\n\t\t\tCompanyAddressMunicipalityKana:        \"シブヤク\",\n\t\t\tCompanyAddressSection:                 \"道玄坂\",\n\t\t\tCompanyAddressSectionKana:             \"ドウゲンザカ\",\n\t\t\tCompanyAddressChrome:                  \"1-2-3\",\n\t\t\tCompanyAddressChromeKana:              \"イチニサン\",\n\t\t\tCompanyTel:                            \"0312345678\",\n\t\t\tCapital:                               1000000,\n\t\t\tEstablishedAt:                         \"2018/11/01\",\n\t\t\tYearlySales:                           100000000,\n\t\t\tBusinessDetails:                       \"○○の販売\",\n\t\t\tRepresentativeLastName:                \"山田\",\n\t\t\tRepresentativeLastNameKana:            \"ヤマダ\",\n\t\t\tRepresentativeFirstName:               \"太郎\",\n\t\t\tRepresentativeFirstNameKana:           \"タロウ\",\n\t\t\tRepresentativePostalCode:              \"123-4567\",\n\t\t\tRepresentativePrefecture:              \"東京都\",\n\t\t\tRepresentativePrefectureKana:          \"トウキョウト\",\n\t\t\tRepresentativeAddressMunicipality:     \"渋谷区\",\n\t\t\tRepresentativeAddressMunicipalityKana: \"シブヤク\",\n\t\t\tRepresentativeAddressSection:          \"道玄坂\",\n\t\t\tRepresentativeAddressSectionKana:      \"ドウゲンザカ\",\n\t\t\tRepresentativeAddressChrome:           \"1-2-3\",\n\t\t\tRepresentativeAddressChromeKana:       \"イチニサン\",\n\t\t\tRepresentativeTel:                     \"0312345678\",\n\t\t\tRepresentativeBirthday:                \"1998/11/01\",\n\t\t\tRepresentativeGender:                  0,\n\t\t\tStaff1LastName:                        \"鈴木\",\n\t\t\tStaff1LastNameKana:                    \"スズキ\",\n\t\t\tStaff1FirstName:                       \"次郎\",\n\t\t\tStaff1FirstNameKana:                   \"ジロウ\",\n\t\t\tStaff1CompanyName:                     \"株式会社テスト\",\n\t\t\tStaff1Belongs:                         \"EC運営部\",\n\t\t\tStaff1Tel:                             \"08012345678\",\n\t\t\tStaff1Mail:                            \"staff-1@example.com\",\n\t\t},\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"PUT\", fmt.Sprintf(\"https://api.test.fincode.jp/v1/contracts/examinations/tenants/%s\", tenantShopID), bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\treq.Header.Set(\"Tenant-Shop-Id\", tenantShopID)\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingExaminationInfoRequest struct {\n\tUpdateContractDetail bool           `json:\"update_contract_detail\"`\n\tContractDetail       ContractDetail `json:\"contract_detail\"`\n}\n\ntype ContractDetail struct {\n\tCorporate                             bool    `json:\"corporate\"`\n\tCorporateNumber                       string  `json:\"corporate_number\"`\n\tCorporateName                         string  `json:\"corporate_name\"`\n\tCorporateNameKana                     string  `json:\"corporate_name_kana\"`\n\tHP                                    *string `json:\"hp,omitempty\"`\n\tCompanyPostalCode                     string  `json:\"company_postal_code\"`\n\tCompanyPrefecture                     string  `json:\"company_prefecture\"`\n\tCompanyPrefectureKana                 string  `json:\"company_prefecture_kana\"`\n\tCompanyAddressMunicipality            string  `json:\"company_address_municipality\"`\n\tCompanyAddressMunicipalityKana        string  `json:\"company_address_municipality_kana\"`\n\tCompanyAddressSection                 string  `json:\"company_address_section\"`\n\tCompanyAddressSectionKana             string  `json:\"company_address_section_kana\"`\n\tCompanyAddressChrome                  string  `json:\"company_address_chrome\"`\n\tCompanyAddressChromeKana              string  `json:\"company_address_chrome_kana\"`\n\tCompanyAddressBuildingName            *string `json:\"company_address_building_name,omitempty\"`\n\tCompanyAddressBuildingNameKana        *string `json:\"company_address_building_name_kana,omitempty\"`\n\tCompanyTel                            string  `json:\"company_tel\"`\n\tCapital                               int     `json:\"capital\"`\n\tEstablishedAt                         string  `json:\"established_at\"`\n\tYearlySales                           int     `json:\"yearly_sales\"`\n\tBusinessDetails                       string  `json:\"business_details\"`\n\tRepresentativeLastName                string  `json:\"representative_last_name\"`\n\tRepresentativeLastNameKana            string  `json:\"representative_last_name_kana\"`\n\tRepresentativeFirstName               string  `json:\"representative_first_name\"`\n\tRepresentativeFirstNameKana           string  `json:\"representative_first_name_kana\"`\n\tRepresentativePostalCode              string  `json:\"representative_postal_code\"`\n\tRepresentativePrefecture              string  `json:\"representative_prefecture\"`\n\tRepresentativePrefectureKana          string  `json:\"representative_prefecture_kana\"`\n\tRepresentativeAddressMunicipality     string  `json:\"representative_address_municipality\"`\n\tRepresentativeAddressMunicipalityKana string  `json:\"representative_address_municipality_kana\"`\n\tRepresentativeAddressSection          string  `json:\"representative_address_section\"`\n\tRepresentativeAddressSectionKana      string  `json:\"representative_address_section_kana\"`\n\tRepresentativeAddressChrome           string  `json:\"representative_address_chrome\"`\n\tRepresentativeAddressChromeKana       string  `json:\"representative_address_chrome_kana\"`\n\tRepresentativeAddressBuildingName     *string `json:\"representative_address_building_name,omitempty\"`\n\tRepresentativeAddressBuildingNameKana *string `json:\"representative_address_building_name_kana,omitempty\"`\n\tRepresentativeTel                     string  `json:\"representative_tel\"`\n\tRepresentativeBirthday                string  `json:\"representative_birthday\"`\n\tRepresentativeGender                  int     `json:\"representative_gender\"`\n\tStaff1LastName                        string  `json:\"staff1_last_name\"`\n\tStaff1LastNameKana                    string  `json:\"staff1_last_name_kana\"`\n\tStaff1FirstName                       string  `json:\"staff1_first_name\"`\n\tStaff1FirstNameKana                   string  `json:\"staff1_first_name_kana\"`\n\tStaff1CompanyName                     string  `json:\"staff1_company_name\"`\n\tStaff1Belongs                         string  `json:\"staff1_belongs\"`\n\tStaff1Tel                             string  `json:\"staff1_tel\"`\n\tStaff1Mail                            string  `json:\"staff1_mail\"`\n\tStaff2LastName                        *string `json:\"staff2_last_name,omitempty\"`\n\tStaff2LastNameKana                    *string `json:\"staff2_last_name_kana,omitempty\"`\n\tStaff2FirstName                       *string `json:\"staff2_first_name,omitempty\"`\n\tStaff2FirstNameKana                   *string `json:\"staff2_first_name_kana,omitempty\"`\n\tStaff2CompanyName                     *string `json:\"staff2_company_name,omitempty\"`\n\tStaff2Belongs                         *string `json:\"staff2_belongs,omitempty\"`\n\tStaff2Tel                             *string `json:\"staff2_tel,omitempty\"`\n\tStaff2Mail                            *string `json:\"staff2_mail,omitempty\"`\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $tenantShopId = '<Tenant Shop ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/contracts/examinations/tenants/{$tenantShopId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json",
                "Tenant-Shop-Id: " . $tenantShopId,
            ];

            $data = json_encode([
                "update_contract_detail" => true,
                "contract_detail" => [
                    "corporate" => true,
                    "corporate_number" => "1234567890123",
                    "corporate_name" => "株式会社テスト",
                    "corporate_name_kana" => "カブシキガイシャテスト",
                    "company_postal_code" => "123-4567",
                    "company_prefecture" => "東京都",
                    "company_prefecture_kana" => "トウキョウト",
                    "company_address_municipality" => "渋谷区",
                    "company_address_municipality_kana" => "シブヤク",
                    "company_address_section" => "道玄坂",
                    "company_address_section_kana" => "ドウゲンザカ",
                    "company_address_chrome" => "1-2-3",
                    "company_address_chrome_kana" => "イチニサン",
                    "company_tel" => "0312345678",
                    "capital" => 1000000,
                    "established_at" => "2018/11/01",
                    "yearly_sales" => 100000000,
                    "business_details" => "○○の販売",
                    "representative_last_name" => "山田",
                    "representative_last_name_kana" => "ヤマダ",
                    "representative_first_name" => "太郎",
                    "representative_first_name_kana" => "タロウ",
                    "representative_postal_code" => "123-4567",
                    "representative_prefecture" => "東京都",
                    "representative_prefecture_kana" => "トウキョウト",
                    "representative_address_municipality" => "渋谷区",
                    "representative_address_municipality_kana" => "シブヤク",
                    "representative_address_section" => "道玄坂",
                    "representative_address_section_kana" => "ドウゲンザカ",
                    "representative_address_chrome" => "1-2-3",
                    "representative_address_chrome_kana" => "イチニサン",
                    "representative_tel" => "0312345678",
                    "representative_birthday" => "1998/11/01",
                    "representative_gender" => 0,
                    "staff1_last_name" => "鈴木",
                    "staff1_last_name_kana" => "スズキ",
                    "staff1_first_name" => "次郎",
                    "staff1_first_name_kana" => "ジロウ",
                    "staff1_company_name" => "株式会社テスト",
                    "staff1_belongs" => "EC運営部",
                    "staff1_tel" => "08012345678",
                    "staff1_mail" => "staff-1@exampple.com"
                ]
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            tenant_shop_id = '<Tenant Shop ID>'

            url = f'https://api.test.fincode.jp/v1/contracts/examinations/tenants/{tenant_shop_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json',
                'Tenant-Shop-Id': tenant_shop_id,
            }

            data = {
                "update_contract_detail": True,
                "contract_detail": {
                    "corporate": True,
                    "corporate_number": "1234567890123",
                    "corporate_name": "株式会社テスト",
                    "corporate_name_kana": "カブシキガイシャテスト",
                    "company_postal_code": "123-4567",
                    "company_prefecture": "東京都",
                    "company_prefecture_kana": "トウキョウト",
                    "company_address_municipality": "渋谷区",
                    "company_address_municipality_kana": "シブヤク",
                    "company_address_section": "道玄坂",
                    "company_address_section_kana": "ドウゲンザカ",
                    "company_address_chrome": "1-2-3",
                    "company_address_chrome_kana": "イチニサン",
                    "company_tel": "0312345678",
                    "capital": 1000000,
                    "established_at": "2018/11/01",
                    "yearly_sales": 100000000,
                    "business_details": "○○の販売",
                    "representative_last_name": "山田",
                    "representative_last_name_kana": "ヤマダ",
                    "representative_first_name": "太郎",
                    "representative_first_name_kana": "タロウ",
                    "representative_postal_code": "123-4567",
                    "representative_prefecture": "東京都",
                    "representative_prefecture_kana": "トウキョウト",
                    "representative_address_municipality": "渋谷区",
                    "representative_address_municipality_kana": "シブヤク",
                    "representative_address_section": "道玄坂",
                    "representative_address_section_kana": "ドウゲンザカ",
                    "representative_address_chrome": "1-2-3",
                    "representative_address_chrome_kana": "イチニサン",
                    "representative_tel": "0312345678",
                    "representative_birthday": "1998/11/01",
                    "representative_gender": 0,
                    "staff1_last_name": "鈴木",
                    "staff1_last_name_kana": "スズキ",
                    "staff1_first_name": "次郎",
                    "staff1_first_name_kana": "ジロウ",
                    "staff1_company_name": "株式会社テスト",
                    "staff1_belongs": "EC運営部",
                    "staff1_tel": "08012345678",
                    "staff1_mail": "staff-1@example.com",
                }
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                tenant_shop_id = '<Tenant Shop ID>'
                endpoint = "/v1/contracts/examinations/tenants/#{tenant_shop_id}"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    update_contract_detail: true,
                    contract_detail: {
                        corporate: true,
                        corporate_number: "1234567890123",
                        corporate_name: "株式会社テスト",
                        corporate_name_kana: "カブシキガイシャテスト",
                        company_postal_code: "123-4567",
                        company_prefecture: "東京都",
                        company_prefecture_kana: "トウキョウト",
                        company_address_municipality: "渋谷区",
                        company_address_municipality_kana: "シブヤク",
                        company_address_section: "道玄坂",
                        company_address_section_kana: "ドウゲンザカ",
                        company_address_chrome: "1-2-3",
                        company_address_chrome_kana: "イチニサン",
                        company_tel: "0312345678",
                        capital: 1000000,
                        established_at: "2018/11/01",
                        yearly_sales: 100000000,
                        business_details: "○○の販売",
                        representative_last_name: "山田",
                        representative_last_name_kana: "ヤマダ",
                        representative_first_name: "太郎",
                        representative_first_name_kana: "タロウ",
                        representative_postal_code: "123-4567",
                        representative_prefecture: "東京都",
                        representative_prefecture_kana: "トウキョウト",
                        representative_address_municipality: "渋谷区",
                        representative_address_municipality_kana: "シブヤク",
                        representative_address_section: "道玄坂",
                        representative_address_section_kana: "ドウゲンザカ",
                        representative_address_chrome: "1-2-3",
                        representative_address_chrome_kana: "イチニサン",
                        representative_tel: "0312345678",
                        representative_birthday: "1998/11/01",
                        representative_gender: 0,
                        staff1_last_name: "鈴木",
                        staff1_last_name_kana: "スズキ",
                        staff1_first_name: "次郎",
                        staff1_first_name_kana: "ジロウ",
                        staff1_company_name: "株式会社テスト",
                        staff1_belongs: "EC運営部",
                        staff1_tel: "08012345678",
                        staff1_mail: "staff-1@example.com",
                    }
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'
                request['Tenant-Shop-Id'] = tenant_shop_id

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/company_stamps:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createCompanyStamp
      tags:
        - 社印
      summary: 社印 登録
      description: |
        社印を登録します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップに社印を登録します。
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CompanyStamp.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyStamp.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: multipart/form-data" \
                -F "data=@/path/to/your/company_stamp.png" \
                'https://api.test.fincode.jp/v1/company_stamps'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";
            import FormData from "form-data";
            import fs from "fs";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const endpoint = `${BASE_URL}/v1/company_stamps`;

                const form = new FormData();
                form.append("data", fs.createReadStream("/path/to/your/company_stamp.png"));

                const response = await fetch(endpoint, {
                    method: "POST",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        ...form.getHeaders(),
                    },
                    body: form,
                });

                if (!response.ok) {
                    console.error(`Error: ${response.statusText}`);
                    return;
                }

                const data = await response.json();
                console.log(data);
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := &bytes.Buffer{}\n\twriter := multipart.NewWriter(body)\n\n\tfile, err := os.Open(\"/path/to/your/company_stamp.png\")\n\tif err != nil {\n\t\tlog.Fatalf(\"ファイルオープンエラー: %v\", err)\n\t}\n\tdefer file.Close()\n\n\tpart, err := writer.CreateFormFile(\"data\", \"company_stamp.png\")\n\tif err != nil {\n\t\tlog.Fatalf(\"マルチパート作成エラー: %v\", err)\n\t}\n\tio.Copy(part, file)\n\twriter.Close()\n\n\turl := \"https://api.test.fincode.jp/v1/company_stamps\"\n\treq, err := http.NewRequest(\"POST\", url, body)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエスト作成エラー: %v\", err)\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+apiKey)\n\treq.Header.Set(\"Content-Type\", writer.FormDataContentType())\n\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエスト送信エラー: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\trespBody, _ := io.ReadAll(resp.Body)\n\tfmt.Println(string(respBody))\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/company_stamps";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: multipart/form-data"
            ];

            $data = [
                'data' => new CURLFile('/path/to/your/company_stamp.png')
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);
            if ($response === false) {
                echo "cURL Error: " . curl_error($session);
            } else {
                var_dump($response);
            }
            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            url = 'https://api.test.fincode.jp/v1/company_stamps'

            headers = {
                'Authorization': f'Bearer {api_key}'
            }

            with open('/path/to/your/company_stamp.png', 'rb') as f:
                files = {'data': f}
                try:
                    response = requests.post(url, headers=headers, files=files)
                    if response.status_code == 200:
                        print(f"Success: {response.json()}")
                    else:
                        print(f"Error: {response.json()}")
                except requests.RequestException as e:
                    print(f"通信エラー: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
              endpoint = '/v1/company_stamps'
              uri = URI.parse(BASE_URL + endpoint)

              http = Net::HTTP.new(uri.host, uri.port)
              http.use_ssl = true

              boundary = "---011000010111000001101001"
              body = ""
              File.open('/path/to/your/company_stamp.png', 'rb') do |file|
                body += "--#{boundary}\r\n"
                body += "Content-Disposition: form-data; name=\"data\"; filename=\"company_stamp.png\"\r\n"
                body += "Content-Type: image/png\r\n\r\n"
                body += file.read
                body += "\r\n--#{boundary}--\r\n"
              end

              request = Net::HTTP::Post.new(uri.request_uri)
              request['Authorization'] = "Bearer #{API_KEY}"
              request['Content-Type'] = "multipart/form-data; boundary=#{boundary}"
              request.body = body

              response = http.request(request)
              puts response.body
            end

            main
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveCompanyStamp
      tags:
        - 社印
      summary: 社印 取得
      description: |
        登録されている社印の情報を取得します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップの社印情報を取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyStamp.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                'https://api.test.fincode.jp/v1/company_stamps'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const endpoint = `${BASE_URL}/v1/company_stamps`;

                const response = await fetch(endpoint, {
                    method: "GET",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                });

                if (!response.ok) {
                    console.error(`Error: ${response.statusText}`);
                    return;
                }

                const data = await response.json();
                console.log(data);
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tapiKey := \"<Secret API Key>\"\n\n\turl := \"https://api.test.fincode.jp/v1/company_stamps\"\n\n\treq, err := http.NewRequest(\"GET\", url, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエスト作成エラー: %v\", err)\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+apiKey)\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエスト送信エラー: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\trespBody, _ := io.ReadAll(resp.Body)\n\tfmt.Println(string(respBody))\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/company_stamps";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, "GET");
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);
            if ($response === false) {
                echo "cURL Error: " . curl_error($session);
            } else {
                var_dump($response);
            }
            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            url = 'https://api.test.fincode.jp/v1/company_stamps'

            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            try:
                response = requests.get(url, headers=headers)
                if response.status_code == 200:
                    print(f"Success: {response.json()}")
                else:
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                print(f"通信エラー: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
              endpoint = '/v1/company_stamps'
              uri = URI.parse(BASE_URL + endpoint)

              http = Net::HTTP.new(uri.host, uri.port)
              http.use_ssl = true

              request = Net::HTTP::Get.new(uri.request_uri)
              request['Authorization'] = "Bearer #{API_KEY}"
              request['Content-Type'] = 'application/json'

              response = http.request(request)
              puts response.body
            end

            main
    delete:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: deleteCompanyStamp
      tags:
        - 社印
      summary: 社印 削除
      description: |
        登録されている社印を削除します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップの社印を削除します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompanyStamp.Deleting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                'https://api.test.fincode.jp/v1/company_stamps'
        - lang: node
          label: Node.js
          source: |
            import fetch from "node-fetch";

            const BASE_URL = "https://api.test.fincode.jp";
            const API_KEY = "<Secret API Key>";

            (async () => {
                const endpoint = `${BASE_URL}/v1/company_stamps`;

                const response = await fetch(endpoint, {
                    method: "DELETE",
                    headers: {
                        Authorization: `Bearer ${API_KEY}`,
                        "Content-Type": "application/json",
                    },
                });

                if (!response.ok) {
                    console.error(`Error: ${response.statusText}`);
                    return;
                }

                const data = await response.json();
                console.log(data);
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tapiKey := \"<Secret API Key>\"\n\n\turl := \"https://api.test.fincode.jp/v1/company_stamps\"\n\n\treq, err := http.NewRequest(\"DELETE\", url, nil)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエスト作成エラー: %v\", err)\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+apiKey)\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tlog.Fatalf(\"リクエスト送信エラー: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\trespBody, _ := io.ReadAll(resp.Body)\n\tfmt.Println(string(respBody))\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';
            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/company_stamps";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, "DELETE");
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);

            $response = curl_exec($session);
            if ($response === false) {
                echo "cURL Error: " . curl_error($session);
            } else {
                var_dump($response);
            }
            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'
            url = 'https://api.test.fincode.jp/v1/company_stamps'

            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            try:
                response = requests.delete(url, headers=headers)
                if response.status_code == 200:
                    print(f"Success: {response.json()}")
                else:
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                print(f"通信エラー: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
              endpoint = '/v1/company_stamps'
              uri = URI.parse(BASE_URL + endpoint)

              http = Net::HTTP.new(uri.host, uri.port)
              http.use_ssl = true

              request = Net::HTTP::Delete.new(uri.request_uri)
              request['Authorization'] = "Bearer #{API_KEY}"
              request['Content-Type'] = 'application/json'

              response = http.request(request)
              puts response.body
            end

            main
  /v1/webhook_settings:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: createWebhookSetting
      tags:
        - Webhook設定
      summary: Webhook設定 登録
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            指定したテナントショップ上で発生したイベントを購読するWebhook設定を登録します。
      description: |
        Webhook設定を登録します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookSetting.Creating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSetting.Creating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X POST \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "event": "payments.card.secure",
                "url": "https://your-service.example.com/webhook-receiver",
            }' \
            'https://api.test.fincode.jp/v1/webhook_settings'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const webhookSetting = await fincode.webhookSettings.create({
                        url: "https://your-service.example.com/webhook-receiver",
                        event: "payments.card.secure",
                        signature: "WEBHOOK_FROM_FINCODE",
                    });
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\tbody := CreatingWebhookSettingRequest{\n\t\tURL:       stringPointer(\"https://your-service.example.com/webhook-receiver\"),\n\t\tEvent:     stringPointer(\"payments.card.secure\"),\n\t\tSignature: stringPointer(\"WEBHOOK_FROM_FINCODE\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"POST\", \"https://api.test.fincode.jp/v1/webhook_settings\", bytes.NewBuffer(marshalledBody))\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype CreatingWebhookSettingRequest struct {\n\tID        *string `json:\"id\"`\n\tURL       *string `json:\"url\"`\n\tEvent     *string `json:\"event\"`\n\tSignature *string `json:\"signature\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/webhook_settings";
            $headers = [
                "Authorization: Bearer " . $apiKey,
                "Content-Type: application/json"
            ];

            $data = json_encode([
                "url" => "https://your-service.example.com/webhook-receiver",
                "event" => "payments.card.secure",
                "signature" => "WEBHOOK_FROM_FINCODE"
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_POST, true);
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/webhook_settings'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "event": "payments.card.secure",
                "url": "https://your-service.example.com/webhook-receiver",
                "signature": "WEBHOOK_FROM_FINCODE"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.post(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/webhook_settings"
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    event: "payments.card.secure",
                    url: "https://your-service.example.com/webhook-receiver",
                    signature: "WEBHOOK_FROM_FINCODE"
                }

                # リクエストの作成
                request = Net::HTTP::Post.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveWebhookSettingList
      tags:
        - Webhook設定
      summary: Webhook設定 一覧取得
      description: |
        Webhook設定を一覧で取得します。
      parameters:
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づくWebhook設定から一覧で取得します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSetting.ListRetrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/webhook_settings'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                try {
                    // リクエストの送信
                    const webhookSettings = await fincode.webhookSettings.retrieveList();
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\"GET\", \"https://api.test.fincode.jp/v1/webhook_settings\", nil)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\tparams := req.URL.Query()\n\tparams.Add(\"limit\", \"10\")\n\treq.URL.RawQuery = params.Encode()\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/webhook_settings";

            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            url = f'https://api.test.fincode.jp/v1/webhook_settings'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                endpoint = "/v1/webhook_settings"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /v1/webhook_settings/{id}:
    get:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: retrieveWebhookSetting
      tags:
        - Webhook設定
      summary: Webhook設定 取得
      description: |
        IDで指定したWebhook設定を取得します。
      parameters:
        - name: id
          in: path
          description: Webhook設定のID
          schema:
            allOf:
              - $ref: '#/components/schemas/WebhookSettingId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づくWebhook設定のうち、指定したIDのWebhook設定を取得します。
          required: false
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSetting.Retrieving.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X GET \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/webhook_settings/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const webhookSettingId = "<Webhook Setting ID>";

                try {
                    // リクエストの送信
                    const webhookSetting = await fincode.webhookSettings.retrieve(
                        webhookSettingId
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\twebhookSettingID := \"<Webhook Setting ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"GET\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/webhook_settings/%s\", webhookSettingID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $webhookSettingId = '<Webhook Setting ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/webhook_settings/{$webhookSettingId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_HTTPGET, true);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            webhook_setting_id = '<Webhook Setting ID>'

            url = f'https://api.test.fincode.jp/v1/webhook_settings/{webhook_setting_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.get(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                webhook_setting_id = '<Webhook Setting ID>'
                endpoint = "/v1/webhook_settings/#{webhook_setting_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Get.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    put:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: updateWebhookSetting
      tags:
        - Webhook設定
      summary: Webhook設定 更新
      description: |
        IDで指定したWebhook設定を更新します。
      parameters:
        - name: id
          in: path
          description: Webhook設定のID
          schema:
            allOf:
              - $ref: '#/components/schemas/WebhookSettingId_schema'
          required: true
        - in: header
          name: Tenant-Shop-Id
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づくWebhook設定のうち、指定したIDのWebhook設定を更新します。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookSetting.Updating.Request'
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSetting.Updating.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X PUT \
                -H "Authorization:Bearer <Secret API Key>" \
                -H "Content-Type: application/json" \
                -d '{
                "signature": "WEBHOOK_FROM_FINCODE"
            }' \
            'https://api.test.fincode.jp/v1/webhook_settings/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const webhookSettingId = "<Webhook Setting ID>";

                try {
                    // リクエストの送信
                    const webhookSetting = await fincode.webhookSettings.update(
                        webhookSettingId,
                        {
                            url: "https://your-service.example.com/v2/webhook-receiver",
                        }
                    );
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\twebhookSettingID := \"<Webhook Setting ID>\"\n\n\tbody := UpdatingWebhookSettingRequest{\n\t\tURL: stringPointer(\"https://your-service.example.com/v2/webhook-receiver\"),\n\t}\n\n\tmarshalledBody, _ := json.Marshal(body)\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"PUT\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/webhook_settings/%s\", webhookSettingID),\n\t\tbytes.NewBuffer(marshalledBody),\n\t)\n\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n\n}\n\ntype UpdatingWebhookSettingRequest struct {\n\tURL       *string `json:\"url\"`\n\tEvent     *string `json:\"event\"`\n\tSignature *string `json:\"signature\"`\n}\n\nfunc stringPointer(s string) *string {\n\treturn &s\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $webhookSettingId = '<Webhook Setting ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/webhook_settings/{$webhookSettingId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $data = json_encode([
                "url" => "https://your-service.example.com/v2/webhook-receiver",
            ]);

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'PUT');
            curl_setopt($session, CURLOPT_POSTFIELDS, $data);
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            webhook_setting_id = '<Webhook Setting ID>'

            url = f'https://api.test.fincode.jp/v1/webhook_settings/{webhook_setting_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
                'Content-Type': 'application/json'
            }

            data = {
                "signature": "WEBHOOK_FROM_FINCODE"
            }

            # HTTP POSTリクエストの送信
            try:
                response = requests.put(url, headers=headers, json=data)

                # レスポンスの処理
                if response.status_code == 200:
                    # 成功した場合の処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'
            require 'json'


            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                webhook_setting_id = '<Webhook Setting ID>'
                endpoint = "/v1/webhook_settings/#{webhook_setting_id}"
                
                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                data = {
                    signature: "WEBHOOK_FROM_FINCODE"
                }

                # リクエストの作成
                request = Net::HTTP::Put.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"
                request['Content-Type'] = 'application/json'

                request.body = data.to_json

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
    delete:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: deleteWebhookSetting
      tags:
        - Webhook設定
      summary: Webhook設定 削除
      description: |
        IDで指定したWebhook設定を削除します。
      parameters:
        - name: id
          in: path
          description: Webhook設定のID
          schema:
            allOf:
              - $ref: '#/components/schemas/WebhookSettingId_schema'
          required: true
        - name: Tenant-Shop-Id
          in: header
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/schema'
          description: |
            <span class="smallText color--red-400">※ プラットフォームのメインショップのみ指定可</span>\
            テナントショップID。\
            このテナントショップに紐づくWebhook設定のうち、指定したIDのWebhook設定を削除します。
      responses:
        '200':
          description: リクエストに成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSetting.Deleting.Response'
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FincodeAPIError.Response'
      x-code-samples:
        - lang: curl
          label: cURL
          source: |
            curl \
                -X DELETE \
                -H "Authorization:Bearer <Secret API Key>" \
            'https://api.test.fincode.jp/v1/webhook_settings/{id}'
        - lang: node
          label: Node.js
          source: |
            import { createFincode } from "@fincode/node";

            const API_KEY = "<Secret API Key>";

            (async () => {
                const fincode = createFincode({ apiKey: API_KEY, isLiveMode: false });

                const webhookSettingId = "<Webhook Setting ID>";

                try {
                    // リクエストの送信
                    const result = await fincode.webhookSettings.delete(webhookSettingId);
                } catch (e) {
                    // エラーの処理
                }
            })();
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc main() {\n\n\tapiKey := \"<Secret API Key>\"\n\n\twebhookSettingID := \"<Webhook Setting ID>\"\n\n\t// リクエストの作成\n\treq, _ := http.NewRequest(\n\t\t\"DELETE\",\n\t\tfmt.Sprintf(\"https://api.test.fincode.jp/v1/webhook_settings/%s\", webhookSettingID),\n\t\tnil,\n\t)\n\treq.Header.Set(\"Authorization\", fmt.Sprintf(\"Bearer %s\", apiKey))\n\n\t// リクエストの送信\n\tclient := &http.Client{}\n\tres, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer res.Body.Close()\n}\n"
        - lang: php
          label: PHP
          source: |
            <?php

            $apiKey = '<Secret API Key>';

            $webhookSettingId = '<Webhook Setting ID>';

            $baseUrl = "https://api.test.fincode.jp";
            $endpoint = "/v1/webhook_settings/{$webhookSettingId}";
            $headers = [
                "Authorization: Bearer " . $apiKey,
            ];

            $session = curl_init();
            curl_setopt($session, CURLOPT_URL, $baseUrl . $endpoint);
            curl_setopt($session, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'DELETE');
            curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
            // curl_setopt($session, CURLOPT_SSL_VERIFYPEER, );
            // curl_setopt($session, CURLOPT_SSL_VERIFYHOST, );

            $response = curl_exec($session);

            if ($response === false) {
                # エラー処理
                echo "cURL Error: " . curl_error($session);
            } else {
                # APIからのデータを処理
                var_dump($response);
            }

            curl_close($session);
        - lang: python
          label: Python 3
          source: |
            import requests

            api_key = '<Secret API Key>'

            webhook_setting_id = '<Webhook Setting ID>'

            url = f'https://api.test.fincode.jp/v1/webhook_settings/{webhook_setting_id}'

            # ヘッダーを設定
            headers = {
                'Authorization': f'Bearer {api_key}',
            }

            try:
                response = requests.delete(url, headers=headers)

                # レスポンスの処理
                if response.status_code == 200:
                    # APIからのデータを処理
                    print(f"Success: {response.json()}")
                else:
                    # エラーの処理
                    print(f"Error: {response.json()}")
            except requests.RequestException as e:
                # 通信エラーの処理
                print(f"Request error: {e}")
        - lang: ruby
          label: Ruby
          source: |
            require 'net/http'
            require 'uri'

            API_KEY = '<Secret API Key>'
            BASE_URL = 'https://api.test.fincode.jp'

            def main
                webhook_setting_id = '<Webhook Setting ID>'
                endpoint = "/v1/webhook_settings/#{webhook_setting_id}"

                uri = URI.parse(BASE_URL + endpoint)

                http = Net::HTTP.new(uri.host, uri.port)
                http.use_ssl = true

                # リクエストの作成
                request = Net::HTTP::Delete.new(uri.request_uri)
                request['Authorization'] = "Bearer #{API_KEY}"

                # リクエストの送信
                response = http.request(request)

                case response
                when Net::HTTPSuccess
                    puts 'SUCCESS'
                else
                    puts 'ERROR'
                end

                # レスポンスの表示
                puts response.body
            end

            main
  /your-endpoint-on-card-payment:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfCardPayment
      tags:
        - Webhook_通知仕様
      summary: カード決済
      description: |
        カード決済に関するイベント（`payments.card.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Payment.Card'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-applepay-payment:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfApplePayPayment
      tags:
        - Webhook_通知仕様
      summary: Apple Pay
      description: |
        Apple Payによる決済に関するイベント（`payments.applepay.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Payment.ApplePay'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-googlepay-payment:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfGooglePayPayment
      tags:
        - Webhook_通知仕様
      summary: GooglePay
      description: |
        GooglePayに関するイベント（`payments.googlepay.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Payment.GooglePay'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-konbini-payment:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfKonbiniPayment
      tags:
        - Webhook_通知仕様
      summary: コンビニ決済
      description: |
        コンビニ決済に関するイベント（`payments.konbini.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Payment.Konbini'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-paypay-payment:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfPayPayPayment
      tags:
        - Webhook_通知仕様
      summary: PayPay
      description: |
        PayPayによる決済に関するイベント（`payments.paypay.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Payment.PayPay'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-amazonpay-payment:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfAmazonpayPayment
      tags:
        - Webhook_通知仕様
      summary: Amazon Pay
      description: |
        Amazon Payによる決済に関するイベント（`payments.amazonpay.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Payment.Amazonpay'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-directdebit-payment:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfDirectDebitPayment
      tags:
        - Webhook_通知仕様
      summary: 口座振替
      description: |
        口座振替に関するイベント（`payments.directdebit.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Payment.DirectDebit'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-virtualaccount-payment:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfVirtualAccountPayment
      tags:
        - Webhook_通知仕様
      summary: 銀行振込（バーチャル口座）
      description: |
        銀行振込（バーチャル口座）による決済に関するイベント（`payments.virtualaccount.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Payment.VirtualAccount'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-customer-payment_method:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfCustomerPaymentMethod
      tags:
        - Webhook_通知仕様
      summary: 決済手段
      description: |
        顧客の決済手段に関するイベント（`customers.payment_methods.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.CustomerPaymentMethodCard'
                  title: カード
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.CustomerPaymentMethodDirectDebit'
                  title: 口座振替
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.CustomerPaymentMethodVirtualAccount'
                  title: 銀行振込（バーチャル口座）
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.CustomerPaymentMethodPaypay'
                  title: PayPay
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.CustomerPaymentMethodAmazonpay'
                  title: Amazon Pay
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-card:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfCard
      tags:
        - Webhook_通知仕様
      summary: カード
      description: |
        カードに関するイベント（`card.*`）で通知されるリクエストのボディの仕様です。  
        カード更新機能（洗替）のイベント（`card.updater.complete`）はこちらではなく、`card.updater.complete`イベントの仕様である[カード：カード更新機能（洗替）](%7Byour-endpoint-on-card-updater-complete%7D.yml)をご参照ください。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Card'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-card-updater-complete:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfCardUpdaterComplete
      tags:
        - Webhook_通知仕様
      summary: 'カード：カード更新機能（洗替）  '
      description: |
        カード更新機能（洗替）のイベント（`card.updater.complete`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.CardUpdaterComplete'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-card-subscription:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfCardSubscription
      tags:
        - Webhook_通知仕様
      summary: サブスクリプション（カード決済）
      description: |
        カード決済によるサブスクリプションに関するイベント（`subscription.card.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Subscription.Card'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-directdebit-subscription:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfDirectDebitSubscription
      tags:
        - Webhook_通知仕様
      summary: サブスクリプション（口座振替）
      description: |
        口座振替によるサブスクリプションに関するイベント（`subscription.directdebit.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Subscription.DirectDebit'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-paypay-subscription:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfPaypaySubscription
      tags:
        - Webhook_通知仕様
      summary: サブスクリプション（PayPay）
      description: |
        PayPayによるサブスクリプションに関するイベント（`subscription.paypay.*`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Subscription.Paypay'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-card-recurring-batch:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfCardRecurringBatch
      tags:
        - Webhook_通知仕様
      summary: サブスクリプション課金（カード決済）
      description: |
        カード決済によるサブスクリプション課金のイベント（`recurring.card.batch`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.RecurringBatch.Card'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-directdebit-recurring-batch:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfDirectDebitRecurringBatch
      tags:
        - Webhook_通知仕様
      summary: サブスクリプション課金（口座振替）
      description: |
        口座振替によるサブスクリプション課金に関するイベント（`recurring.directdebit.batch`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.RecurringBatch.DirectDebit'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-paypay-recurring-batch:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfPaypayRecurringBatch
      tags:
        - Webhook_通知仕様
      summary: サブスクリプション課金（PayPay）
      description: |
        PayPayによるサブスクリプション課金に関するイベント（`recurring.paypay.batch`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.RecurringBatch.Paypay'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-card-payment-bulk-regist:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfRegisteringPaymentBulk
      tags:
        - Webhook_通知仕様
      summary: 一括決済
      description: |
        一括決済 登録イベント（`payments.bulk.*.regist`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.PaymentBulk.Regist.Card'
                  title: カード決済
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.PaymentBulk.Regist.Amazonpay'
                  title: Amazon Pay
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-card-payment-bulk-batch:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfPaymentBulkBatch
      tags:
        - Webhook_通知仕様
      summary: 一括決済課金
      description: |
        一括決済 課金イベント（`payments.bulk.*.batch`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.PaymentBulk.Batch.Card'
                  title: カード決済
                - allOf:
                    - $ref: '#/components/schemas/WebhookEvent.PaymentBulk.Batch.Amazonpay'
                  title: Amazon Pay
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-contract:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfContract
      tags:
        - Webhook_通知仕様
      summary: 決済手段 契約状況
      description: |
        決済手段 契約状況 更新イベント（`contracts.status_code.updated`）で通知されるリクエストのボディの仕様です。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Contract'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-invoice:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfInvoice
      tags:
        - Webhook_通知仕様
      summary: インボイス
      description: |
        インボイスに関するイベント（`invoice.*`）で通知されるリクエストのボディの仕様です。\
        通知されるボディにはインボイスIDのみが含まれます。インボイスの詳細情報が必要な場合は、インボイスIDを指定してインボイス 取得APIを呼び出してください。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.Invoice'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-chargeback:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfChargeBack
      tags:
        - Webhook_通知仕様
      summary: チャージバック
      description: |
        チャージバックに関するイベント（`charge_backs.*`）で通知されるリクエストのボディの仕様です。\
        通知されるボディにはチャージバックID・ショップID・ステータスのみが含まれます。チャージバックの詳細情報が必要な場合は、チャージバックIDを指定してチャージバック 取得APIを呼び出してください。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.ChargeBack'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
  /your-endpoint-on-change-request:
    post:
      security:
        - Secret-Bearer-Auth: []
        - Secret-Basic-Auth: []
      operationId: receiveWebhookOfChangeRequest
      tags:
        - Webhook_通知仕様
      summary: 変更申請
      description: |
        変更申請に関するイベント（`change_requests.*`）で通知されるリクエストのボディの仕様です。\
        通知されるボディには変更申請ID・ショップIDのみが含まれます。変更申請の詳細情報が必要な場合は、変更申請IDとショップIDを指定して変更申請 取得APIを呼び出してください。
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEvent.ChangeRequest'
      responses:
        '200':
          description: |
            fincodeに正常にWebhookを受信した旨をレスポンスしてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
            text/plain:
              schema:
                allOf:
                  - $ref: '#/components/schemas/WebhookResponse-plain'
              examples:
                html:
                  value: 0
        '400':
          description: |
            4xx系、5xx系または上記以外のレスポンスを返却した場合、fincodeはエラーと判断しWebhook通知のリトライを行います。
components:
  securitySchemes:
    Secret-Bearer-Auth:
      type: http
      scheme: bearer
      description: |
        このAPIはシークレットキーによる認証を必要とします。\
        Bearer認証を用いる場合、リクエストヘッダー `Authorization`に下記の形式でシークレットキーを指定します。
        ```
          Authorization: Bearer␣{APIキー}
        ```
        シークレットキーはfincodeの管理画面から取得できます。
    Secret-Basic-Auth:
      type: http
      scheme: basic
      description: |
        このAPIはシークレットキーによる認証を必要とします。\
        Basic認証を用いる場合、リクエストヘッダー `Authorization`に下記の形式でシークレットキーを指定します。
        ``` JavaScript
          Authorization: Basic␣{Base64でエンコードしたAPIキー}
        ```
        シークレットキーはfincodeの管理画面から取得できます。
    Public-Bearer-Auth:
      type: http
      scheme: bearer
      description: |
        このAPIはパブリックキーによる認証で利用できます。\
        Bearer認証を用いる場合、リクエストヘッダー `Authorization`に下記の形式でパブリックキーを指定します。
        ```
          Authorization: Bearer␣{APIキー}
        ```
        パブリックキーはfincodeの管理画面から取得できます。
    Public-Basic-Auth:
      type: http
      scheme: basic
      description: |
        このAPIはパブリックキーによる認証を必要とします。\
        Basic認証を用いる場合、リクエストヘッダー `Authorization`に下記の形式でパブリックキーを指定します。
        ``` JavaScript
          Authorization: Basic␣{Base64でエンコードしたAPIキー}
        ```
        パブリックキーはfincodeの管理画面から取得できます。
    Both-Bearer-Auth:
      type: http
      scheme: bearer
      description: |
        このAPIはシークレットキーまたはパブリックキーによる認証を必要とします。\
        Bearer認証を用いる場合、リクエストヘッダー `Authorization`に下記の形式でシークレットキーまたはパブリックキーを指定します。
        ```
          Authorization: Bearer␣{APIキー}
        ```
        シークレットキーまたはパブリックキーはfincodeの管理画面から取得できます。
    Both-Basic-Auth:
      type: http
      scheme: basic
      description: |
        このAPIはシークレットキーまたはパブリックキーによる認証を必要とします。\
        Basic認証を用いる場合、リクエストヘッダー `Authorization`に下記の形式でシークレットキーまたはパブリックキーを指定します。
        ``` JavaScript
          Authorization: Basic␣{Base64でエンコードしたAPIキー}
        ```
        シークレットキーまたはパブリックキーはfincodeの管理画面から取得できます。
  schemas:
    Pagination.QueryParams:
      type: object
      properties:
        page:
          type: integer
          minLength: 1
          nullable: true
          description: ページ番号
        limit:
          type: integer
          nullable: true
          minLength: 10
          maxLength: 100
          description: 1回で取得するデータの最大件数
        count_only:
          type: boolean
          nullable: true
          description: |
            総件数のみ取得するか。\
            `true`を指定した場合、検索結果の総件数（`total_count`）のみ取得します。
      x-common-properties:
        sort:
          type: string
          example: updated␣desc,created␣asc
    sort:
      type: string
      example: updated␣desc,created␣asc
    Customer.ListRetrieving.QueryParams:
      type: object
      properties:
        id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 60
          example: c_**********************
          description: |
            顧客ID
        name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 384
          example: Jane Doe
          description: |
            顧客名
        email:
          type: string
          nullable: true
          minLength: 1
          maxLength: 254
          example: jane@example.com
          description: |
            顧客のメールアドレス
        created_from:
          type: string
          nullable: true
          example: 2022/05/16
          description: |
            作成日の範囲指定 開始日\
            この日付以降に作成された顧客情報を検索できます。\
            形式：`yyyy/MM/dd`
        created_to:
          type: string
          nullable: true
          example: 2022/05/16
          description: |
            作成日の範囲指定 終了日\
            この日付以前に作成された顧客情報を検索できます。\
            形式：`yyyy/MM/dd`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `id`: 顧客ID
            - `name`: 顧客名
            - `email`: 顧客メールアドレス
            - `created`: 作成日時
            - `updated`: 更新日時
    schema:
      type: string
      example: s_***********
    _ListResponse:
      type: object
      properties:
        total_count:
          type: integer
          example: 100
          description: 総件数
        last_page:
          type: integer
          example: 20
          description: 最後のページのページ数
        current_page:
          type: integer
          example: 3
          description: 現在のページのページ数
        limit:
          type: integer
          example: 5
          description: 1ページの最大件数
        link_next:
          type: string
          example: /v1/{resource}?limit=5&page=4
          nullable: true
          description: 次のページのコンテンツを取得するためのURL
        link_previous:
          type: string
          example: /v1/{resource}?limit=5&page=2
          nullable: true
          description: 前のページのコンテンツを取得するためのURL
    created:
      type: string
      example: 2022/05/16 23:59:59.999
      description: |
        作成日\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    updated:
      type: string
      nullable: true
      example: 2022/05/16 23:59:59.999
      description: |
        更新日\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    Customer:
      type: object
      properties:
        id:
          type: string
          example: c_**********************
          minLength: 1
          maxLength: 60
          description: |
            顧客ID
        name:
          type: string
          minLength: 1
          maxLength: 384
          nullable: true
          example: John Doe
          description: |
            顧客の名前
        email:
          type: string
          minLength: 1
          maxLength: 254
          nullable: true
          example: john@example.com
          description: |
            顧客のメールアドレス\
            形式： RFC5322
        phone_cc:
          type: string
          minLength: 1
          maxLength: 3
          nullable: true
          example: '81'
          description: |
            顧客の電話番号の国コード（`+`は含まない）
        phone_no:
          type: string
          minLength: 1
          maxLength: 15
          nullable: true
          example: '09012345678'
          description: |
            顧客の電話番号
        addr_country:
          type: string
          minLength: 1
          maxLength: 3
          nullable: true
          example: '392'
          description: |
            顧客の住所の国コード\
            形式： ISO 3166-1 numeric
        addr_state:
          type: string
          minLength: 1
          maxLength: 3
          nullable: true
          example: '13'
          description: |
            顧客の住所の州コードまたは都道府県コード\
            参照： [国土交通省 都道府県コード](https://nlftp.mlit.go.jp/ksj/gml/codelist/PrefCd.html)
        addr_city:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: 渋谷区
          description: |
            顧客の住所の都市名
        addr_line_1:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: 道玄坂1-14-6
          description: |
            顧客の住所の番地・区画
        addr_line_2:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: ヒューマックス渋谷ビル 7F
          description: |
            顧客の住所の建物名・部屋番号
        addr_line_3:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: GMOイプシロン株式会社
          description: |
            顧客の住所 その他
        addr_post_code:
          type: string
          minLength: 1
          maxLength: 16
          nullable: true
          example: 150-0043
          description: |
            顧客の住所の郵便番号
        card_registration:
          type: string
          minLength: 1
          maxLength: 1
          nullable: true
          enum:
            - '0'
            - '1'
          example: '1'
          description: |
            決済手段（カード）登録状況

            - `0`: 未登録
            - `1`: 1件以上のカードが登録済み
        directdebit_registration:
          type: string
          minLength: 1
          maxLength: 1
          nullable: true
          enum:
            - '0'
            - '1'
          example: '1'
          description: |
            決済手段（口座振替）登録状況

            - `0`: 未登録
            - `1`: 1件以上の振替用口座が登録済み
        paypay_continuous_registration:
          type: string
          minLength: 1
          maxLength: 1
          nullable: true
          enum:
            - '0'
            - '1'
          example: '1'
          description: |
            決済手段（PayPay 継続課金）登録状況

            - `0`: 未登録
            - `1`: 継続課金用のPayPayアカウントが1件以上登録済み

            決済方式（`paypay_method`）が継続課金（`CONTINUOUS`）の決済手段のみを対象とします。

            `1` は登録済みのPayPayアカウントが存在することのみを示します。連携が完了していない場合や、
            購入者による連携解除・退会などで無効になっている場合も `1` となるため、
            **決済に利用できるかどうかの判定には使用できません**。
            決済に利用可能なPayPayアカウントの有無は、決済手段取得APIまたは決済手段一覧取得APIで
            ステータス（`status`）が `ACTIVATED` の決済手段を確認してください。
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
    Customer.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/Customer'
    Customer.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Customer.list'
    FincodeAPIError:
      type: object
      description: |
        1つのエラーを表現するオブジェクト。
      properties:
        error_code:
          type: string
          minLength: 11
          maxLength: 11
          example: E**********
          description: |
            エラー内容を判定する場合はこの`error_code`の使用が推奨されます。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        error_message:
          type: string
          description: |
            エラーの内容を表現するメッセージです。\
            このエラーメッセージは予告なく変更されるため、エラー内容を判定する場合はこの値ではなく`error_code`の使用が推奨されます。
    FincodeAPIError.Response:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FincodeAPIError'
    id:
      type: string
      example: c_**********************
      minLength: 1
      maxLength: 60
      description: |
        顧客ID
    name:
      type: string
      minLength: 1
      maxLength: 384
      nullable: true
      example: John Doe
      description: |
        顧客の名前
    email:
      type: string
      minLength: 1
      maxLength: 254
      nullable: true
      example: john@example.com
      description: |
        顧客のメールアドレス\
        形式： RFC5322
    phone_cc:
      type: string
      minLength: 1
      maxLength: 3
      nullable: true
      example: '81'
      description: |
        顧客の電話番号の国コード（`+`は含まない）
    phone_no:
      type: string
      minLength: 1
      maxLength: 15
      nullable: true
      example: '09012345678'
      description: |
        顧客の電話番号
    addr_country:
      type: string
      minLength: 1
      maxLength: 3
      nullable: true
      example: '392'
      description: |
        顧客の住所の国コード\
        形式： ISO 3166-1 numeric
    addr_state:
      type: string
      minLength: 1
      maxLength: 3
      nullable: true
      example: '13'
      description: |
        顧客の住所の州コードまたは都道府県コード\
        参照： [国土交通省 都道府県コード](https://nlftp.mlit.go.jp/ksj/gml/codelist/PrefCd.html)
    addr_city:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: 渋谷区
      description: |
        顧客の住所の都市名
    addr_line_1:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: 道玄坂1-14-6
      description: |
        顧客の住所の番地・区画
    addr_line_2:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: ヒューマックス渋谷ビル 7F
      description: |
        顧客の住所の建物名・部屋番号
    addr_line_3:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: GMOイプシロン株式会社
      description: |
        顧客の住所 その他
    addr_post_code:
      type: string
      minLength: 1
      maxLength: 16
      nullable: true
      example: 150-0043
      description: |
        顧客の住所の郵便番号
    Customer.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/id'
          nullable: true
          description: |
            顧客ID\
            任意の値を指定できます。指定しない場合はfincodeが自動的に生成します。\
            一度fincodeに登録された顧客IDは削除後も利用できません。
        name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/name'
        email:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/email'
        phone_cc:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/phone_cc'
        phone_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/phone_no'
        addr_country:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_country'
        addr_state:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_state'
        addr_city:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_city'
        addr_line_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_line_1'
        addr_line_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_line_2'
        addr_line_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_line_3'
        addr_post_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_post_code'
    Customer.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Customer'
    CustomerId_schema:
      type: string
      example: c_**********************
    Customer.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Customer'
    Customer.Updating.Request:
      type: object
      properties:
        name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/name'
          example: Jane Doe
        email:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/email'
        phone_cc:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/phone_cc'
          example: jane@example.com
        phone_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/phone_no'
        addr_country:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_country'
        addr_state:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_state'
        addr_city:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_city'
        addr_line_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_line_1'
        addr_line_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_line_2'
        addr_line_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_line_3'
        addr_post_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/addr_post_code'
    Customer.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/Customer'
    delete_flag:
      type: string
      enum:
        - '1'
        - '0'
      example: '1'
      description: 削除フラグ
    Customer.Deleting.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: 削除された顧客のID
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
    card_no:
      type: string
      example: '************1234'
      maxLength: 16
      description: |
        マスク済みカード番号。\
        <span class="smallText">
        下4桁以外をマスクしたカード番号です。\
        カード情報非保持の原則に基づき、fincodeユーザーはマスクされていないカード番号の代わりにこの値を保持することができます。\
        </span>
        形式：`************1234`
    expire:
      type: string
      minLength: 4
      maxLength: 4
      example: '4012'
      nullable: true
      description: |
        カード有効期限。\
        形式：`YYMM`
    holder_name:
      type: string
      example: TARO EPSILON
      minLength: 1
      maxLength: 50
      nullable: true
      description: |
        カード名義人名。
    CardType:
      type: string
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
      minLength: 1
      maxLength: 1
      description: |
        クレジットカード種別。

        - `0`: 不明（[テストカード](https://docs.fincode.jp/develop_support/test_resources)を含む）
        - `1`: デビットカード
        - `2`: プリペイドカード
        - `3`: クレジットカード
    CardBrand:
      type: string
      maxLength: 50
      enum:
        - VISA
        - MASTER
        - JCB
        - AMEX
        - DINERS
        - DISCOVER
        - ''
      description: |
        カードブランドを表します。

        - `VISA`: VISA
        - `MASTER`: Mastercard
        - `JCB`: JCB
        - `AMEX`: American Express
        - `DINERS`: Diners Club
        - `DISCOVER`: Discover
        - `""`（空文字列） : 判定不能
    card_no_hash:
      type: string
      example: abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz01
      minLength: 1
      maxLength: 64
      description: |
        カード番号をもとに生成されたハッシュ値。\
        <span class="smallText">
        おなじカード番号に対しては常に同じ値が返されます。\
        カード情報非保持の原則に基づき、fincodeユーザーはマスクされていないカード番号の代わりにこの値を保持することができます。
        </span>
    Card:
      type: object
      properties:
        id:
          type: string
          example: cs_**********************
          minLength: 25
          maxLength: 25
          description: |
            カードID
        customer_id:
          type: string
          example: c_**********************
          minLength: 1
          maxLength: 60
          description: |
            顧客ID\
            このカードが紐づく顧客のID
        default_flag:
          type: string
          enum:
            - '0'
            - '1'
          example: '0'
          description: |
            デフォルトフラグ。\
            このカードが決済実行やサブスクリプション登録などでカードIDを指定しない場合に自動的に使用するカードかどうかを示すフラグです。\
            顧客に対して必ず1つのデフォルトカードが存在します。（カードが1つも登録されていない場合を除く）

            - `0`: デフォルトカードではない
            - `1`: デフォルトカード
        card_no:
          allOf:
            - $ref: '#/components/schemas/card_no'
        expire:
          allOf:
            - $ref: '#/components/schemas/expire'
        holder_name:
          allOf:
            - $ref: '#/components/schemas/holder_name'
        type:
          allOf:
            - $ref: '#/components/schemas/CardType'
            - nullable: true
        brand:
          allOf:
            - $ref: '#/components/schemas/CardBrand'
            - nullable: true
        card_no_hash:
          allOf:
            - $ref: '#/components/schemas/card_no_hash'
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
      x-req-properties:
        token:
          type: string
          minLength: 1
          maxLength: 512
          example: '34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'
          nullable: true
          description: |
            カードトークン\
            \
            fincode JSの`tokens`メソッドで取得したトークンを指定します。\
            JavaScriptの利用については、[JavaScriptリファレンス](https://docs.fincode.jp/js)をご参照ください。
    Card.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/Card'
    process_date:
      type: string
      nullable: true
      example: 2022/05/16 23:59:59.999
      description: |
        処理日\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    CardUpdater:
      type: object
      properties:
        card_updater_mode:
          type: string
          nullable: true
          enum:
            - enabled
            - disabled
            - inherit
          description: |
            カード更新対象カードステータス

            - `enabled`：カード更新する
            - `disabled`：カード更新しない
            - `inherit`：ショップ設定に準ずる
        card_updater_last_success_date:
          allOf:
            - $ref: '#/components/schemas/process_date'
          description: |
            カード更新成功日時
            最後にカード情報の更新に成功した日時\
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        card_updater_last_attempt_date:
          allOf:
            - $ref: '#/components/schemas/process_date'
          description: |
            カード更新実施日時
            最後にカード情報の更新を実施した日時\
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
    CustomerCard.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Card.list'
        - type: object
          properties:
            list:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Card'
                  - $ref: '#/components/schemas/CardUpdater'
    token:
      type: string
      minLength: 1
      maxLength: 512
      example: '34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'
      description: |
        カードトークン\
        \
        fincode JSの`tokens`メソッドで取得したトークンを指定します。\
        JavaScriptの利用については、[JavaScriptリファレンス](https://docs.fincode.jp/js)をご参照ください。
    default_flag:
      type: string
      enum:
        - '0'
        - '1'
      example: '0'
      description: |
        デフォルトフラグ。\
        このカードが決済実行やサブスクリプション登録などでカードIDを指定しない場合に自動的に使用するカードかどうかを示すフラグです。\
        顧客に対して必ず1つのデフォルトカードが存在します。（カードが1つも登録されていない場合を除く）

        - `0`: デフォルトカードではない
        - `1`: デフォルトカード
    card_updater_mode:
      type: string
      nullable: true
      enum:
        - enabled
        - disabled
        - inherit
      description: |
        カード更新対象カードステータス

        - `enabled`：カード更新する
        - `disabled`：カード更新しない
        - `inherit`：ショップ設定に準ずる
    CustomerCard.Creating.Request:
      type: object
      properties:
        token:
          allOf:
            - $ref: '#/components/schemas/token'
        default_flag:
          allOf:
            - $ref: '#/components/schemas/default_flag'
        card_updater_mode:
          allOf:
            - $ref: '#/components/schemas/card_updater_mode'
          description: |
            カード更新機能（洗替）利用設定

            - `enabled`：カード更新する
            - `disabled`：カード更新しない
            - `inherit`：ショップ設定に準ずる
      required:
        - token
        - default_flag
    CustomerCard.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Card'
        - $ref: '#/components/schemas/CardUpdater'
    CardId_schema:
      type: string
      example: cs_**********************
    CustomerCard.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Card'
        - $ref: '#/components/schemas/CardUpdater'
    x-req-properties-token:
      type: string
      minLength: 1
      maxLength: 512
      example: '34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'
      nullable: true
      description: |
        カードトークン\
        \
        fincode JSの`tokens`メソッドで取得したトークンを指定します。\
        JavaScriptの利用については、[JavaScriptリファレンス](https://docs.fincode.jp/js)をご参照ください。
    CustomerCard.Updating.Request:
      type: object
      properties:
        token:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-token'
        default_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/default_flag'
          description: |
            デフォルトフラグ。\
            指定した場合のみ更新されます。
        holder_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/holder_name'
          description: |
            ※ `token`に入力がある場合は無視\
            カード名義人名
        expire:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/expire'
          description: |
            ※ `token`に入力がある場合は無視\
            カード有効期限。\
            形式：`YYMM`
        card_updater_mode:
          allOf:
            - $ref: '#/components/schemas/card_updater_mode'
          description: |
            カード更新機能（洗替）利用設定\
            指定した場合のみ更新されます。

            - `enabled`：カード更新する
            - `disabled`：カード更新しない
            - `inherit`：ショップ設定に準ずる
    CustomerCard.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/Card'
        - $ref: '#/components/schemas/CardUpdater'
    properties-id:
      type: string
      example: cs_**********************
      minLength: 25
      maxLength: 25
      description: |
        カードID
    CustomerCard.Deleting.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/properties-id'
          description: 削除されたカードのID
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: 削除されたカードを持つ顧客のID
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
    customer_id:
      type: string
      example: c_**********************
      minLength: 1
      maxLength: 60
      description: |
        顧客ID\
        このカードが紐づく顧客のID
    Card.ListRetrieving.QueryParams:
      type: object
      properties:
        card_id:
          allOf:
            - $ref: '#/components/schemas/properties-id'
          nullable: true
          description: |
            カードID\
            指定したカードIDに一致するカード情報を取得します。
        customer_id:
          allOf:
            - $ref: '#/components/schemas/customer_id'
          nullable: true
          description: |
            顧客ID\
            指定した顧客IDに紐づくカード情報を取得します。
        card_updater_last_success_date_from:
          type: string
          nullable: true
          example: 2022/05/16
          description: |
            カード更新成功日 範囲指定 開始日\
            カード更新成功日（`card_updater_last_success_date`）を対象に範囲検索を行います。\
            この日付以降にカード更新成功したカード情報を取得します。\
            形式：`yyyy/MM/dd`
        card_updater_last_success_date_to:
          type: string
          nullable: true
          example: 2022/05/16
          description: |
            カード更新成功日 範囲指定 終了日\
            カード更新成功日（`card_updater_last_success_date`）を対象に範囲検索を行います。\
            この日付以前にカード更新成功したカード情報を取得します。\
            形式：`yyyy/MM/dd`
        card_updater_last_attempt_date_from:
          type: string
          nullable: true
          example: 2022/05/16
          description: |
            カード更新実施日 範囲指定 開始日\
            カード更新実施日（`card_updater_last_attempt_date`）を対象に範囲検索を行います。\
            この日付以降にカード更新を実施したカード情報を取得します。\
            形式：`yyyy/MM/dd`
        card_updater_last_attempt_date_to:
          type: string
          nullable: true
          example: 2022/05/16
          description: |
            カード更新実施日 範囲指定 終了日\
            カード更新実施日（`card_updater_last_attempt_date`）を対象に範囲検索を行います。\
            この日付以前にカード更新を実施したカード情報を取得します。\
            形式：`yyyy/MM/dd`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=customer_id␣asc,created␣desc`\
            \
            ソート可能な項目

            - `id`: カードID
            - `customer_id`: 顧客ID
            - `created`: 作成日時
            - `card_updater_last_success_date`: カード更新成功日
            - `card_updater_last_attempt_date`: カード更新実施日
    Card.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - type: object
          properties:
            list:
              type: array
              items:
                allOf:
                  - $ref: '#/components/schemas/Card'
                  - $ref: '#/components/schemas/CardUpdater'
    PaymentMethodPayType:
      type: string
      enum:
        - Card
        - Directdebit
        - Virtualaccount
        - Paypay
        - Amazonpay
      example: Card
      description: |
        決済種別（決済手段APIに対応しているもの）

        - `Card`: カード
        - `Directdebit`: 口座振替
        - `Virtualaccount`: 銀行振込（バーチャル口座）
        - `Paypay`: PayPay
        - `Amazonpay`: Amazon Pay
    paypay_method:
      type: string
      enum:
        - CONTINUOUS
      example: CONTINUOUS
      description: |
        決済方式\
        連携するPayPayアカウントをどの決済方式で利用するかを指定します。

        - `CONTINUOUS`：継続課金
    CustomerPaymentMethod.ListRetrieving.QueryParams:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodPayType'
          description: |
            決済種別
        paypay_method:
          allOf:
            - $ref: '#/components/schemas/paypay_method'
          description: |
            決済方式\
            <span class="smallText">（`pay_type = Paypay`の場合のみ利用可能）</span>\
            指定した決済方式のPayPayアカウントのみを取得します。指定しなかった場合は決済方式で絞り込みません。

            - `CONTINUOUS`：継続課金
      required:
        - pay_type
    PaymentMethod_properties-id:
      type: string
      example: pm_**********************
      minLength: 25
      maxLength: 25
      description: |
        決済手段ID\
        <span class="smallText">※ `pay_type = Card`（カード）の場合は `cs_` から始まるIDになります。</span>
    properties-customer_id:
      type: string
      example: c_********************
      maxLength: 60
      description: |
        この決済手段が紐づく顧客のID
    PaymentMethodStatus:
      type: string
      enum:
        - INACTIVATED
        - AWAITING_CUSTOMER_ACTION
        - ACTIVATED
        - FAILED
      example: ACTIVATED
      description: |
        決済手段のステータス

        - `INACTIVATED`: 有効化前<br /><span class="smallText">まだこの決済手段は決済に使用できません。</span>
        - `AWAITING_CUSTOMER_ACTION`: 顧客のアクション待ち<br /><span class="smallText">この決済手段は登録のための購入者の承認がされていない状態です。まだこの決済手段は決済に使用できません。</span>
        - `ACTIVATED`: 有効化済み<br /><span class="smallText">この決済手段は決済に使用できます。</span>
        - `FAILED`: 失敗<br /><span class="smallText">この決済手段は決済に使用できません。</span>
    PaymentMethodPaypayStatus:
      type: string
      enum:
        - AWAITING_CUSTOMER_ACTION
        - ACTIVATED
        - FAILED
        - EXPIRED
        - REVOKED
        - CANCELED
      example: ACTIVATED
      description: |
        決済手段（PayPay）のステータス

        - `AWAITING_CUSTOMER_ACTION`: 顧客のアクション待ち<br /><span class="smallText">認可URL（`redirect_url`）を発行済みで、購入者によるPayPayアカウントの連携が完了していない状態です。まだこの決済手段は決済に使用できません。</span>
        - `ACTIVATED`: 有効化済み<br /><span class="smallText">PayPayアカウントの連携が完了しています。この決済手段は決済に使用できます。</span>
        - `FAILED`: 失敗<br /><span class="smallText">購入者が認可を拒否した、または認可画面の有効期限が切れたため連携が成立しませんでした。この決済手段は決済に使用できません。</span>
        - `EXPIRED`: 失効<br /><span class="smallText">連携が有効期限切れとなりました。この決済手段は決済に使用できません。</span>
        - `REVOKED`: 認可取消<br /><span class="smallText">購入者がPayPayアプリから連携（認可）を取り消しました。この決済手段は決済に使用できません。</span>
        - `CANCELED`: 退会<br /><span class="smallText">購入者がPayPayを退会しました。この決済手段は決済に使用できません。</span>
    PaymentMethodAmazonpayStatus:
      type: string
      enum:
        - INACTIVATED
        - AWAITING_CUSTOMER_ACTION
        - ACTIVATED
        - FAILED
        - SUSPENDED
        - DELETED
      example: ACTIVATED
      description: |
        決済手段（Amazon Pay）のステータス

        - `INACTIVATED`: 有効化前<br /><span class="smallText">決済手段を登録した直後の状態です。まだこの決済手段は決済に使用できません。</span>
        - `AWAITING_CUSTOMER_ACTION`: 顧客のアクション待ち<br /><span class="smallText">購入者にAmazon Pay上での利用承諾を行わせる必要がある状態です。`redirect_url`へ購入者をリダイレクトしてください。</span>
        - `ACTIVATED`: 有効化済み<br /><span class="smallText">利用承諾が完了し、この決済手段は決済に使用できます。</span>
        - `FAILED`: 失敗<br /><span class="smallText">利用承諾に失敗しました。この決済手段は決済に使用できません。</span>
        - `SUSPENDED`: 停止中<br /><span class="smallText">何らかの理由により請求できない状態です。購入者がAmazon Pay側で対応を行う必要があります。</span>
        - `DELETED`: 削除・期限切れ<br /><span class="smallText">利用承諾が終了しています。</span>
    status:
      oneOf:
        - $ref: '#/components/schemas/PaymentMethodStatus'
        - $ref: '#/components/schemas/PaymentMethodPaypayStatus'
        - $ref: '#/components/schemas/PaymentMethodAmazonpayStatus'
      description: |
        決済手段のステータス。\
        <span class="smallText">※ `pay_type`によって返却されるステータスが異なります。詳細は[こちら](https://docs.fincode.jp/payment/payment_method)をご確認ください。</span>\
        `pay_type = Paypay`の場合は「決済手段（PayPay）のステータス」、`pay_type = Amazonpay`の場合は「決済手段（Amazon Pay）のステータス」の値が返却されます。
    redirect_url_accessed_flag:
      type: string
      enum:
        - '0'
        - '1'
      example: '1'
      nullable: true
      description: |
        リダイレクトURLアクセス済みフラグ \
        （`pay_type = Directdebit`の場合のみ利用可能）\
        購入者が`redirect_url`にアクセスしたことがあるかどうかを示すフラグです。

        - `0`: 未アクセス
        - `1`: 1回以上アクセス済み
    return_url:
      type: string
      example: https://url.to/return/payer/success
      maxLength: 256
      nullable: true
      description: |
        （`pay_type ="Card" / "Directdebit" / "Paypay"`の場合のみ利用可能）\
        加盟店戻りURL（成功時）\
        購入者がアクションを完了し、決済手段の登録に成功した際にリダイレクトされるURLです。\
        POSTメソッドでリダイレクトがされます。\
        \
        <span class="smallText">※ `pay_type = Paypay`の場合はGETメソッドでリダイレクトされます。また、連携の成否によらずこのURLへ戻ります。連携の結果は`status`または結果通知（Webhook）で判定してください。</span>
    return_url_on_failure:
      type: string
      example: https://url.to/return/payer/failure
      maxLength: 256
      nullable: true
      description: |
        加盟店戻りURL（失敗時）\
        （`pay_type = Card`の場合のみ利用可能）\
        購入者がアクションを完了し、決済手段の登録に失敗した際にリダイレクトされるURLです。\
        POSTメソッドでリダイレクトがされます。
    properties-default_flag:
      type: string
      enum:
        - '0'
        - '1'
      minLength: 1
      maxLength: 1
      example: '1'
      description: |
        デフォルトフラグ。\
        この決済手段が決済実行やサブスクリプション登録などで決済手段IDを指定しない場合に自動的に使用する決済手段かどうかを示すフラグです。\
        顧客に対して、決済種別ごとに必ず1つのデフォルト決済手段が存在します。（決済手段が1つも登録されていない場合を除く）

        - `0`: デフォルト決済手段ではない
        - `1`: デフォルト決済手段
    client_field_n:
      type: string
      nullable: true
      minLength: 1
      maxLength: 100
      example: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
      description: |
        加盟店自由項目
    client_field_1:
      allOf:
        - $ref: '#/components/schemas/client_field_n'
    client_field_2:
      allOf:
        - $ref: '#/components/schemas/client_field_n'
    client_field_3:
      allOf:
        - $ref: '#/components/schemas/client_field_n'
    properties-delete_flag:
      allOf:
        - $ref: '#/components/schemas/delete_flag'
    properties-process_date:
      allOf:
        - $ref: '#/components/schemas/process_date'
    properties-created:
      allOf:
        - $ref: '#/components/schemas/created'
    properties-updated:
      allOf:
        - $ref: '#/components/schemas/updated'
    tds_type:
      type: string
      enum:
        - '0'
        - '2'
      example: '2'
      minLength: 1
      maxLength: 1
      nullable: true
      description: |
        3Dセキュア認証を利用するか。

        - `0`: 3Dセキュア認証を利用しない（デフォルト）
        - `2`: 3Dセキュア2.0認証を利用する
    tds2_type:
      type: string
      enum:
        - '2'
        - '3'
      example: '2'
      minLength: 1
      maxLength: 1
      nullable: true
      description: |
        3Dセキュア2.0非対応時の挙動設定\
        購入者がこの決済に利用したカードが3Dセキュア2.0に非対応である場合の後続処理を設定します。

        - `2`: エラーをレスポンスし、処理を終了する。（デフォルト）
        - `3`: 3Dセキュア認証なしで処理を継続する。
    tds2_ret_url:
      type: string
      example: https://your-server.example.com/3ds2-return
      maxLength: 256
      nullable: true
      description: |
        3Dセキュア認証における戻りURL  
        3Dセキュア認証に必要なAPIの呼び出しやコールバック処理をすべて加盟店で実装する場合のみ使用します。  
        fincodeは3Dセキュア認証処理の過程において、このURLにPOSTメソッド、`Content-Type:application/x-www-form-urlencoded`で値を返します。  

        - `MD`: クエリパラメータとして返されます。 `access_id`と等しい値です。
        - `event`: フォームデータとして返されます。この値を判定し後続の処理を分岐します。
        - `param`: フォームデータとして返されます。[3Dセキュア認証API](https://docs.fincode.jp/api#tag/ThreeDSecureecure/executeThreeDSecureecureAuth)で使用します。
        - `requestorTransId`: フォームデータとして返されます。（後続処理では使用しません。）

        返却されるそれぞれの値についての[詳細はDocsで確認](https://docs.fincode.jp/payment/fraud_protection/3d_secure_2)できます。
    ThreeDSecure2Status:
      type: string
      enum:
        - AUTHENTICATING
        - CHALLENGE
        - AUTHENTICATED
      example: AUTHENTICATING
      description: |
        3Dセキュア2.0認証処理 ステータス

        - `AUTHENTICATING`: 3Dセキュア認証処理中
        - `CHALLENGE`: チャレンジ認証の実施が必要
        - `AUTHENTICATED`: 3Dセキュア認証処理が完了
    td_tenant_name:
      type: string
      example: s_***********-ab123
      maxLength: 25
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        加盟店名。\
        3Dセキュア認証の際に表示されるショップ名や加盟店名を指定できます。\
        使用可能な文字は以下の通りです。
        - 半角英数
        - 半角記号： !"#$%&'()*+,-./:;<=>?@[\]`^_{|}~
        - 半角スペース

        未指定の場合、 カード決済の契約時にfincodeが下記の形式に従って設定した値が自動的に使用されます。\
        \
        形式：`{{ショップID}}-{{英数字からなる固定値}}`
    access_id:
      type: string
      nullable: false
      minLength: 24
      maxLength: 24
      example: a_**********************
      description: |
        取引ID
    card_updater_last_success_date:
      allOf:
        - $ref: '#/components/schemas/process_date'
      description: |
        カード更新成功日時
        最後にカード情報の更新に成功した日時\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    card_updater_last_attempt_date:
      allOf:
        - $ref: '#/components/schemas/process_date'
      description: |
        カード更新実施日時
        最後にカード情報の更新を実施した日時\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    card:
      type: object
      nullable: true
      description: |
        <span class="smallText">この決済手段がカードを表す（`pay_type = Card`）とき、カード情報の詳細がこの`card`オブジェクトに格納されます。</span>
      properties:
        card_no:
          type: string
          example: '************1234'
          maxLength: 16
          description: |
            マスク済みカード番号。\
            <span class="smallText">
            下4桁以外をマスクしたカード番号です。\
            カード情報非保持の原則に基づき、fincodeユーザーはマスクされていないカード番号の代わりにこの値を保持することができます。\
            </span>
            形式：`************1234`
        expire:
          type: string
          minLength: 4
          maxLength: 4
          example: '4012'
          nullable: true
          description: |
            カード有効期限。\
            形式：`YYMM`
        holder_name:
          type: string
          example: TARO EPSILON
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            カード名義人名。
        type:
          allOf:
            - $ref: '#/components/schemas/CardType'
            - nullable: true
        brand:
          allOf:
            - $ref: '#/components/schemas/CardBrand'
            - nullable: true
        card_no_hash:
          type: string
          example: abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz01
          minLength: 1
          maxLength: 64
          description: |
            カード番号をもとに生成されたハッシュ値。\
            <span class="smallText">
            おなじカード番号に対しては常に同じ値が返されます。\
            カード情報非保持の原則に基づき、fincodeユーザーはマスクされていないカード番号の代わりにこの値を保持することができます。
            </span>
        tds_type:
          allOf:
            - $ref: '#/components/schemas/tds_type'
          description: |
            カード登録時3Dセキュア認証を利用するか。

            - `0`: 3Dセキュア認証を利用しない（デフォルト）
            - `2`: 3Dセキュア2.0認証を利用する
        tds2_type:
          allOf:
            - $ref: '#/components/schemas/tds2_type'
          description: |
            3Dセキュア2.0非対応時の挙動設定\
            購入者がこの決済に利用したカードが3Dセキュア2.0に非対応である場合の後続処理を設定します。

            - `2`: エラーをレスポンスし、処理を終了する。（デフォルト）
            - `3`: 3Dセキュア認証なしで登録を行う。
        tds2_ret_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ret_url'
        tds2_status:
          allOf:
            - $ref: '#/components/schemas/ThreeDSecure2Status'
          description: |
            3Dセキュア2.0認証処理のステータス。\
            \
            <span class="smallText">【3Dセキュア認証結果の返却について】</span>\
            3Dセキュア認証結果（本項目を含む3Dセキュア関連項目）は、APIによって処理結果または保持している認証結果を返却します。  

            - 決済手段 登録API・更新APIでは、当該リクエストの処理結果を返却します。
            - 一方で、決済手段 取得API・一覧取得APIでは、保持している3Dセキュア認証結果を返却します。そのため、登録API・更新APIのレスポンスとは返却内容が異なる場合があります。
        merchant_name:
          allOf:
            - $ref: '#/components/schemas/td_tenant_name'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
          description: |
            取引ID
        card_updater_mode:
          allOf:
            - $ref: '#/components/schemas/card_updater_mode'
        card_updater_last_success_date:
          allOf:
            - $ref: '#/components/schemas/card_updater_last_success_date'
        card_updater_last_attempt_date:
          allOf:
            - $ref: '#/components/schemas/card_updater_last_attempt_date'
    DirectDebitApplicationType:
      type: string
      enum:
        - PAPER
        - ONLINE
      example: PAPER
      maxLength: 6
      nullable: true
      description: |
        この振替用口座を登録した際の申込方法

        - `PAPER`: 依頼書登録
        - `ONLINE`: Web登録
    DirectDebitSettlementRoute:
      type: string
      enum:
        - '1'
        - '2'
      example: '1'
      minLength: 1
      maxLength: 1
      description: |
        振替サービス

        - `1`: 口座振替（5・6・23・27日）
        - `2`: 口座振替（1・5・20・26日）
    DirectDebitLastResultCode:
      type: string
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
        - '7'
        - '8'
        - '9'
        - E
        - 'N'
      example: '0'
      minLength: 1
      maxLength: 1
      nullable: true
      description: |
        最新の振替結果コード。\
        この決済手段で最後に行われた振替の結果コードです。

        - `0`: 振替成功
        - `1`: 残高不足による失敗
        - `2`: 預金取引なしによる失敗<br /><span class="smallText">存在しない口座に対して請求した場合などに発生します。</span>
        - `3`: 購入者事由による失敗
        - `4`: 依頼書未着・不備による失敗<br /><span class="smallText">口座振替依頼書が金融機関側で登録されていない場合に発生します。</span>
        - `7`: データエラーに起因する失敗<br /><span class="smallText">口座振替（1・5・20・26日）のみ。</span><br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>
        - `8`: ショップ事由による失敗<br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>
        - `9`: その他の失敗<br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>
        - `E`: データエラーに起因する失敗<br /><span class="smallText">口座振替（5・6・23・27日）のみ。</span><br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>
        - `N`: 振替結果未着<br /><span class="smallText">口座振替（5・6・23・27日）のみ。</span><br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>

        [お問い合わせはこちらへ](https://form.fincode.jp/contact)
    directdebit:
      type: object
      nullable: true
      description: |
        <span class="smallText">この決済手段が振替用口座を表す（`pay_type = Directdebit`）とき、口座情報の詳細がこの`directdebit`オブジェクトに格納されます。</span>
      properties:
        application_type:
          $ref: '#/components/schemas/DirectDebitApplicationType'
        settlement_route:
          $ref: '#/components/schemas/DirectDebitSettlementRoute'
        expected_billable_date:
          type: string
          example: 2022/05/16 23:59:59.999
          nullable: true
          description: |
            請求可能予定日。\
            口座登録後、実際に請求依頼が可能となると予定される日時です。\
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        last_withdrawal_date:
          type: string
          example: 2022/05/16 23:59:59.999
          nullable: true
          description: |
            最終引落日。\
            金融機関によってこの口座から実際に引き落とされた実績日のうち、最も新しい日時です。\
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        last_result_code:
          $ref: '#/components/schemas/DirectDebitLastResultCode'
        bank_type:
          type: string
          enum:
            - '0'
            - '1'
          minLength: 1
          maxLength: 1
          nullable: true
          example: '0'
          description: |
            金融機関種別。

            - `0`: ゆうちょ銀行以外の金融機関
            - `1`: ゆうちょ銀行
        bank_code:
          type: string
          example: '0310'
          minLength: 4
          maxLength: 4
          nullable: true
          description: |
            金融機関コード。\
            金融機関のコードです。\
            例：`0310`
        bank_name:
          type: string
          example: GMOあおぞらネット銀行
          minLength: 1
          maxLength: 45
          nullable: true
          description: |
            金融機関名
        branch_code:
          type: string
          example: '301'
          minLength: 3
          maxLength: 3
          nullable: true
          description: |
            支店コード。\
            金融機関の支店コードです。\
            例：`001`
        branch_name:
          type: string
          example: うみ支店
          minLength: 1
          maxLength: 45
          description: |
            支店名
        account_type:
          type: string
          enum:
            - '1'
            - '2'
          minLength: 1
          maxLength: 1
          example: '1'
          nullable: true
          description: |
            預金区分

            - `1`: 普通
            - `2`: 当座
        account_number:
          type: string
          example: '1234567'
          nullable: true
          minLength: 1
          maxLength: 7
          description: |
            口座番号
        postal_account_number_1:
          type: string
          example: '12345'
          nullable: true
          minLength: 1
          maxLength: 5
          description: |
            ゆうちょ 預金記号
        postal_account_number_2:
          type: string
          example: '06789012'
          nullable: true
          minLength: 1
          maxLength: 8
          description: |
            ゆうちょ 預金番号
        account_name:
          type: string
          example: イプシロン　太郎
          nullable: true
          minLength: 1
          maxLength: 45
          description: |
            口座名義
        account_name_kana:
          type: string
          example: イプシロン　タロウ
          nullable: true
          minLength: 1
          maxLength: 30
          description: |
            口座名義（カナ）
        paper_application:
          type: object
          nullable: true
          description: |
            依頼書登録のパラメータ<br />
            <span class="smallText">
            ※ 依頼書登録により登録された口座の場合、この`paper_application`オブジェクトに依頼書からfincodeに転記した内容が含められます。
            </span>
          properties:
            preregistered_date:
              type: string
              example: 2022/05/16 23:59:59.999
              nullable: true
              description: |
                依頼書 仮登録日時。\
                依頼書を仮登録した日時です。\
                形式：`yyyy/MM/dd HH:mm:ss.SSS`
            request_form_id:
              type: string
              example: '12345678901234567890'
              minLength: 1
              maxLength: 20
              nullable: true
              description: |
                依頼書ID。\
                依頼書を管理画面から登録した際に登録者が指定した、依頼書を一意に識別するIDです。
            paper_failure_description:
              type: string
              example: 依頼書の登録が○○○という理由で失敗しました。
              nullable: true
              minLength: 1
              maxLength: 200
              description: |
                依頼書登録に失敗した理由。
    va_branch_code:
      type: string
      nullable: true
      minLength: 1
      maxLength: 3
      example: '502'
      description: |
        支店コード\
        \
        発行されたバーチャル口座の支店コードです。
    va_branch_name:
      type: string
      nullable: true
      maxLength: 15
      example: アジサイ
      description: |
        支店名\
        \
        発行されたバーチャル口座の支店名です。
    va_account_number:
      type: string
      nullable: true
      minLength: 7
      maxLength: 7
      example: '1234567'
      description: |
        口座番号\
        \
        発行されたバーチャル口座の口座番号です。
    va_account_name:
      type: string
      nullable: true
      maxLength: 40
      example: ジーエムオーイプシロン（カ
      description: |
        口座名義\
        \
        発行されたバーチャル口座の口座名義です。
    virtual_account_id:
      type: string
      nullable: true
      minLength: 10
      maxLength: 10
      example: '1234567890'
      description: |
        バーチャル口座ID\
        \
        発行されたバーチャル口座のIDです。
    account_assignment_date:
      type: string
      nullable: true
      example: 2022/05/16 12:34:56.999
      description: |
        バーチャル口座 割当日時\
        形式： `yyyy/MM/dd HH:mm:ss.SSS`
    virtualaccount:
      type: object
      nullable: true
      description: |
        <span class="smallText">この決済手段が銀行振込（バーチャル口座）を表す（`pay_type = Virtualaccount`）とき、バーチャル口座情報の詳細がこの`virtualaccount`オブジェクトに格納されます。</span>
      properties:
        va_branch_code:
          $ref: '#/components/schemas/va_branch_code'
        va_branch_name:
          $ref: '#/components/schemas/va_branch_name'
        va_account_number:
          $ref: '#/components/schemas/va_account_number'
        va_account_name:
          $ref: '#/components/schemas/va_account_name'
        virtual_account_id:
          $ref: '#/components/schemas/virtual_account_id'
        account_assignment_date:
          $ref: '#/components/schemas/account_assignment_date'
        last_activated_date:
          type: string
          example: 2022/05/16 23:59:59.999
          nullable: true
          description: |
            最終有効化日時\
            このバーチャル口座が有効化された最終日時です。\
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        latest_transaction_date:
          type: string
          example: 2022/05/16
          nullable: true
          description: |
            最新取引日時\
            このバーチャル口座で発生した取引のうち、最も新しい日時です。\
            形式：`yyyy/MM/dd`
    start_url:
      type: string
      example: https://api.test.fincode.jp/v1/payment_methods/amazonpay/start_session/pm_**********************
      maxLength: 256
      nullable: true
      description: |
        決済開始URL \
        （`pay_type = Amazonpay`の場合のみ利用可能）\
        購入者をこのURLへリダイレクトさせ、Amazon Pay上での利用承諾を開始します。
    amazonpay_seller_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 14
      example: A1BCDEFGHIJKLM
      description: |
        Amazon Pay 出品者ID\
        Amazon Payによって発行された出品者（マーチャント）IDです。
    amazonpay_checkout_session_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 256
      example: ada3f397-7d4b-4a55-abac-786685c02d8b
      description: |
        Amazon チェックアウトセッションID\
        Amazon Payのチェックアウトセッション（Checkout Session）のIDです。
    amazonpay_charge_permission_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 32
      example: S01-0000000-0000000
      description: |
        Amazon チャージパーミッションID\
        Amazon Payのチャージパーミッション（Charge Permission）のIDです。購入者から得た請求の許可を表します。
    amazonpay_reason_code:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      example: TransactionAmountExceeded
      description: |
        Amazon Pay 理由コード\
        Amazon Payでの処理が失敗した際に、その理由を示すコードです。
    amazonpay_charge_permission_expiration_time:
      type: string
      nullable: true
      example: 2026/10/31 12:34:56.789
      description: |
        Amazon Pay チャージパーミッション有効期限\
        Amazon Pay側で管理されているチャージパーミッションの有効期限です。\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`（タイムゾーンはUTC）
    merchant_store_name:
      type: string
      nullable: true
      minLength: 1
      maxLength: 50
      example: Your Shop
      description: |
        事業者名\
        購入者のAmazon Pay画面および注文履歴に表示される事業者名です。\
        <span class="smallText">※ 最大50バイト。指定しなかった場合はショップ名が設定されます。</span>
    note_to_buyer:
      type: string
      nullable: true
      minLength: 1
      maxLength: 1024
      example: ○○の購入
      description: |
        説明文\
        購入者のAmazon Pay画面および注文履歴に表示される説明文です。\
        <span class="smallText">※ 最大1024バイト。</span>
    AmazonpayProductType:
      type: string
      enum:
        - pay_only
        - pay_and_ship
      example: pay_only
      description: |
        プロダクトタイプ\
        Amazon Payのチェックアウト画面で購入者から取得する情報の種類を指定します。

        - `pay_only`：支払いのみ（配送先住所を取得しない）
        - `pay_and_ship`：支払いと配送（配送先住所を取得する）
    country_code:
      type: string
      nullable: true
      minLength: 2
      maxLength: 2
      example: JP
      description: |
        国コード\
        ISO 3166-1 alpha-2 形式の2桁の国コードです。
    city:
      type: string
      nullable: true
      minLength: 1
      maxLength: 50
      example: 渋谷区
      description: |
        都市
    county:
      type: string
      nullable: true
      minLength: 1
      maxLength: 200
      description: |
        州・郡\
        <span class="smallText">※ 日本国内の住所では返却されません。</span>
    district:
      type: string
      nullable: true
      minLength: 1
      maxLength: 200
      description: |
        区\
        <span class="smallText">※ 日本国内の住所では返却されません。</span>
    postal_code:
      type: string
      nullable: true
      minLength: 1
      maxLength: 16
      example: '1500001'
      description: |
        郵便番号
    state_or_region:
      type: string
      nullable: true
      minLength: 1
      maxLength: 50
      example: 東京都
      description: |
        都道府県
    properties-addr_line_1:
      type: string
      nullable: true
      minLength: 1
      maxLength: 60
      example: 神宮前1-2-3
      description: |
        住所1\
        国コードが日本（`JP`）の場合は市区町村と番地が格納されます。
    properties-addr_line_2:
      type: string
      nullable: true
      minLength: 1
      maxLength: 60
      example: サンプルビル10F
      description: |
        住所2
    properties-addr_line_3:
      type: string
      nullable: true
      minLength: 1
      maxLength: 60
      description: |
        住所3
    properties-name:
      type: string
      nullable: true
      minLength: 1
      maxLength: 50
      example: 山田 太郎
      description: |
        氏名
    phone_number:
      type: string
      nullable: true
      minLength: 1
      maxLength: 13
      example: '0312345678'
      description: |
        電話番号
    amazonpay:
      type: object
      nullable: true
      description: |
        <span class="smallText">この決済手段がAmazon Payの利用承諾を表す（`pay_type = Amazonpay`）とき、Amazon Payの情報の詳細がこの`amazonpay`オブジェクトに格納されます。</span>
      properties:
        amazonpay_seller_id:
          $ref: '#/components/schemas/amazonpay_seller_id'
        amazonpay_checkout_session_id:
          $ref: '#/components/schemas/amazonpay_checkout_session_id'
        amazonpay_charge_permission_id:
          $ref: '#/components/schemas/amazonpay_charge_permission_id'
        amazonpay_reason_code:
          $ref: '#/components/schemas/amazonpay_reason_code'
        amazonpay_charge_permission_expiration_time:
          $ref: '#/components/schemas/amazonpay_charge_permission_expiration_time'
        merchant_store_name:
          $ref: '#/components/schemas/merchant_store_name'
        note_to_buyer:
          $ref: '#/components/schemas/note_to_buyer'
        product_type:
          allOf:
            - $ref: '#/components/schemas/AmazonpayProductType'
        shipping:
          type: object
          nullable: true
          description: |
            配送先情報\
            購入者がAmazon Pay上で選択した配送先住所です。\
            <span class="smallText">※ 決済手段 取得のレスポンスでのみ返却されます。</span>
          properties:
            country_code:
              $ref: '#/components/schemas/country_code'
            city:
              $ref: '#/components/schemas/city'
            county:
              $ref: '#/components/schemas/county'
            district:
              $ref: '#/components/schemas/district'
            postal_code:
              $ref: '#/components/schemas/postal_code'
            state_or_region:
              $ref: '#/components/schemas/state_or_region'
            addr_line_1:
              $ref: '#/components/schemas/properties-addr_line_1'
            addr_line_2:
              $ref: '#/components/schemas/properties-addr_line_2'
            addr_line_3:
              $ref: '#/components/schemas/properties-addr_line_3'
            name:
              $ref: '#/components/schemas/properties-name'
            phone_number:
              $ref: '#/components/schemas/phone_number'
        billing:
          type: object
          nullable: true
          description: |
            請求先情報\
            購入者のAmazon Payアカウントに登録されている請求先住所です。\
            <span class="smallText">※ 決済手段 取得のレスポンスでのみ返却されます。</span>
          properties:
            country_code:
              $ref: '#/components/schemas/country_code'
            city:
              $ref: '#/components/schemas/city'
            county:
              $ref: '#/components/schemas/county'
            district:
              $ref: '#/components/schemas/district'
            postal_code:
              $ref: '#/components/schemas/postal_code'
            state_or_region:
              $ref: '#/components/schemas/state_or_region'
            addr_line_1:
              $ref: '#/components/schemas/properties-addr_line_1'
            addr_line_2:
              $ref: '#/components/schemas/properties-addr_line_2'
            addr_line_3:
              $ref: '#/components/schemas/properties-addr_line_3'
            name:
              $ref: '#/components/schemas/properties-name'
            phone_number:
              $ref: '#/components/schemas/phone_number'
    CustomerPaymentMethod.ListRetrieving.Response:
      type: object
      properties:
        list:
          type: array
          items:
            type: object
            properties:
              id:
                allOf:
                  - $ref: '#/components/schemas/PaymentMethod_properties-id'
                description: |
                  決済手段ID
              pay_type:
                type: string
                enum:
                  - Card
                  - Directdebit
                  - Virtualaccount
                  - Paypay
                  - Amazonpay
                example: Directdebit
                description: |
                  - `Card`
                  - `Directdebit`
                  - `Virtualaccount`
                  - `Paypay`
                  - `Amazonpay`
              customer_id:
                allOf:
                  - $ref: '#/components/schemas/properties-customer_id'
              status:
                allOf:
                  - $ref: '#/components/schemas/status'
              redirect_url:
                type: string
                example: https://url.to/redirect/payer
                maxLength: 256
                nullable: true
                description: |
                  リダイレクトURL \
                  購入者をこのURLへリダイレクトさせ、ステータスがAWAITING_CUSTOMER_ACTION の決済手段を有効化するための後続の処理へ誘導してください。
                  - 振替口座登録の場合： このURLにアクセスして振替口座登録の承認を行います。このURLには1度だけアクセスできます。
              redirect_url_accessed_flag:
                allOf:
                  - $ref: '#/components/schemas/redirect_url_accessed_flag'
              return_url:
                allOf:
                  - $ref: '#/components/schemas/return_url'
              return_url_on_failure:
                allOf:
                  - $ref: '#/components/schemas/return_url_on_failure'
              default_flag:
                allOf:
                  - $ref: '#/components/schemas/properties-default_flag'
              client_field_1:
                allOf:
                  - $ref: '#/components/schemas/client_field_1'
              client_field_2:
                allOf:
                  - $ref: '#/components/schemas/client_field_2'
              client_field_3:
                allOf:
                  - $ref: '#/components/schemas/client_field_3'
              delete_flag:
                allOf:
                  - $ref: '#/components/schemas/properties-delete_flag'
              process_date:
                allOf:
                  - $ref: '#/components/schemas/properties-process_date'
              created:
                allOf:
                  - $ref: '#/components/schemas/properties-created'
              updated:
                allOf:
                  - $ref: '#/components/schemas/properties-updated'
              card:
                type: object
                allOf:
                  - $ref: '#/components/schemas/card'
              directdebit:
                type: object
                allOf:
                  - $ref: '#/components/schemas/directdebit'
              virtualaccount:
                type: object
                allOf:
                  - $ref: '#/components/schemas/virtualaccount'
              start_url:
                allOf:
                  - $ref: '#/components/schemas/start_url'
              amazonpay:
                type: object
                allOf:
                  - $ref: '#/components/schemas/amazonpay'
    redirect_url:
      type: string
      minLength: 1
      maxLength: 256
      example: https://your-service.example.com/on-payment-complete
      description: |
        リダイレクトURL\
        Amazon Pay上での購入者の操作が完了した際のリダイレクト先URLです。\
        <span class="smallText">※ 都度決済の場合は必須</span>
    redirect_term_sec:
      type: string
      minLength: 1
      maxLength: 5
      default: '120'
      example: '120'
      description: |
        リダイレクト開始期限秒\
        `start_url`へのアクセス期限を秒数で指定します。\
        指定できる範囲は`1`〜`86400`（1日）です。指定しなかった場合は`120`（秒）が設定されます。
    redirect_type:
      type: string
      nullable: true
      enum:
        - '1'
        - '2'
      example: '1'
      description: |
        リダイレクト先種別\
        `redirect_url`の種別

        - `1`： Webページ／Webアプリケーション
        - `2`： ネイティブアプリ
    tds2_ch_acc_change:
      type: string
      example: '20240101'
      minLength: 8
      maxLength: 8
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        購入者ユーザーアカウント 最終更新日\
        形式：`YYYYMMDD`\
        \
        加盟店アプリケーションにおけるユーザーアカウントの情報が最後に更新された日付を設定します。
    tds2_ch_acc_date:
      type: string
      example: '20220101'
      minLength: 8
      maxLength: 8
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        購入者ユーザーアカウント 開設日\
        形式：`YYYYMMDD`\
        \
        加盟店アプリケーションにおけるユーザーアカウントの開設日を設定します。
    tds2_ch_acc_pw_change:
      type: string
      example: '20230101'
      minLength: 8
      maxLength: 8
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        購入者ユーザーアカウント パスワード最終更新日\
        形式：`YYYYMMDD`\
        \
        加盟店アプリケーションにおけるユーザーアカウントのパスワードが最後に更新された日付を設定します。
    tds2_nb_purchase_account:
      type: string
      example: '9999'
      minLength: 1
      maxLength: 4
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        購入者の過去6カ月間の購入回数
    tds2_payment_acc_age:
      type: string
      example: '20231231'
      minLength: 8
      maxLength: 8
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客ユーザーアカウント カード登録日。\
        形式：`YYYYMMDD`
    tds2_provision_attempts_day:
      type: string
      example: '999'
      minLength: 3
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客ユーザーアカウント 過去24時間のカード追加の試行回数
    tds2_ship_address_usage:
      type: string
      example: '20230930'
      minLength: 8
      maxLength: 8
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        配送先住所の最初の使用日。\
        形式：`YYYYMMDD`
    tds2_ship_name_ind:
      type: string
      enum:
        - '01'
        - '02'
      minLength: 2
      maxLength: 2
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        購入者名と配送先名が一致しているか否か\
        購入者名と登録に使用される配送先名の一致/不一致を設定

        - `01`: 顧客名と配送先名が一致
        - `02`: 顧客名と配送先名が不一致
    tds2_suspicious_acc_activity:
      type: string
      enum:
        - '01'
        - '02'
      minLength: 2
      maxLength: 2
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客ユーザーアカウント 不審行為有無\
        顧客ユーザーアカウントで、不審な行動（過去の不正行為を含む）を加盟店様が発見したかどうかを設定

        - `01`: 不審な行動なし
        - `02`: 不審な行動あり
    tds2_txn_activity_day:
      type: string
      example: '999'
      minLength: 3
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        購入者の過去24時間の取引回数
    tds2_txn_activity_year:
      type: string
      example: '999'
      minLength: 3
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        前年の取引回数
    tds2_three_ds_req_auth_data:
      type: string
      minLength: 1
      maxLength: 2048
      nullable: true
      example: null
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客ユーザーアカウント ログイン証跡\
        \
        加盟店アプリケーションにおけるログインの証跡。
        ログイン証跡を設定する場合、ログイン方法とログイン日時の設定が必要です。
    tds2_three_ds_req_auth_method:
      type: string
      enum:
        - '01'
        - '02'
        - '03'
        - '04'
        - '05'
        - '06'
      minLength: 2
      maxLength: 2
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客ユーザーアカウント ログイン方法\
        ログイン方法を設定する場合、ログイン証跡とログイン日時の設定が必要です。

        - `01`: 認証なし（ゲストとしてログイン）
        - `02`: 加盟店様自身の認証情報
        - `03`: SSO(シングルサインオン)
        - `04`: イシュアーの認証情報
        - `05`: サードパーティ認証
        - `06`: FIDO認証
    tds2_three_ds_req_auth_timestamp:
      type: string
      example: '202205191234'
      minLength: 12
      maxLength: 12
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客ユーザーアカウント ログイン日時\
        \
        ログイン証跡を設定する場合、ログイン方法とログイン日時の設定が必要です。\
        形式：`YYYYMMDDHHmm`
    tds2_email:
      type: string
      minLength: 1
      maxLength: 254
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客のメールアドレス\
        \
        未指定の場合、顧客の`email`が自動で設定されます。\
        \
        2024年8月12日以降、下記の内少なくとも1つが必須となります。

        - 顧客の自宅電話番号（`tds2_home_phone_no`）
        - 顧客の携帯電話番号（`tds2_mobile_phone_no`）
        - 顧客の職場電話番号（`tds2_work_phone_no`）
        - 顧客のメールアドレス（`tds2_email`）

        ※当面は連携しなかった場合でも認証は実施されますが、将来的には利用不可になる可能性があります。
    tds2_addr_match:
      type: string
      enum:
        - 'Y'
        - 'N'
      example: 'Y'
      minLength: 1
      maxLength: 1
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        請求先住所と配送先住所が一致しているか否か

        - `Y`: 住所は一致している
        - `N`: 住所は一致していない
    tds2_bill_addr_country:
      type: string
      example: '392'
      minLength: 1
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の請求先住所 国コード\
        形式：ISO 3166-1 numeric
        \
        未指定の場合、顧客の`addr_country`が自動で設定されます。  
        ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
        ※住所情報を保持していない場合、指定は不要です。
    tds2_bill_addr_state:
      type: string
      example: '13'
      minLength: 1
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の請求先住所 州または都道府県コード。\
        参照： [国土交通省 都道府県コード](https://nlftp.mlit.go.jp/ksj/gml/codelist/PrefCd.html)\
        \
        未指定の場合、顧客の`addr_state`が自動で設定されます。  
        ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
        ※住所情報を保持していない場合、指定は不要です。
    tds2_bill_addr_city:
      type: string
      example: 渋谷区
      minLength: 1
      maxLength: 50
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の請求先住所 都市名\
        \
        未指定の場合、顧客の`addr_city`が自動で設定されます。  
        ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
        ※住所情報を保持していない場合、指定は不要です。
    tds2_bill_addr_line_1:
      type: string
      example: 道玄坂1-14-6
      minLength: 1
      maxLength: 50
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の請求先住所 区域部1行目\
        \
        顧客の住所の番地・区画を指定してください。未指定の場合。顧客の`addr_line_1`が自動で設定されます。

        - 都道府県や市区を含めることができます。
        - 保持している住所をパラメータの形式に分割できない場合は、桁数が収まるように`tds2_bill_addr_line_1` ~ `tds2_bill_addr_line_3`に住所を設定してください。
        - `tds2_bill_addr_line_2`と`tds2_bill_addr_line_3`を空にして、`tds2_bill_addr_line_1`に全ての住所を設定できます。

        未指定の場合、顧客に登録された`addr_line_1`を設定します。  
        ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
        ※住所情報を保持していない場合、指定は不要です。
    tds2_bill_addr_line_2:
      type: string
      example: ヒューマックス渋谷ビル
      minLength: 1
      maxLength: 50
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の請求先住所 区域部2行目\
        \
        顧客の住所の建物名・部屋番号を指定してください。未指定の場合、顧客に登録された`addr_line_2`を設定します。
    tds2_bill_addr_line_3:
      type: string
      example: 7F
      minLength: 1
      maxLength: 50
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の請求先住所 区域部3行目\
        \
        顧客の住所のその他を指定してください。未指定の場合、顧客に登録された`addr_line_3`を設定します。
    tds2_bill_addr_post_code:
      type: string
      example: 150-0043
      minLength: 1
      maxLength: 16
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の請求先住所 郵便番号\
        \
        未指定の場合、顧客に登録された`addr_post_code`を設定します。  
        ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
        ※住所情報を保持していない場合、指定は不要です。
    tds2_ship_addr_country:
      type: string
      example: '392'
      minLength: 1
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の配送先住所 国コード。\
        形式：ISO 3166-1 numeric
    tds2_ship_addr_state:
      type: string
      example: '13'
      minLength: 1
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の配送先住所 州または都道府県コード。\
        参照： [国土交通省 都道府県コード](https://nlftp.mlit.go.jp/ksj/gml/codelist/PrefCd.html)
    tds2_ship_addr_city:
      type: string
      example: 渋谷区
      minLength: 1
      maxLength: 50
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の配送先住所 都市名
    tds2_ship_addr_line_1:
      type: string
      example: 道玄坂1-14-6
      minLength: 1
      maxLength: 50
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の配送先住所 区域部1行目
    tds2_ship_addr_line_2:
      type: string
      example: ヒューマックス渋谷ビル
      minLength: 1
      maxLength: 50
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の配送先住所 区域部2行目
    tds2_ship_addr_line_3:
      type: string
      example: 7F
      minLength: 1
      maxLength: 50
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の配送先住所 区域部3行目
    tds2_ship_addr_post_code:
      type: string
      example: 150-0043
      minLength: 1
      maxLength: 16
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の配送先住所 郵便番号
    tds2_ship_ind:
      type: string
      enum:
        - '01'
        - '02'
        - '03'
        - '04'
        - '05'
        - '06'
        - '07'
      example: '01'
      minLength: 2
      maxLength: 2
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        取引商品の配送方法

        - `01`: 顧客の請求先住所に配送
        - `02`: 加盟店が保持している確認済み住所（請求先住所でない）に配送
        - `03`: 顧客の請求先住所と異なる住所に配送
        - `04`: 店舗への配送（店舗の住所は配送先住所で指定）
        - `05`: デジタル商品（オンラインサービス、電子ギフトカードおよび償還コードを含む）
        - `06`: 配送なし（旅行およびイベントのチケット）
        - `07`: その他（ゲーム、配送されないデジタルサービス、電子メディアの購読料など）
    tds2_delivery_email_address:
      type: string
      example: email@example.com
      minLength: 1
      maxLength: 254
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客 メールアドレス
    tds2_home_phone_cc:
      type: string
      example: '81'
      minLength: 1
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の自宅電話番号の国コード（+を含まない）\
        ※ この値を設定する場合、`tds2_home_phone_no`の設定が必要です。\
        \
        未指定の場合、顧客の`phone_cc`が自動で設定されます。
    tds2_home_phone_no:
      type: string
      example: '312345678'
      minLength: 1
      maxLength: 15
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の自宅電話番号（ハイフンなし半角数字のみ）\
        ※ この値を設定する場合、`tds2_home_phone_cc`の設定が必要です。\
        \
        未指定の場合、顧客の`phone_no`が自動で設定されます。\
        \
        2024年8月12日以降、下記の内少なくとも1つが必須となります。

        - 顧客の自宅電話番号（`tds2_home_phone_no`）
        - 顧客の携帯電話番号（`tds2_mobile_phone_no`）
        - 顧客の職場電話番号（`tds2_work_phone_no`）
        - 顧客のメールアドレス（`tds2_email`）

        ※当面は連携しなかった場合でも認証は実施されますが、将来的には利用不可になる可能性があります。
    tds2_mobile_phone_cc:
      type: string
      example: '81'
      minLength: 1
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の携帯電話番号の国コード（+を含まない）\
        ※ この値を設定する場合、`tds2_mobile_phone_no`の設定が必要です。
    tds2_mobile_phone_no:
      type: string
      example: '9012345678'
      minLength: 1
      maxLength: 15
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の携帯電話番号（ハイフンなし半角数字のみ）\
        ※ この値を設定する場合、`tds2_mobile_phone_cc`の設定が必要です。\
        \
        2024年8月12日以降、下記の内少なくとも1つが必須となります。

        - 顧客の自宅電話番号（`tds2_home_phone_no`）
        - 顧客の携帯電話番号（`tds2_mobile_phone_no`）
        - 顧客の職場電話番号（`tds2_work_phone_no`）
        - 顧客のメールアドレス（`tds2_email`）

        ※当面は連携しなかった場合でも認証は実施されますが、将来的には利用不可になる可能性があります。
    tds2_work_phone_cc:
      type: string
      example: '81'
      minLength: 1
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の勤務先電話番号の国コード（+を含まない）\
        ※ この値を設定する場合、`tds2_work_phone_no`の設定が必要です。
    tds2_work_phone_no:
      type: string
      example: '312345678'
      minLength: 1
      maxLength: 15
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        顧客の勤務先電話番号（ハイフンなし半角数字のみ）\
        ※ この値を設定する場合、`tds2_work_phone_cc`の設定が必要です。\
        \
        2024年8月12日以降、下記の内少なくとも1つが必須となります。

        - 顧客の自宅電話番号（`tds2_home_phone_no`）
        - 顧客の携帯電話番号（`tds2_mobile_phone_no`）
        - 顧客の職場電話番号（`tds2_work_phone_no`）
        - 顧客のメールアドレス（`tds2_email`）

        ※当面は連携しなかった場合でも認証は実施されますが、将来的には利用不可になる可能性があります。
    tds2_delivery_timeframe:
      type: string
      enum:
        - '01'
        - '02'
        - '03'
        - '04'
      example: '01'
      minLength: 2
      maxLength: 2
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        商品納品時間枠

        - `01`: 電子デリバリー
        - `02`: 当日出荷
        - `03`: 翌日出荷
        - `04`: 2日目以降の出荷
    tds2_pre_order_date:
      type: string
      example: '20231231'
      minLength: 8
      maxLength: 8
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        商品の発売予定日\
        形式：`YYYYMMDD`
    tds2_pre_order_purchase_ind:
      type: string
      enum:
        - '01'
        - '02'
      example: '01'
      minLength: 2
      maxLength: 2
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        商品の販売時期情報

        - `01`: 発売済み商品
        - `02`: 先行予約商品
    tds2_reorder_items_ind:
      type: string
      enum:
        - '01'
        - '02'
      example: '01'
      minLength: 2
      maxLength: 2
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        商品の注文が初回か再注文か

        - `01`: 初回注文
        - `02`: 再注文
    tds2_recurring_expiry:
      type: string
      example: '20231231'
      minLength: 8
      maxLength: 8
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        ※ サブスクリプションなど継続課金型のビジネスモデルのみ\
        継続課金の終了日\
        形式：`YYYYMMDD`
    tds2_recurring_frequency:
      type: string
      example: '99'
      minLength: 1
      maxLength: 4
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        ※ サブスクリプションなど継続課金型のビジネスモデルのみ\
        継続課金の課金間隔の日数（最小）
    tds2_gift_card_amount:
      type: string
      example: '999999'
      minLength: 1
      maxLength: 15
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        ※ プリペイドカードまたはギフトカードを購入する場合のみ\
        プリペイドカードまたはギフトカードの総購入金額
    tds2_gift_card_count:
      type: string
      example: '99'
      minLength: 1
      maxLength: 2
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        ※ プリペイドカードまたはギフトカードを購入する場合のみ\
        購入したプリペイドカードまたはギフトカードの総数
    tds2_gift_card_curr:
      type: string
      example: '392'
      minLength: 1
      maxLength: 3
      nullable: true
      description: |
        <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
        ※ プリペイドカードまたはギフトカードを購入する場合のみ\
        プリペイドカードまたはギフトカードの通貨コード。\
        形式：ISO 4217 numeric\
        \
        以下の通貨コードは利用できません。（債券市場単位等）\
        `955`, `956`, `957`, `958`, `959`, `960`, `961`, `962`, `963`, `964`, `999`
    bank_code:
      type: string
      example: '0310'
      minLength: 4
      maxLength: 4
      nullable: true
      description: |
        金融機関コード。\
        金融機関のコードです。\
        例：`0310`
    branch_code:
      type: string
      example: '301'
      minLength: 3
      maxLength: 3
      nullable: true
      description: |
        支店コード。\
        金融機関の支店コードです。\
        例：`001`
    account_type:
      type: string
      enum:
        - '1'
        - '2'
      minLength: 1
      maxLength: 1
      example: '1'
      nullable: true
      description: |
        預金区分

        - `1`: 普通
        - `2`: 当座
    account_number:
      type: string
      example: '1234567'
      nullable: true
      minLength: 1
      maxLength: 7
      description: |
        口座番号
    account_name:
      type: string
      example: イプシロン　太郎
      nullable: true
      minLength: 1
      maxLength: 45
      description: |
        口座名義
    account_name_kana:
      type: string
      example: イプシロン　タロウ
      nullable: true
      minLength: 1
      maxLength: 30
      description: |
        口座名義（カナ）
    paper_application:
      type: object
      description: |
        依頼書登録のパラメータ
      properties:
        postal_account_number_1:
          type: string
          example: '12345'
          nullable: true
          minLength: 1
          maxLength: 5
          description: |
            ゆうちょ 預金記号
        postal_account_number_2:
          type: string
          example: '06789012'
          nullable: true
          minLength: 1
          maxLength: 8
          description: |
            ゆうちょ 預金番号
        request_form_id:
          type: string
          example: '12345678901234567890'
          minLength: 1
          maxLength: 20
          nullable: false
          description: |
            依頼書ID。\
            依頼書を管理画面から登録した際に登録者が指定した、依頼書を一意に識別するIDです。\
            ※プラットフォームショップの場合、プラットフォーム全体で一意である必要があります。
    x-req-properties-merchant_store_name:
      type: string
      minLength: 1
      maxLength: 50
      example: Your Shop
      description: |
        事業者名\
        購入者のAmazon Pay画面および注文履歴に表示される事業者名を指定します。\
        <span class="smallText">※ 最大50バイト。指定しなかった場合はショップ名が設定されます。</span>
    x-req-properties-note_to_buyer:
      type: string
      minLength: 1
      maxLength: 1024
      example: ○○の購入
      description: |
        説明文\
        購入者のAmazon Pay画面および注文履歴に表示される説明文を指定します。\
        <span class="smallText">※ 最大1024バイト。</span>
    product_type:
      allOf:
        - $ref: '#/components/schemas/AmazonpayProductType'
    x-req-properties-country_code:
      type: string
      minLength: 2
      maxLength: 2
      pattern: ^[A-Z-]{2,2}$
      example: JP
      description: |
        配送先国コード\
        ISO 3166-1 alpha-2 形式の2桁の国コードです。\
        <span class="smallText">※ `product_type`が`pay_and_ship`の場合は必須</span>
    x-req-properties-postal_code:
      type: string
      minLength: 1
      maxLength: 16
      pattern: ^[0-9-a-zA-Z-\s]{1,16}$
      example: '1500001'
      description: |
        配送先郵便番号\
        <span class="smallText">※ `product_type`が`pay_and_ship`の場合は必須</span>
    x-req-properties-state_or_region:
      type: string
      minLength: 1
      maxLength: 50
      example: 東京都
      description: |
        配送先都道府県\
        UTF-8で50バイトを超える部分はAmazon Pay側で切り捨てられます。\
        <span class="smallText">※ `product_type`が`pay_and_ship`かつ`country_code`が`GB`／`SG`／`MX`／`AE`以外の場合は必須。`GB`／`SG`／`MX`／`AE`（Amazon Payの住所検証の対象外国）の場合は指定しないでください。</span>
    x-req-properties-city:
      type: string
      minLength: 1
      maxLength: 50
      example: 渋谷区
      description: |
        配送先都市\
        UTF-8で50バイトを超える部分はAmazon Pay側で切り捨てられます。\
        <span class="smallText">※ `product_type`が`pay_and_ship`かつ`country_code`が`JP`以外の場合は必須</span>
    x-req-properties-addr_line_1:
      type: string
      minLength: 1
      maxLength: 60
      example: 神宮前1-2-3
      description: |
        配送先住所1\
        `country_code`が`JP`の場合は市区町村と番地を指定します。\
        UTF-8で60バイトを超える部分はAmazon Pay側で切り捨てられます。\
        <span class="smallText">※ `product_type`が`pay_and_ship`の場合は必須</span>
    x-req-properties-addr_line_2:
      type: string
      minLength: 1
      maxLength: 60
      example: サンプルビル10F
      description: |
        配送先住所2\
        UTF-8で60バイトを超える部分はAmazon Pay側で切り捨てられます。
    x-req-properties-addr_line_3:
      type: string
      minLength: 1
      maxLength: 60
      description: |
        配送先住所3\
        UTF-8で60バイトを超える部分はAmazon Pay側で切り捨てられます。
    x-req-properties-name:
      type: string
      minLength: 1
      maxLength: 50
      example: 山田 太郎
      description: |
        配送先氏名\
        UTF-8で50バイトを超える部分はAmazon Pay側で切り捨てられます。\
        <span class="smallText">※ `product_type`が`pay_and_ship`の場合は必須</span>
    x-req-properties-phone_number:
      type: string
      minLength: 1
      maxLength: 13
      pattern: ^[0-9-]{1,13}$
      example: '0312345678'
      description: |
        配送先電話番号\
        <span class="smallText">※ `product_type`が`pay_and_ship`の場合は必須</span>
    shipping:
      type: object
      description: |
        配送先情報\
        Amazon Payに引き渡す配送先住所を指定します。\
        <span class="smallText">※ `product_type`が`pay_and_ship`の場合に指定します。</span>
      properties:
        country_code:
          $ref: '#/components/schemas/x-req-properties-country_code'
        postal_code:
          $ref: '#/components/schemas/x-req-properties-postal_code'
        state_or_region:
          $ref: '#/components/schemas/x-req-properties-state_or_region'
        city:
          $ref: '#/components/schemas/x-req-properties-city'
        addr_line_1:
          $ref: '#/components/schemas/x-req-properties-addr_line_1'
        addr_line_2:
          $ref: '#/components/schemas/x-req-properties-addr_line_2'
        addr_line_3:
          $ref: '#/components/schemas/x-req-properties-addr_line_3'
        name:
          $ref: '#/components/schemas/x-req-properties-name'
        phone_number:
          $ref: '#/components/schemas/x-req-properties-phone_number'
    CustomerPaymentMethod.Creating.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodPayType'
        redirect_url:
          allOf:
            - $ref: '#/components/schemas/redirect_url'
          description: |
            リダイレクトURL\
            <span class="smallText">※ `pay_type = "Amazonpay"`のとき必須</span>\
            購入者がAmazon Pay上での利用承諾を終えた際のリダイレクト先URLです。
        redirect_term_sec:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/redirect_term_sec'
          description: |
            リダイレクト開始期限秒\
            <span class="smallText">※ `pay_type = "Amazonpay"`のとき指定できます</span>\
            `start_url`へのアクセス期限を秒数で指定します。指定できる範囲は`1`〜`86400`（1日）です。指定しなかった場合は`120`（秒）が設定されます。
        default_flag:
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        return_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/return_url'
          description: |
            （`pay_type ="Card" / "Directdebit" / "Paypay"`の場合のみ利用可能）\
            加盟店戻りURL（成功時）\
            <span class="smallText">※ `pay_type = "Paypay"`（この決済手段登録がPayPayアカウント連携である）のとき必須</span>\
            購入者がアクションを完了し、決済手段の登録に成功した際にリダイレクトされるURLです。\
            POSTメソッドでリダイレクトがされます。\
            \
            <span class="smallText">※ `pay_type = Paypay`の場合はGETメソッドでリダイレクトされます。また、連携の成否によらずこのURLへ戻ります。連携の結果は`status`または結果通知（Webhook）で判定してください。</span>
        return_url_on_failure:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/return_url_on_failure'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_1'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_2'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_3'
          description: |
            加盟店自由項目 3
        paypay_method:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/paypay_method'
          description: |
            決済方式\
            <span class="smallText">※ `pay_type = "Paypay"`（この決済手段登録がPayPayアカウント連携である）のとき必須</span>

            - `CONTINUOUS`：継続課金
        redirect_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/redirect_type'
          description: |
            リダイレクトタイプ\
            <span class="smallText">（`pay_type = "Paypay"`の場合のみ利用可能）</span>\
            購入者を認可URL（`redirect_url`）へ誘導する方法を指定します。指定しなかった場合は`1`として扱われます。
        card:
          type: object
          nullable: true
          description: |
            <span class="smallText">※ `pay_type = "Card"`（この決済手段登録がカード情報登録である）のとき必須</span>
          properties:
            token:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/token'
            card_updater_mode:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/card_updater_mode'
              description: |
                カード更新機能（洗替）利用設定
            tds_type:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds_type'
              description: |
                3Dセキュア認証を利用するか。\
                <span class="smallText">カード情報を登録する場合に指定します（省略可能）。</span>

                - `0`: 3Dセキュア認証を利用しない（デフォルト）
                - `2`: 3Dセキュア2.0認証を利用する
            tds2_type:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_type'
            td_tenant_name:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/td_tenant_name'
            tds2_ch_acc_change:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ch_acc_change'
            tds2_ch_acc_date:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ch_acc_date'
            tds2_ch_acc_pw_change:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ch_acc_pw_change'
            tds2_nb_purchase_account:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_nb_purchase_account'
            tds2_payment_acc_age:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_payment_acc_age'
            tds2_provision_attempts_day:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_provision_attempts_day'
            tds2_ship_address_usage:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_address_usage'
            tds2_ship_name_ind:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_name_ind'
            tds2_suspicious_acc_activity:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_suspicious_acc_activity'
            tds2_txn_activity_day:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_txn_activity_day'
            tds2_txn_activity_year:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_txn_activity_year'
            tds2_three_ds_req_auth_data:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_three_ds_req_auth_data'
            tds2_three_ds_req_auth_method:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_three_ds_req_auth_method'
            tds2_three_ds_req_auth_timestamp:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_three_ds_req_auth_timestamp'
            tds2_email:
              allOf:
                - $ref: '#/components/schemas/tds2_email'
            tds2_addr_match:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_addr_match'
            tds2_bill_addr_country:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_country'
            tds2_bill_addr_state:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_state'
            tds2_bill_addr_city:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_city'
            tds2_bill_addr_line_1:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_line_1'
            tds2_bill_addr_line_2:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_line_2'
            tds2_bill_addr_line_3:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_line_3'
            tds2_bill_addr_post_code:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_post_code'
            tds2_ship_addr_country:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_country'
            tds2_ship_addr_state:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_state'
            tds2_ship_addr_city:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_city'
            tds2_ship_addr_line_1:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_line_1'
            tds2_ship_addr_line_2:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_line_2'
            tds2_ship_addr_line_3:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_line_3'
            tds2_ship_addr_post_code:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_post_code'
            tds2_ship_ind:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_ship_ind'
            tds2_delivery_email_address:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_delivery_email_address'
            tds2_home_phone_cc:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_home_phone_cc'
            tds2_home_phone_no:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_home_phone_no'
            tds2_mobile_phone_cc:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_mobile_phone_cc'
            tds2_mobile_phone_no:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_mobile_phone_no'
            tds2_work_phone_cc:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_work_phone_cc'
            tds2_work_phone_no:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_work_phone_no'
            tds2_delivery_timeframe:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_delivery_timeframe'
            tds2_pre_order_date:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_pre_order_date'
            tds2_pre_order_purchase_ind:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_pre_order_purchase_ind'
            tds2_reorder_items_ind:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_reorder_items_ind'
            tds2_recurring_expiry:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_recurring_expiry'
            tds2_recurring_frequency:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_recurring_frequency'
            tds2_gift_card_amount:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_gift_card_amount'
            tds2_gift_card_count:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_gift_card_count'
            tds2_gift_card_curr:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_gift_card_curr'
          required:
            - token
        directdebit:
          type: object
          nullable: true
          description: <span class="smallText">※ `pay_type = "Directdebit"`（この決済手段登録が口座振替用の口座情報登録である）のとき必須</span>
          properties:
            application_type:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/DirectDebitApplicationType'
            settlement_route:
              nullable: false
              type: string
              enum:
                - '1'
                - '2'
              example: '1'
              minLength: 1
              maxLength: 1
              description: |
                振替サービス\
                口座を登録する振替サービスを指定します。\
                指定しなかった場合はデフォルトの振替サービスに口座が登録されます。\
                ※デフォルトは審査完了日時が最新の振替サービスとなります。

                - `1`: 口座振替（5・6・23・27日）
                - `2`: 口座振替（1・5・20・26日）
            bank_code:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/bank_code'
            branch_code:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/branch_code'
              description: |
                支店コード\
                ゆうちょ銀行以外（`bank_code`が`9900`でない）のとき必須
            account_type:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/account_type'
              description: |
                預金区分\
                ゆうちょ銀行以外（`bank_code`が`9900`でない）のとき必須

                - `1`: 普通
                - `2`: 当座
            account_number:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/account_number'
              description: |
                口座番号\
                ゆうちょ銀行以外（`bank_code`が`9900`でない）のとき必須\
                形式： 左0埋め
            account_name:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/account_name'
            account_name_kana:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/account_name_kana'
              description: |
                口座名義（カナ）\
                形式： 半角英数カナ記号、全角英数カナ記号、一部の記号、半角全角スペース\
                \
                使用可能な記号は以下の通りです。

                - 半角：`.` `(` `)` `–`
                - 全角：`．` `（` `）` `ー`
            paper_application:
              allOf:
                - $ref: '#/components/schemas/paper_application'
              required:
                - request_form_id
          required:
            - application_type
            - bank_code
            - account_name_kana
        amazonpay:
          type: object
          nullable: true
          description: |
            <span class="smallText">※ `pay_type = "Amazonpay"`（この決済手段登録がAmazon Payの利用承諾である）のとき必須</span>
          properties:
            merchant_store_name:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/x-req-properties-merchant_store_name'
            note_to_buyer:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/x-req-properties-note_to_buyer'
            product_type:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/product_type'
            shipping:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/shipping'
          required:
            - note_to_buyer
            - product_type
      required:
        - pay_type
        - default_flag
    properties-redirect_url:
      type: string
      example: https://url.to/redirect/payer
      maxLength: 256
      nullable: true
      description: |
        リダイレクトURL \
        購入者をこのURLへリダイレクトさせ、ステータスがAWAITING_CUSTOMER_ACTION の決済手段を有効化するための後続の処理へ誘導してください。
        - 振替口座登録の場合： このURLにアクセスして振替口座登録の承認を行います。このURLには1度だけアクセスできます。
        - カード登録の場合： このURLにアクセスして3Dセキュア認証を行います。
        - PayPayアカウント連携の場合： このURLにアクセスしてPayPayアカウントの連携（認可）を行います。連携が完了すると`status`が`ACTIVATED`になります。
        - Amazon Payの利用承諾の場合： このURLにアクセスしてAmazon Pay上で利用承諾を行います。\
        <span class="smallText">※ `pay_type = Card`（カード）の場合、この項目は決済手段の登録・更新のレスポンスでのみ返却されます（取得・一覧取得・削除のレスポンスでは返却されません）。</span>
    error_code:
      type: string
      minLength: 11
      maxLength: 11
      example: E**********
      description: |
        エラー内容を判定する場合はこの`error_code`の使用が推奨されます。\
        [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
    x-res-properties-card:
      type: object
      properties:
        acs:
          type: string
          example: '1'
          nullable: true
          minLength: 1
          maxLength: 1
          description: |
            ACS呼出判定。
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            このカードの登録・更新において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
    properties-error_code:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/error_code'
      description: |
        エラーコード \
        （`pay_type = Amazonpay`の場合のみ利用可能）\
        この決済手段の登録・更新において発生したエラーのうち、一番最新のエラーのエラーコードです。\
        [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
    CustomerPaymentMethod.Creating.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
        pay_type:
          type: string
          enum:
            - Card
            - Directdebit
            - Virtualaccount
            - Paypay
            - Amazonpay
          example: Directdebit
          description: |
            - `Card`
            - `Directdebit`
            - `Virtualaccount`
            - `Paypay`
            - `Amazonpay`
        customer_id:
          allOf:
            - $ref: '#/components/schemas/properties-customer_id'
        status:
          allOf:
            - $ref: '#/components/schemas/status'
        redirect_url:
          allOf:
            - $ref: '#/components/schemas/properties-redirect_url'
        redirect_url_accessed_flag:
          allOf:
            - $ref: '#/components/schemas/redirect_url_accessed_flag'
        return_url:
          allOf:
            - $ref: '#/components/schemas/return_url'
        return_url_on_failure:
          allOf:
            - $ref: '#/components/schemas/return_url_on_failure'
        default_flag:
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        client_field_1:
          allOf:
            - $ref: '#/components/schemas/client_field_1'
        client_field_2:
          allOf:
            - $ref: '#/components/schemas/client_field_2'
        client_field_3:
          allOf:
            - $ref: '#/components/schemas/client_field_3'
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/properties-delete_flag'
        process_date:
          allOf:
            - $ref: '#/components/schemas/properties-process_date'
        created:
          allOf:
            - $ref: '#/components/schemas/properties-created'
        updated:
          allOf:
            - $ref: '#/components/schemas/properties-updated'
        card:
          type: object
          allOf:
            - $ref: '#/components/schemas/card'
            - $ref: '#/components/schemas/x-res-properties-card'
        directdebit:
          type: object
          allOf:
            - $ref: '#/components/schemas/directdebit'
        virtualaccount:
          type: object
          allOf:
            - $ref: '#/components/schemas/virtualaccount'
        start_url:
          allOf:
            - $ref: '#/components/schemas/start_url'
        error_code:
          allOf:
            - $ref: '#/components/schemas/properties-error_code'
        amazonpay:
          type: object
          allOf:
            - $ref: '#/components/schemas/amazonpay'
    PaymentMethodId_schema:
      type: string
      example: pm_**********************
    CustomerPaymentMethod.Retrieving.QueryParams:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodPayType'
          description: |
            決済種別
      required:
        - pay_type
    CustomerPaymentMethod.Retrieving.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID
        pay_type:
          type: string
          enum:
            - Card
            - Directdebit
            - Virtualaccount
            - Paypay
            - Amazonpay
          example: Directdebit
          description: |
            - `Card`
            - `Directdebit`
            - `Virtualaccount`
            - `Paypay`
            - `Amazonpay`
        customer_id:
          allOf:
            - $ref: '#/components/schemas/properties-customer_id'
        status:
          allOf:
            - $ref: '#/components/schemas/status'
        redirect_url:
          allOf:
            - $ref: '#/components/schemas/properties-redirect_url'
        redirect_url_accessed_flag:
          allOf:
            - $ref: '#/components/schemas/redirect_url_accessed_flag'
        return_url:
          allOf:
            - $ref: '#/components/schemas/return_url'
        return_url_on_failure:
          allOf:
            - $ref: '#/components/schemas/return_url_on_failure'
        default_flag:
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        client_field_1:
          allOf:
            - $ref: '#/components/schemas/client_field_1'
        client_field_2:
          allOf:
            - $ref: '#/components/schemas/client_field_2'
        client_field_3:
          allOf:
            - $ref: '#/components/schemas/client_field_3'
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/properties-delete_flag'
        process_date:
          allOf:
            - $ref: '#/components/schemas/properties-process_date'
        created:
          allOf:
            - $ref: '#/components/schemas/properties-created'
        updated:
          allOf:
            - $ref: '#/components/schemas/properties-updated'
        card:
          type: object
          allOf:
            - $ref: '#/components/schemas/card'
        directdebit:
          type: object
          allOf:
            - $ref: '#/components/schemas/directdebit'
        virtualaccount:
          type: object
          allOf:
            - $ref: '#/components/schemas/virtualaccount'
        start_url:
          allOf:
            - $ref: '#/components/schemas/start_url'
        error_code:
          allOf:
            - $ref: '#/components/schemas/properties-error_code'
        amazonpay:
          type: object
          allOf:
            - $ref: '#/components/schemas/amazonpay'
    reauth:
      type: string
      enum:
        - '1'
      minLength: 1
      maxLength: 1
      example: '1'
      description: |
        再認可フラグ\
        `1`を指定すると、この決済手段の認可URL（`redirect_url`）を再発行し、`status`を`AWAITING_CUSTOMER_ACTION`に戻します。\
        決済手段IDは変わらないため、サブスクリプションなどで参照している場合も再設定は不要です。\
        \
        `default_flag`とは同時に指定できません。
    properties-expire:
      allOf:
        - $ref: '#/components/schemas/expire'
    properties-holder_name:
      allOf:
        - $ref: '#/components/schemas/holder_name'
    CustomerPaymentMethod.Updating.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            更新された決済手段のIDです。
        pay_type:
          type: string
          enum:
            - Card
            - Virtualaccount
            - Paypay
            - Amazonpay
          example: Virtualaccount
          description: |
            - `Card`
            - `Virtualaccount`
            - `Paypay`
            - `Amazonpay`\
            ※ 現時点では`Card`（クレジットカード）、`Virtualaccount`（銀行振込（バーチャル口座））、`Paypay`（PayPay）、`Amazonpay`（Amazon Pay）のみ指定可能です。
        customer_id:
          allOf:
            - $ref: '#/components/schemas/properties-customer_id'
        status:
          allOf:
            - $ref: '#/components/schemas/status'
        redirect_url:
          allOf:
            - $ref: '#/components/schemas/properties-redirect_url'
        default_flag:
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        client_field_1:
          allOf:
            - $ref: '#/components/schemas/client_field_1'
        client_field_2:
          allOf:
            - $ref: '#/components/schemas/client_field_2'
        client_field_3:
          allOf:
            - $ref: '#/components/schemas/client_field_3'
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/properties-delete_flag'
        process_date:
          allOf:
            - $ref: '#/components/schemas/properties-process_date'
        created:
          allOf:
            - $ref: '#/components/schemas/properties-created'
        updated:
          allOf:
            - $ref: '#/components/schemas/properties-updated'
        card:
          type: object
          allOf:
            - $ref: '#/components/schemas/card'
            - $ref: '#/components/schemas/x-res-properties-card'
        virtualaccount:
          type: object
          allOf:
            - $ref: '#/components/schemas/virtualaccount'
        start_url:
          allOf:
            - $ref: '#/components/schemas/start_url'
        error_code:
          allOf:
            - $ref: '#/components/schemas/properties-error_code'
        amazonpay:
          type: object
          allOf:
            - $ref: '#/components/schemas/amazonpay'
    CustomerPaymentMethod.Deleting.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            削除された決済手段のIDです。
        pay_type:
          type: string
          enum:
            - Card
            - Directdebit
            - Virtualaccount
            - Paypay
            - Amazonpay
          example: Directdebit
          description: |
            - `Card`
            - `Directdebit`
            - `Virtualaccount`
            - `Paypay`
            - `Amazonpay`
        customer_id:
          allOf:
            - $ref: '#/components/schemas/properties-customer_id'
        status:
          allOf:
            - $ref: '#/components/schemas/status'
        redirect_url:
          allOf:
            - $ref: '#/components/schemas/properties-redirect_url'
        redirect_url_accessed_flag:
          allOf:
            - $ref: '#/components/schemas/redirect_url_accessed_flag'
        return_url:
          allOf:
            - $ref: '#/components/schemas/return_url'
        return_url_on_failure:
          allOf:
            - $ref: '#/components/schemas/return_url_on_failure'
        default_flag:
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        client_field_1:
          allOf:
            - $ref: '#/components/schemas/client_field_1'
        client_field_2:
          allOf:
            - $ref: '#/components/schemas/client_field_2'
        client_field_3:
          allOf:
            - $ref: '#/components/schemas/client_field_3'
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/properties-delete_flag'
        process_date:
          allOf:
            - $ref: '#/components/schemas/properties-process_date'
        created:
          allOf:
            - $ref: '#/components/schemas/properties-created'
        updated:
          allOf:
            - $ref: '#/components/schemas/properties-updated'
        card:
          type: object
          allOf:
            - $ref: '#/components/schemas/card'
        directdebit:
          type: object
          allOf:
            - $ref: '#/components/schemas/directdebit'
        virtualaccount:
          type: object
          allOf:
            - $ref: '#/components/schemas/virtualaccount'
        start_url:
          allOf:
            - $ref: '#/components/schemas/start_url'
        error_code:
          allOf:
            - $ref: '#/components/schemas/properties-error_code'
        amazonpay:
          type: object
          allOf:
            - $ref: '#/components/schemas/amazonpay'
    CustomerPaymentMethod.Inactivating.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            更新された決済手段のIDです。
        pay_type:
          type: string
          enum:
            - Virtualaccount
          example: Virtualaccount
          description: |
            - `Virtualaccount`
        customer_id:
          allOf:
            - $ref: '#/components/schemas/properties-customer_id'
        status:
          allOf:
            - $ref: '#/components/schemas/status'
        default_flag:
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        client_field_1:
          allOf:
            - $ref: '#/components/schemas/client_field_1'
        client_field_2:
          allOf:
            - $ref: '#/components/schemas/client_field_2'
        client_field_3:
          allOf:
            - $ref: '#/components/schemas/client_field_3'
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/properties-delete_flag'
        process_date:
          allOf:
            - $ref: '#/components/schemas/properties-process_date'
        created:
          allOf:
            - $ref: '#/components/schemas/properties-created'
        updated:
          allOf:
            - $ref: '#/components/schemas/properties-updated'
        virtualaccount:
          type: object
          allOf:
            - $ref: '#/components/schemas/virtualaccount'
    PayType:
      type: string
      enum:
        - Card
        - Konbini
        - Paypay
        - Applepay
        - Googlepay
        - Directdebit
        - Virtualaccount
        - Amazonpay
      example: Card
      description: |
        決済種別\
        この決済で利用する決済手段です。

        - `Card`: カード
        - `Konbini`: コンビニ決済
        - `Paypay`: PayPay
        - `Applepay`: Apple Pay
        - `Googlepay`: Google Pay
        - `Directdebit`: 口座振替
        - `Virtualaccount`: 銀行振込（バーチャル口座）
        - `Amazonpay`: Amazon Pay
      x-description-card: |
        決済種別\
        この決済で利用する決済手段です。

        - `Card`: カード
      x-description-konbini: |
        決済種別\
        この決済で利用する決済手段です。

        - `Konbini`: コンビニ決済
      x-description-paypay: |
        決済種別\
        この決済で利用する決済手段です。

        - `Paypay`: PayPay
      x-description-applepay: |
        決済種別\
        この決済で利用する決済手段です。

        - `Applepay`: Apple Pay
      x-description-googlepay: |
        決済種別\
        この決済で利用する決済手段です。

        - `Googlepay`: Google Pay
      x-description-directdebit: |
        決済種別\
        この決済で利用する決済手段です。

        - `Directdebit`: 口座振替
      x-description-virtualaccount: |
        決済種別\
        この決済で利用する決済手段です。

        - `Virtualaccount`: 銀行振込（バーチャル口座）
      x-description-amazonpay: |
        決済種別    この決済で利用する決済手段です。

        - `Amazonpay`: Amazon Pay
    Payment.ListRetrieving.QueryParams:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            一覧で取得する対象の決済種別を指定します。

            - `Card`: カード
            - `Konbini`: コンビニ決済
            - `Paypay`: PayPay
            - `Applepay`: Apple Pay
            - `Googlepay`: Google Pay
            - `Directdebit`: 口座振替
            - `Virtualaccount`: 銀行振込（バーチャル口座）
            - `Amazonpay`: Amazon Pay
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1  
            指定した場合、完全一致で検索を行います。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2  
            指定した場合、完全一致で検索を行います。
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3  
            指定した場合、完全一致で検索を行います。
        total_amount_min:
          nullable: true
          type: integer
          format: int64
          minLength: 1
          maxLength: 9999999
          description: |
            合計金額（始値）\
            利用金額と税送料の合計額（`total_amount`）を対象に範囲検索を行います。この値以上の合計金額を持つ決済情報を取得します。
        total_amount_max:
          nullable: true
          type: integer
          format: int64
          minLength: 1
          maxLength: 9999999
          description: |
            合計金額（終値）\
            利用金額と税送料の合計額（`total_amount`）を対象に範囲検索を行います。この値以下の合計金額を持つ決済情報を取得します。
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            指定した顧客IDに紐づく決済情報から一覧で取得します。
        process_date_from:
          nullable: true
          type: string
          description: |
            処理日時（始値）\
            処理日時（`process_date`）を対象に範囲検索を行います。この日付以降に処理された決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        process_date_to:
          nullable: true
          type: string
          description: |
            処理日時（終値）\
            処理日時（`process_date`）を対象に範囲検索を行います。この日付以前に処理された決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
      required:
        - pay_type
    PaymentStatus:
      type: string
      enum:
        - UNPROCESSED
        - CHECKED
        - AUTHORIZED
        - AWAITING_CUSTOMER_PAYMENT
        - AWAITING_PAYMENT_APPROVAL
        - CAPTURED
        - CANCELED
        - EXPIRED
        - AUTHENTICATED
        - FAILED
      example: CAPTURED
      description: |
        決済ステータス

        - `UNPROCESSED`: 未処理
        - `CHECKED`: 有効性チェック済み
        - `AUTHORIZED`: 仮売上
        - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち
        - `AWAITING_PAYMENT_APPROVAL`: 決済承認待ち
        - `CAPTURED`: 売上確定
        - `CANCELED`: キャンセル
        - `EXPIRED`: 決済の期限切れ
        - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）
        - `FAILED`: 決済失敗
      x-description-card: |
        決済ステータス

        - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
        - `CHECKED`: 有効性チェック済み<br /><span class="smallText">カードの有効性チェックが完了しています。</span>
        - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
        - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
        - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
        - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）<br /><span class="smallText">3Dセキュア認証を使用する決済を実行した直後の状態です。認証後決済実行を行うまで請求や仮売上はされません。</span>
      x-description-konbini: |
        決済ステータス

        - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
        - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるコンビニ店頭レジでの払い込みを待っている状態。</span>
        - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
        - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
        - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
      x-description-paypay: |
        決済ステータス

        - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
        - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるPayPay上での取引承認を待っている状態。</span>
        - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上としてPayPay残高の確保が完了しており、売上確定により請求を完了できます。</span>
        - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
        - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
        - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
      x-description-applepay: |
        決済ステータス

        - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
        - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
        - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
        - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
      x-description-googlepay: |
        決済ステータス

        - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
        - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
        - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
        - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
        - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）<br /><span class="smallText">3Dセキュア認証を使用する決済を実行した直後の状態です。認証後決済実行を行うまで請求や仮売上はされません。</span>
      x-description-directdebit: |
        決済ステータス

        - `UNPROCESSED`: 未処理<br /><span class="smallText">振替はまだ実行されていません。</span>
        - `AWAITING_PAYMENT_APPROVAL`: 決済処理待ち<br /><span class="smallText">fincodeおよび金融機関による振替処理を待っています。</span>
        - `CAPTURED`: 売上確定<br /><span class="smallText">振替が完了し、売上が確定しています。</span>
        - `CANCELED`: キャンセル<br /><span class="smallText">この振替はキャンセルされました。</span>
        - `FAILED`: 請求失敗<br /><span class="smallText">何らかの理由により振替に失敗しました。</span>
      x-description-virtualaccount: |
        決済ステータス

        - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
        - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるバーチャル口座への振込を待っている状態。</span>
        - `CAPTURED`: 売上確定<br /><span class="smallText">振込が完了し、売上が確定しています。</span>
        - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
        - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
    Payment.ListRetrieving.Card.QueryParams:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス\
            指定したステータスの決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `UNPROCESSED`: 未処理
            - `CHECKED`: 有効性チェック済み
            - `AUTHORIZED`: 仮売上
            - `CAPTURED`: 売上確定
            - `CANCELED`: キャンセル
            - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）
        auth_max_date_from:
          type: string
          description: |
            仮売上有効期限（始値）\
            仮売上有効期限（`auth_max_date`）を対象に範囲検索を行います。この日付以降に仮売上が有効期限切れとなる決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        auth_max_date_to:
          type: string
          description: |
            仮売上有効期限（終値）\
            仮売上有効期限（`auth_max_date`）を対象に範囲検索を行います。この日付以前に仮売上が有効期限切れとなる決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        subscription_id:
          type: string
          description: |
            サブスクリプションID\
            サブスクリプションIDを指定して、指定したサブスクリプションによって作成された決済情報を取得します。
        pay_pattern:
          type: string
          enum:
            - onetime
            - subscription
            - bulk
          description: |
            課金種別\
            指定した課金種別の決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `onetime`: サブスクリプションでない都度払い
            - `subscription`: サブスクリプション
        last_four_digits:
          type: string
          minLength: 4
          maxLength: 4
          description: |
            カード番号（下4桁）\
            カード番号の下4桁を指定して、該当する決済情報を取得します。
        search_scope:
          type: string
          enum:
            - self
            - sub
            - tenant
          example: self,sub,tenant
          description: |
            検索範囲\
            メインプラットフォームショップのみ指定可能な項目です。\
            指定された検索範囲において決済情報の検索を行います。カンマ区切りにすることで複数指定できます。
            - `self`: 自身のショップ（デフォルト）
            - `sub`: プラットフォーム上全てのサブショップ
            - `tenant`: プラットフォーム上全てのテナントショップ
        shop_id_list:
          type: string
          example: s_***********,s_***********,s_***********
          description: |
            検索対象ショップIDリスト\
            メインプラットフォームショップのみ指定可能な項目です。\
            指定されたにショップおいて決済情報の検索を行います。カンマ区切りにすることで複数指定できます。
        order_id:
          type: string
          description: |
            オーダーID\
            メインプラットフォームショップのみ指定可能な項目です。\
            指定のオーダーIDに紐づく決済情報を取得します。
        update_date_from:
          type: string
          description: |
            更新日時（始値）\
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        update_date_to:
          type: string
          description: |
            更新日時（終値）\
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `status`: ステータス
            - `process_date`: 処理日時
            - `total_amount`: 合計金額
            - `auth_max_date`: 仮売上有効期限
            - `created`: 作成日時
            - `updated`: 更新日時
    Payment.ListRetrieving.ApplePay.QueryParams:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス\
            指定したステータスの決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `UNPROCESSED`: 未処理
            - `AUTHORIZED`: 仮売上
            - `CAPTURED`: 売上確定
            - `CANCELED`: キャンセル
        auth_max_date_from:
          type: string
          description: |
            仮売上有効期限（始値）\
            仮売上有効期限（`auth_max_date`）を対象に範囲検索を行います。この日付以降に仮売上が有効期限切れとなる決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        auth_max_date_to:
          type: string
          description: |
            仮売上有効期限（終値）\
            仮売上有効期限（`auth_max_date`）を対象に範囲検索を行います。この日付以前に仮売上が有効期限切れとなる決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        updated_from:
          type: string
          description: |
            更新日（始値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        updated_to:
          type: string
          description: |
            更新日（終値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `status`: ステータス
            - `process_date`: 処理日時
            - `total_amount`: 合計金額
            - `auth_max_date`: 仮売上有効期限
            - `created`: 作成日時
            - `updated`: 更新日時
    Payment.ListRetrieving.Googlepay.QueryParams:
      type: object
      properties:
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_1'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_2'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_3'
          description: |
            加盟店自由項目 3
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス\
            指定したステータスの決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `UNPROCESSED`: 未処理
            - `AUTHORIZED`: 仮売上
            - `CAPTURED`: 売上確定
            - `CANCELED`: キャンセル
            - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）
        auth_max_date_from:
          type: string
          description: |
            仮売上有効期限（始値）\
            仮売上有効期限（`auth_max_date`）を対象に範囲検索を行います。この日付以降に仮売上が有効期限切れとなる決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        auth_max_date_to:
          type: string
          description: |
            仮売上有効期限（終値）\
            仮売上有効期限（`auth_max_date`）を対象に範囲検索を行います。この日付以前に仮売上が有効期限切れとなる決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        update_date_from:
          type: string
          description: |
            更新日時（始値）\
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        update_date_to:
          type: string
          description: |
            更新日時（終値）\
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `status`: ステータス
            - `process_date`: 処理日時
            - `total_amount`: 合計金額
            - `auth_max_date`: 仮売上有効期限
            - `created`: 作成日時
            - `updated`: 更新日時
    Payment.ListRetrieving.Konbini.QueryParams:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス\
            指定したステータスの決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `UNPROCESSED`: 未処理
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち
            - `CAPTURED`: 売上確定
            - `CANCELED`: キャンセル
            - `EXPIRED`: 決済の期限切れ
        payment_term_from:
          type: string
          description: |
            支払い期限（始値）\
            支払い期限（`payment_term`）を対象に範囲検索を行います。この日付以降に支払い期限が到来する決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        payment_term_to:
          type: string
          description: |
            支払い期限（終値）\
            支払い期限（`payment_term`）を対象に範囲検索を行います。この日付以前に支払い期限が到来する決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        payment_date_from:
          type: string
          description: |
            支払い日時（始値）\
            支払い日時（`payment_date`）を対象に範囲検索を行います。この日付以降に支払いが行われた決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        payment_date_to:
          type: string
          description: |
            支払い日時（終値）\
            支払い日時（`payment_date`）を対象に範囲検索を行います。この日付以前に支払いが行われた決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        updated_from:
          type: string
          description: |
            更新日（始値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        updated_to:
          type: string
          description: |
            更新日（終値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            多重支払フラグ\
            同一のバーコードで複数回支払いが行われた決済を検索する場合`1`を指定します。
        cancel_overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            キャンセル後支払フラグ\
            キャンセルされた決済に対して支払いが行われた決済を検索する場合`1`を指定します。
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `status`: ステータス
            - `process_date`: 処理日時
            - `total_amount`: 合計金額
            - `payment_term`: 支払い期限
            - `payment_date`: 支払い日時
            - `created`: 作成日時
            - `updated`: 更新日時
    Payment.ListRetrieving.PayPay.QueryParams:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス\
            指定したステータスの決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `UNPROCESSED`: 未処理
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち
            - `AUTHORIZED`: 仮売上
            - `CAPTURED`: 売上確定
            - `CANCELED`: キャンセル
            - `EXPIRED`: 決済の期限切れ
        auth_max_date_from:
          type: string
          description: |
            仮売上有効期限（始値）\
            仮売上有効期限（`auth_max_date`）を対象に範囲検索を行います。この日付以降に仮売上が有効期限切れとなる決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        auth_max_date_to:
          type: string
          description: |
            仮売上有効期限（終値）\
            仮売上有効期限（`auth_max_date`）を対象に範囲検索を行います。この日付以前に仮売上が有効期限切れとなる決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        payment_date_from:
          type: string
          description: |
            支払い日時（始値）\
            支払い日時（`payment_date`）を対象に範囲検索を行います。この日付以降に支払いが行われた決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        payment_date_to:
          type: string
          description: |
            支払い日時（終値）\
            支払い日時（`payment_date`）を対象に範囲検索を行います。この日付以前に支払いが行われた決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        updated_from:
          type: string
          description: |
            更新日（始値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        updated_to:
          type: string
          description: |
            更新日（終値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `status`: ステータス
            - `process_date`: 処理日時
            - `total_amount`: 合計金額
            - `auth_max_date`: 仮売上有効期限
            - `payment_date`: 支払い日時
            - `created`: 作成日時
            - `updated`: 更新日時
    DirectDebitResultCode:
      type: string
      enum:
        - '0'
        - '1'
        - '2'
        - '3'
        - '4'
        - '7'
        - '8'
        - '9'
        - E
        - 'N'
      example: '0'
      minLength: 1
      maxLength: 1
      description: |
        振替結果コード

        - `0`: 振替成功
        - `1`: 残高不足による失敗
        - `2`: 預金取引なしによる失敗<br /><span class="smallText">存在しない口座に対して請求した場合などに発生します。</span>
        - `3`: 購入者事由による失敗
        - `4`: 依頼書未着・不備による失敗<br /><span class="smallText">口座振替依頼書が金融機関側で登録されていない場合に発生します。</span>
        - `7`: データエラーに起因する失敗<br /><span class="smallText">口座振替（1・5・20・26日）のみ。</span><br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>
        - `8`: ショップ事由による失敗<br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>
        - `9`: その他の失敗<br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>
        - `E`: データエラーに起因する失敗<br /><span class="smallText">口座振替（5・6・23・27日）のみ。</span><br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>
        - `N`: 振替結果未着<br /><span class="smallText">口座振替（5・6・23・27日）のみ。</span><br /><span class="smallText">通常は発生しません。発生し調査が必要な場合はfincodeにお問い合わせください。 </span>

        [お問い合わせはこちらへ](https://form.fincode.jp/contact)
    Payment.ListRetrieving.DirectDebit.QueryParams:
      type: object
      properties:
        target_date_from:
          type: string
          nullable: true
          description: |
            振替指定日（始値）\
            振替指定日（`target_date`）を対象に範囲検索を行います。この日付以降に振替指定日が設定されている決済情報を取得します。\
            \
            形式： `yyyy/MM/dd`
        target_date_to:
          type: string
          nullable: true
          description: |
            振替指定日（終値）\
            振替指定日（`target_date`）を対象に範囲検索を行います。この日付以前に振替指定日が設定されている決済情報を取得します。\
            \
            形式： `yyyy/MM/dd`
        withdrawal_date_from:
          type: string
          nullable: true
          description: |
            引き落とし日（始値）\
            引き落とし日（`withdrawal_date`）を対象に範囲検索を行います。この日付以降に引き落としが行われた決済情報を取得します。\
            \
            形式： `yyyy/MM/dd`
        withdrawal_date_to:
          type: string
          nullable: true
          description: |
            引き落とし日（終値）\
            引き落とし日（`withdrawal_date`）を対象に範囲検索を行います。この日付以前に引き落としが行われた決済情報を取得します。\
            \
            形式： `yyyy/MM/dd`
        result_code:
          allOf:
            - $ref: '#/components/schemas/DirectDebitResultCode'
          description: |
            振替結果コード\
            指定した振替結果の決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `0`: 振替成功
            - `1`: 残高不足（失敗）
            - `2`: 預金取引無し（失敗）
            - `3`: 購入者事由（失敗）
            - `4`: 依頼書未着・不備（失敗）
            - `7`: データエラー（失敗）<br /><span class="smallText">口座振替（1・5・20・26日）のみ。</span>
            - `8`: ショップ事由（失敗）
            - `9`: その他（失敗）
            - `E`: データエラー（失敗）<br /><span class="smallText">口座振替（5・6・23・27日）のみ。</span>
            - `N`: 振替結果未着（失敗）<br /><span class="smallText">口座振替（5・6・23・27日）のみ。</span>
        pay_pattern:
          type: string
          enum:
            - onetime
            - subscription
          description: |
            課金種別\
            指定した課金種別の決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `onetime`: サブスクリプションでない都度払い
            - `subscription`: サブスクリプション
        subscription_id:
          type: string
          description: |
            サブスクリプションID\
            サブスクリプションIDを指定して、指定したサブスクリプションによって作成された決済情報を取得します。
        updated_from:
          type: string
          description: |
            更新日（始値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        updated_to:
          type: string
          description: |
            更新日（終値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `status`: ステータス
            - `process_date`: 処理日時
            - `total_amount`: 合計金額
            - `target_date`: 振替指定日
            - `withdrawal_date`: 引き落とし日
            - `created`: 作成日時
            - `updated`: 更新日時
    Payment.ListRetrieving.VirtualAccount.QueryParams:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス\
            指定したステータスの決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `UNPROCESSED`: 未処理
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の振込待ち
            - `CAPTURED`: 売上確定
            - `CANCELED`: キャンセル
            - `EXPIRED`: 決済の期限切れ
        billing_total_amount_min:
          type: string
          minLength: 1
          maxLength: 10
          description: |
            振込依頼金額 合計（始値）\
            振込依頼金額 合計（`billing_total_amount`）を対象に範囲検索を行います。この値以上の合計 振込依頼金額を持つ決済情報を取得します。
        billing_total_amount_max:
          type: string
          minLength: 1
          maxLength: 10
          description: |
            振込依頼金額 合計（終値）\
            振込依頼金額 合計（`billing_total_amount`）を対象に範囲検索を行います。この値以下の合計 振込依頼金額を持つ決済情報を取得します。
        payment_term_from:
          type: string
          description: |
            支払い期限（始値）\
            支払い期限（`payment_term`）を対象に範囲検索を行います。この日付以降に支払い期限が到来する決済情報を取得します。\
            形式：`yyyy/MM/dd`
        payment_term_to:
          type: string
          description: |
            支払い期限（終値）\
            支払い期限（`payment_term`）を対象に範囲検索を行います。この日付以前に支払い期限が到来する決済情報を取得します。\
            形式：`yyyy/MM/dd`
        transaction_date_from:
          type: string
          description: |
            取引日（始値）\
            \
            取引日（`transaction_date`）を対象に範囲検索を行います。この日付以降に振込が行われた決済情報を取得します。\
            形式：`yyyy/MM/dd`
        transaction_date_to:
          type: string
          description: |
            取引日（終値）\
            \
            取引日（`transaction_date`）を対象に範囲検索を行います。この日付以前に振込が行われた決済情報を取得します。\
            形式：`yyyy/MM/dd`
        updated_from:
          type: string
          description: |
            更新日（始値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        updated_to:
          type: string
          description: |
            更新日（終値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            多重支払フラグ\
            同一のバーチャル口座に対して複数回支払いが行われた決済を検索する場合`1`を指定します。
        cancel_overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            キャンセル後支払フラグ\
            キャンセルされた決済に対して支払いが行われた決済を検索する場合`1`を指定します。
        expire_overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            期限切れ後支払フラグ\
            期限切れになった決済に対して支払いが行われた決済を検索する場合`1`を指定します。
        amount_pattern:
          type: string
          enum:
            - null
            - '1'
            - '2'
            - '3'
            - '4'
            - '5'
            - '6'
          description: |
            利用金額パターン

            - `null`: 全件取得
            - `1`: 振込依頼金額 合計 = 利用金額 合計 である決済を取得
            - `2`: 振込依頼金額 合計 != 利用金額 合計 である決済を取得
            - `3`: 振込依頼金額 合計 < 利用金額 合計 である決済を取得
            - `4`: 振込依頼金額 合計 <= 利用金額 合計 である決済を取得
            - `5`: 振込依頼金額 合計 > 利用金額 合計 である決済を取得
            - `6`: 振込依頼金額 合計 >= 利用金額 合計 である決済を取得
        bulk_payment_id:
          type: string
          description: |
            一括決済ID\
            指定した一括決済IDに紐づく決済情報を取得します。
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `status`: ステータス
            - `process_date`: 処理日時
            - `total_amount`: 合計金額
            - `payment_term`: 支払い期限
            - `payment_date`: 支払い日時
            - `created`: 作成日時
            - `updated`: 更新日時
    PaymentAmazonpayStatus:
      type: string
      enum:
        - UNPROCESSED
        - AWAITING_CUSTOMER_PAYMENT
        - AUTHORIZED
        - AWAITING_PAYMENT_APPROVAL
        - CAPTURED
        - AWAITING_CANCEL_APPROVAL
        - CANCELED
        - FAILED
      example: CAPTURED
      description: |
        決済ステータス（Amazon Pay）

        - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
        - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるAmazon Pay上での支払いの承認を待っている状態。</span>
        - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上としてAmazon Pay上での与信の確保が完了しており、売上確定により請求を完了できます。</span>
        - `AWAITING_PAYMENT_APPROVAL`: 売上確定処理待ち<br /><span class="smallText">Amazon Pay側で売上確定の処理が行われている状態。処理が完了すると`CAPTURED`へ遷移します。反映までに時間がかかる場合があります。</span>
        - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
        - `AWAITING_CANCEL_APPROVAL`: キャンセル処理待ち<br /><span class="smallText">売上確定後のキャンセル（返金）の処理がAmazon Pay側で行われている状態。処理が完了すると`CANCELED`へ遷移します。反映までに時間がかかる場合があります。</span>
        - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセル（売上確定後の場合は返金）されました。</span>
        - `FAILED`: 決済失敗<br /><span class="smallText">何らかの理由によりオーソリまたは売上確定に失敗しました。</span>
    Payment.ListRetrieving.Amazonpay.QueryParams:
      type: object
      properties:
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentAmazonpayStatus'
          description: |
            決済ステータス\
            指定したステータスの決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `UNPROCESSED`: 未処理
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち
            - `AUTHORIZED`: 仮売上
            - `AWAITING_PAYMENT_APPROVAL`: 売上確定処理待ち
            - `CAPTURED`: 売上確定
            - `AWAITING_CANCEL_APPROVAL`: キャンセル処理待ち
            - `CANCELED`: キャンセル
            - `FAILED`: 決済失敗
        keyword:
          type: string
          minLength: 1
          maxLength: 100
          description: |
            キーワード\
            加盟店自由項目1〜3を対象に部分一致で検索を行います。
        sales_limit_time_from:
          type: string
          description: |
            売上確定処理期限（始値）\
            売上確定処理期限（`sales_limit_time`）を対象に範囲検索を行います。この日付以降に期限を迎える決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        sales_limit_time_to:
          type: string
          description: |
            売上確定処理期限（終値）\
            売上確定処理期限（`sales_limit_time`）を対象に範囲検索を行います。この日付以前に期限を迎える決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        updated_from:
          type: string
          description: |
            更新日（始値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        updated_to:
          type: string
          description: |
            更新日（終値）\
            \
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            形式：`yyyy/MM/dd`、`yyyy/MM/dd HH:mm:ss`、`yyyy/MM/dd HH:mm:ss.SSS`
        pay_pattern:
          type: string
          enum:
            - onetime
            - subscription
            - bulk
          description: |
            課金種別\
            指定した課金種別の決済情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `onetime`: サブスクリプションでない都度払い
            - `subscription`: サブスクリプション
            - `bulk`: 一括決済
        subscription_id:
          type: string
          description: |
            サブスクリプションID\
            サブスクリプションIDを指定して、指定したサブスクリプションによって作成された決済情報を取得します。
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `status`: ステータス
            - `process_date`: 処理日時
            - `total_amount`: 合計金額
            - `sales_limit_time`: 売上確定処理期限
            - `created`: 作成日時
            - `updated`: 更新日時

            <span class="smallText">※ `sales_limit_time`を昇順で指定した場合、値が設定されていない決済情報は最後に並びます。</span>
    Shop_properties-id:
      type: string
      minLength: 13
      maxLength: 13
      example: s_***********
      description: |
        ショップID
    Payment:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        id:
          type: string
          nullable: false
          minLength: 1
          maxLength: 30
          example: o_**********************
          description: |
            オーダーID\
            決済情報のIDです。
        access_id:
          type: string
          nullable: false
          minLength: 24
          maxLength: 24
          example: a_**********************
          description: |
            取引ID
        amount:
          type: integer
          nullable: false
          example: 1000
          description: |
            利用金額
        tax:
          type: integer
          nullable: false
          example: 100
          description: |
            税送料
        total_amount:
          type: integer
          format: int64
          nullable: false
          example: 1100
          description: |
            合計金額\
            `amount`と`tax`の合計値です。
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        process_date:
          type: string
          example: 2022/01/01 12:34:56.789
          description: |
            決済 処理日時\
            決済の各種処理（決済実行、キャンセルなど）が行われた日時です。
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            この決済の請求先となる顧客情報のIDです。
        customer_group_id:
          type: string
          nullable: true
          minLength: 13
          maxLength: 13
          example: cg_**********
          description: |
            顧客情報共有グループID\
            プラットフォームショップにおいて顧客情報が共有されている場合、顧客が所属する共有グループのIDです。
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        bill_id:
          type: string
          description: |
            請求ID
          minLength: 1
          maxLength: 30
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
      x-req-properties:
        amount:
          type: string
          nullable: false
          minLength: 1
          example: '1000'
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照例： [カード決済 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/restriction)
        tax:
          type: string
          nullable: false
          minLength: 1
          example: '100'
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照例： [カード決済 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/restriction)
        paypay:
          order_description:
            type: string
            nullable: true
            maxLength: 100
            example: ○○の購入
            description: |
              注文内容の説明文\
              購入者のPayPayアプリ上で注文内容として決済時に表示される説明文です。
        directdebit:
          remarks:
            type: string
            nullable: true
            maxLength: 9
            description: |
              利用明細表示内容\
              半角英数カナ記号、全角英数カナ記号、一部の記号、半角全角スペースが指定可能。\
              使用可能な記号：`.`, `(`, `)`, `–`, `．`,`（`, `）`, `ー`\
              デフォルト：ショップ名カナの先頭9文字\
    CardPayMethod:
      type: string
      enum:
        - '1'
        - '2'
        - '5'
      example: '1'
      description: |
        支払方法

        - `1`: 一括払い
        - `2`: 分割払い
        - `5`: リボ払い
    CardPayTimesResponse:
      type: integer
      format: int64
      example: 3
      enum:
        - 3
        - 5
        - 6
        - 10
        - 12
        - 15
        - 18
        - 20
        - 24
      description: |
        （分割払いの場合）支払回数  
    PaymentBulk_properties-id:
      type: string
      minLength: 25
      maxLength: 25
      description: |
        一括決済ID
    Subscription_properties-id:
      type: string
      example: su_*********************
      minLength: 1
      maxLength: 25
      description: |
        サブスクリプションID
    x-req-properties-return_url:
      type: string
      example: https://your-server.example.com/3ds2-return/success
      maxLength: 256
      nullable: true
      description: |
        加盟店戻りURL（成功時）  
        購入者のブラウザとfincode間で3Dセキュア認証を自動で行う場合に、
        3Dセキュア認証処理後、決済に成功した際にリダイレクトされるURLです。  
        POSTメソッドでリダイレクトされます。

        リクエストで指定しない場合はデフォルトの成功ページのURLが設定されます。  
        また、`tds2_ret_url`を指定していない場合のみ返却されます。  
    x-req-properties-return_url_on_failure:
      type: string
      example: https://your-server.example.com/3ds2-return/failure
      maxLength: 256
      nullable: true
      description: |
        加盟店戻りURL（失敗時）  
        購入者のブラウザとfincode間で3Dセキュア認証を自動で行う場合に、
        3Dセキュア認証に失敗、または決済に失敗した際にリダイレクトされるURLです。  
        POSTメソッドでリダイレクトされます。

        リクエストで指定しない場合はデフォルトの失敗ページのURLが設定されます。  
        また、`tds2_ret_url`を指定していない場合のみ返却されます。  
    Payment.Card:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Card`: カード
        job_code:
          type: string
          enum:
            - CHECK
            - AUTH
            - CAPTURE
            - CANCEL
          example: CAPTURE
          description: |
            取引種別

            - `CHECK`：有効性チェックのみ行う
            - `AUTH`：仮売上
            - `CAPTURE`：即時売上
            - `CANCEL`：キャンセル
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `CHECKED`: 有効性チェック済み<br /><span class="smallText">カードの有効性チェックが完了しています。</span>
            - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）<br /><span class="smallText">3Dセキュア認証を使用する決済を実行した直後の状態です。認証後決済実行を行うまで請求や仮売上はされません。</span>
        card_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-id'
          description: |
            カードID\
            この決済に使用されたカード情報のIDです。
        brand:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardBrand'
        card_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/card_no'
        expire:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/expire'
        holder_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/holder_name'
        card_no_hash:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/card_no_hash'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimesResponse'
        bulk_payment_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
          description: |
            一括決済ID\
            この決済情報が一括決済機能を用いて登録されたものである場合、このフィールドに一括決済IDが設定されます。
        subscription_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
          description: |
            サブスクリプションID\
            この決済情報がサブスクリプションにより生成されたものである場合、このフィールドにサブスクリプションIDが設定されます。
        tds_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds_type'
        tds2_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_type'
        tds2_ret_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ret_url'
        return_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-return_url'
        return_url_on_failure:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-return_url_on_failure'
        tds2_status:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ThreeDSecure2Status'
        merchant_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/td_tenant_name'
        forward:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: '12345'
          description: |
            仕向け先
        issuer:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: 1a34567
          description: |
            イシュア
        transaction_id:
          type: string
          nullable: true
          minLength: 28
          maxLength: 28
          example: null
          description: |
            トランザクションID
        approve:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: null
          description: |
            承認番号
        auth_max_date:
          type: string
          nullable: true
          example: 2022/05/16 23:59:59.999
          description: |
            仮売上有効期限\
            `job_code`に`AUTH（仮売上）`を指定した場合値が設定されます。
        item_code:
          type: string
          nullable: true
          minLength: 7
          maxLength: 7
          description: |
            商品コード
        send_url:
          type: string
          nullable: true
          example: null
          deprecated: true
          description: |
            ※ 閉塞機能
        acs:
          type: string
          nullable: true
          minLength: 1
          maxLength: 1
          example: null
          deprecated: true
          description: |
            ※ 閉塞機能
    Payment.Card.list:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Payment'
              - $ref: '#/components/schemas/Payment.Card'
    Payment.Card.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Payment.Card.list'
    Payment.ApplePay:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Applepay`: Apple Pay
        job_code:
          type: string
          enum:
            - AUTH
            - CAPTURE
            - CANCEL
          example: CAPTURE
          description: |
            取引種別

            - `AUTH`：仮売上
            - `CAPTURE`：即時売上
            - `CANCEL`：キャンセル
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
        brand:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardBrand'
        card_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/card_no'
          description: |
            マスク済みカード番号。\
            <span class="smallText">
            下4桁以外をマスクしたカード番号です。\
            Apple Payでは実際のカード番号ではなくデバイスアカウント番号と呼ばれる番号で決済が行われるため、このフィールドで返される値はデバイスアカウント番号をマスクしたものになります。\
            </span>
            形式：`************1234`
        expire:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/expire'
        holder_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/holder_name'
        card_no_hash:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/card_no_hash'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimesResponse'
        forward:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: '12345'
          description: |
            仕向け先
        issuer:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: 1a34567
          description: |
            イシュア
        transaction_id:
          type: string
          nullable: true
          minLength: 28
          maxLength: 28
          example: null
          description: |
            トランザクションID
        approve:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: null
          description: |
            承認番号
        auth_max_date:
          type: string
          nullable: true
          example: 2022/05/16 23:59:59.999
          description: |
            仮売上有効期限\
            `job_code`に`AUTH（仮売上）`を指定した場合値が設定されます。
        item_code:
          type: string
          minLength: 7
          maxLength: 7
          nullable: true
          example: '0000990'
          description: |
            商品コード
        send_url:
          type: string
          nullable: true
          example: null
          description: |
            ※ 閉塞機能
      x-req-properties:
        token:
          type: string
          example: eyJoZWFkZXIiOnsiZXBoZW1lcmFsUHVibGljS2V5IjoidGVzdFB1YmxpY0tleSIsInB1YmxpY0tleUhhc2giOiJ0ZXN0S2V5SGFzaCIsInRyYW5zYWN0aW9uSWQiOiJ0ZXN0VHJhbnNhY3Rpb24ifSwiZGF0YSI6ImV5SmhjSEJzYVdOaGRHbHZibEJ5YVcxaGNubEJZMk52ZFc1MFRuVnRZbVZ5SWpvaU5ERXhNVEV4TVRFeE1URXhNVEV4TVNJc0ltRndjR3hwWTJGMGFXOXVSWGh3YVhKaGRHbHZia1JoZEdVaU9pSXlOakV5TXpFaUxDSmpkWEp5Wlc1amVVTnZaR1VpT2lJek9USWlMQ0owY21GdWMyRmpkR2x2YmtGdGIzVnVkQ0k2SWpFeE1URWlMQ0pqWVhKa2FHOXNaR1Z5VG1GdFpTSTZJaUlzSW1SbGRtbGpaVTFoYm5WbVlXTjBkWEpsY2tsa1pXNTBhV1pwWlhJaU9pSWlMQ0p3WVhsdFpXNTBSR0YwWVZSNWNHVWlPaUl6UkZObFkzVnlaU0lzSW5CaGVXMWxiblJFWVhSaElqcDdJbTl1YkdsdVpWQmhlVzFsYm5SRGNubHdkRzluY21GdElqb2lSSFZ0YlhsRFFWWldRVUZCUVVGQlFVRkJRVUZCUVVGQlFVRkJRU0lzSW1WamFVbHVaR2xqWVhSdmNpSTZJalVpZlgwPSIsInNpZ25hdHVyZSI6InRlc3RTaWduYXR1cmUiLCJ2ZXJzaW9uIjoiTW9jayJ9
          description: |
            Apple Pay カードトークン\
            Apple Payが利用可能なデバイスから取得したトークンをBase64エンコードした値を設定します。\
            \
            トークンの取得方法
            - Swift： `PKPayment.token.paymentData`の値をBase64エンコード
            - JavaScript： `ApplePayPaymentAuthorizedEvent.payment.token`の値をBase64エンコード

            詳細は[Docs > 決済処理を実行する（Apple Pay）](https://docs.fincode.jp/payment/applepay/execution)または[Offering Apple Pay in Your App](https://developer.apple.com/documentation/passkit_apple_pay_and_wallet/apple_pay/offering_apple_pay_in_your_app)（Apple公式）を参照できます。
    Payment.ApplePay.list:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Payment'
              - $ref: '#/components/schemas/Payment.ApplePay'
    Payment.ApplePay.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Payment.ApplePay.list'
    GooglePayCardBrand:
      type: string
      maxLength: 50
      enum:
        - VISA
        - MASTER
        - JCB
        - AMEX
        - DINERS
        - ''
      description: |
        カードブランドを表します。

        - `VISA`: VISA
        - `MASTER`: Mastercard
        - `JCB`: JCB
        - `AMEX`: American Express
        - `DINERS`: Diners Club
        - `""`（空文字列） : 判定不能
    Payment.GooglePay:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        job_code:
          type: string
          enum:
            - AUTH
            - CAPTURE
            - CANCEL
          example: CAPTURE
          description: |
            取引種別

            - `AUTH`：仮売上
            - `CAPTURE`：即時売上
            - `CANCEL`：キャンセル
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）<br /><span class="smallText">3Dセキュア認証を使用する決済を実行した直後の状態です。認証後決済実行を行うまで請求や仮売上はされません。</span>
        brand:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/GooglePayCardBrand'
        card_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/card_no'
          description: |
            マスク済みカード番号。\
            <span class="smallText">
            下4桁以外をマスクしたカード番号です。\
            </span>
            形式：`************1234`
        expire:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/expire'
        card_no_hash:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/card_no_hash'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimesResponse'
        tds_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds_type'
        tds2_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_type'
        tds2_ret_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ret_url'
        tds2_status:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ThreeDSecure2Status'
        merchant_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/td_tenant_name'
        forward:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: '12345'
          description: |
            仕向け先
        issuer:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: 1a34567
          description: |
            イシュア
        transaction_id:
          type: string
          nullable: true
          minLength: 28
          maxLength: 28
          example: null
          description: |
            トランザクションID
        approve:
          type: string
          nullable: true
          minLength: 1
          maxLength: 7
          example: null
          description: |
            承認番号
        auth_max_date:
          type: string
          nullable: true
          example: 2022/05/16 23:59:59.999
          description: |
            仮売上有効期限\
            `job_code`に`AUTH（仮売上）`を指定した場合値が設定されます。
        acs:
          type: string
          nullable: true
          minLength: 1
          maxLength: 1
          example: null
          deprecated: true
        item_code:
          type: string
          nullable: true
          minLength: 7
          maxLength: 7
          description: |
            商品コード
        return_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-return_url'
        return_url_on_failure:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-return_url_on_failure'
      x-req-properties:
        token:
          type: string
          example: eyJ2ZXJzaW9uIjoiR21vTW9jayIsInByb3RvY29sVmVyc2lvbiI6IkVDdjIiLCJzaWduYXR1cmUiOiJNRVFDSUR4Qm9VQ29GUkdSZUxkWi9jQUJsU1NSSUtvT0VGb1UzZTI3YzE0dk1adGZBaUJ0WDNwR01FcG53Nm1TQWJuYWdDQ2dIbENrM05jRndXWUV5eElFNktHWlZBdTAwM2R1MDAzZCIsInNpZ25lZE1lc3NhZ2UiOiJ7XCJlbmNyeXB0ZWRNZXNzYWdlXCI6XCJleUpuWVhSbGQyRjVUV1Z5WTJoaGJuUkpaQ0k2SUNKemIyMWxMVzFsY21Ob1lXNTBMV2xrSWl3aWJXVnpjMkZuWlVWNGNHbHlZWFJwYjI0aU9pQWlNalUxTmpFeE1UVTVPVEF3TUNJc0ltMWxjM05oWjJWSlpDSTZJQ0pCU0RKRmFuUmpPRGhhU0VvdE1tRlpRbEZYZWtoM2RuQTJiREJLYzBOSVozaFdkRGh6T1RGQkxWcFZhV3RoV0U1aVkycHpSbTAyWjJjNVJYaGxWbEl0YW5wSmVWUXRiVXAyUVY5dWRIWm1Vbk5FUkU5SU1tcHVTMDFxWkZSMFdFbEtkbEIwTUU1Q1ZWVTBOVkkzTFdkdWFuaHJlQzF6U1RCc1pHTlhkbUpFU0hOV01EY3pOWGxHUkdKWGF5SXNJbkJoZVcxbGJuUk5aWFJvYjJRaU9pQWlRMEZTUkNJc0luQmhlVzFsYm5STlpYUm9iMlJFWlhSaGFXeHpJam9nZXlKbGVIQnBjbUYwYVc5dVdXVmhjaUk2SURJd05UQXNJbVY0Y0dseVlYUnBiMjVOYjI1MGFDSTZJREV5TENKd1lXNGlPaUFpTkRFd01EQXdNREF3TURBd01ERXdNQ0lzSW1GMWRHaE5aWFJvYjJRaU9pQWlVRUZPWDA5T1RGa2lmWDA9XCIsXCJlcGhlbWVyYWxQdWJsaWNLZXlcIjpcIkJHTXhlc256S0NWRFlTWTdpNk5sWHJyeDNDRTFvRERUTElhOGx2QUFpZkxnZ2s0WW92bHV5SXZWNlh4VVllTTI1VzRqeWFKaWtNcVF3MGh3ZDVCVEw4OD1cIixcInRhZ1wiOlwiWlZ3bEp0N2RVOFBsazArcjhyUEY4RG1QVHZEaU9BMVVBb05qRFYrU3FERXUwMDNkXCJ9In0=
          description: |
            Google Pay カードトークン\
            Google Payを利用するデバイスから取得したトークン（`paymentMethodData.tokenizationData.token`）をBase64エンコードした値を設定します。  

            トークン生成時、`tokenizationSpecification`には以下の値を指定してください。
            - gateway： `fincode`
            - gatewayMerchantId： `{{ショップID}}`<br>（例：s_01234567890）

            詳細は[Docs > 決済処理を実行する（Google Pay）](/payment/googlepay/execution)または[Google Pay ウェブ デベロッパー向けドキュメント](https://developers.google.com/pay/api/web?hl=ja)（Google公式）を参照してください。
    Payment.GooglePay.list:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Payment'
              - $ref: '#/components/schemas/Payment.GooglePay'
    Payment.GooglePay.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Payment.GooglePay.list'
    KonbiniCode:
      type: string
      enum:
        - '00010'
        - '00020'
        - '00030'
        - '00080'
        - '00760'
      minLength: 5
      maxLength: 5
      description: |
        コンビニ事業者コード\
        購入者が払い込みを行ったコンビニ事業者をあらわすコード。

        - `00010`: セブン-イレブン
        - `00020`: ローソン
        - `00030`: ファミリーマート
        - `00080`: ミニストップ
        - `00760`: セイコーマート
    device_name:
      type: string
      minLength: 1
      maxLength: 20
      example: iPhone
      description: |
        デバイス名\
        バーコード表示を行うデバイスの名前を指定します。

        - Androidの場合： [ユーザーエージェントクライアントヒントAPI](https://developer.mozilla.org/ja/docs/Web/API/User-Agent_Client_Hints_API)またはNavigator: userAgentプロパティ（非推奨）で取得できる文字列から取得したデバイス名を指定します。
        - iPhoneの場合： 固定文字列`iPhone`を指定します。
    win_width:
      type: string
      minLength: 1
      maxLength: 5
      example: '375'
      description: |
        デバイス画面幅\
        バーコード表示を行うデバイスの画面幅を指定します。

        - Androidの場合： `window.screen.width`で取得した値に `pixel_ratio`（ピクセル比）の値を乗じたものを指定します。
        - iPhoneの場合： `window.screen.width`で取得した値を指定します。
    win_height:
      type: string
      minLength: 1
      maxLength: 5
      example: '812'
      description: |
        デバイス画面の高さ\
        バーコード表示を行うデバイス画面の高さを指定します。

        - Androidの場合： `window.screen.height`で取得した値に `pixel_ratio`（ピクセル比）の値を乗じたものを指定します。
        - iPhoneの場合： `window.screen.height`で取得した値を指定します。
    KonbiniPaymentProcessResult:
      type: string
      enum:
        - '000'
        - '001'
        - '002'
        - '003'
        - '004'
        - '005'
        - '006'
        - '007'
        - '008'
        - '009'
        - '010'
        - '011'
        - '012'
        - '013'
        - '900'
      minLength: 3
      maxLength: 3
      description: |
        コンビニ事業者の決済処理結果コード

        - `000`: 正常終了
        - `001`: 認証失敗
        - `002`: 注文登録には成功したものの端末情報が確認できなかったためバーコード画像の発行なし
        - `003`: 必須項目の不備によるエラー
        - `004`: バーコードデータ内の識別子が不正
        - `005`: バーコードデータ内のメーカーコードが不正
        - `006`: バーコードデータ内の企業識別コードが不正
        - `007`: 支払い期限日時を超過している、または形式が不正
        - `008`: 支払い金額が上限もしくは下限を超えている
        - `009`: 全体チェックデジットが不正
        - `010`: その他の理由によりバーコード画像の発行に失敗
        - `011`: 印紙フラグ（内部データ）不正
        - `012`: 端末情報の指定値の桁数不正
        - `013`: 既に同一のバーコードが登録済み
        - `900`: 予期せぬエラー
    Payment.Konbini:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Konbini`: コンビニ決済
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるコンビニ店頭レジでの払い込みを待っている状態。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
        payment_term_day:
          type: integer
          format: int64
          default: 2
          nullable: true
          example: 2
          description: |
            支払い期限日数
        payment_term:
          type: string
          nullable: true
          description: |
            支払い期限日時\
            コンビニ決済の支払い期限日時です。\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        payment_date:
          type: string
          nullable: true
          description: |
            支払日時\
            コンビニ店頭で購入者が支払いを行った日時です。\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        barcode:
          type: string
          nullable: true
          description: |
            バーコード画像 Base64エンコード済み画像データ\
            コンビニ店頭での支払いに使用するバーコード画像のBase64エンコード済みデータです。このデータをデコードして表示します。\
            バーコード画像はレギュレーションに従って表示する必要があります。詳細は[Docs > レギュレーションと注意事項](https://docs.fincode.jp/payment/konbini/note)から参照できます。
        barcode_format:
          type: string
          nullable: true
          enum:
            - jpg
            - png
            - bmp
          description: |
            バーコード画像 フォーマット\
            発行されたバーコード画像（`barcode`）のフォーマットです。
        barcode_width:
          type: string
          nullable: true
          minLength: 1
          maxLength: 9
          description: |
            バーコード画像 横幅（px）\
            発行されたバーコード画像（`barcode`）の横幅です。
        barcode_height:
          type: string
          nullable: true
          minLength: 1
          maxLength: 9
          description: |
            バーコード画像 縦幅（px）\
            発行されたバーコード画像（`barcode`）の縦幅です。
        overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            多重支払フラグ\
            この決済に対して複数回支払いが行われた場合`1`になります。

            - `0`: 0回、または1回の支払いが行われた
            - `1`: 2回以上、同一のバーコードを用いて支払いが行われた
        cancel_overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            キャンセル後支払フラグ\
            この決済をキャンセルした後に購入者がバーコードを用いて支払いを行った場合`1`になります。

            - `0`: キャンセル後支払は行われていない
            - `1`: キャンセル後、購入者による支払いが行われた
        konbini_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/KonbiniCode'
        konbini_store_code:
          nullable: true
          minLength: 1
          maxLength: 8
          description: |
            コンビニ店舗コード\
            コンビニ事業者ごとに独自体系の店舗コードです。
        device_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/device_name'
        os_version:
          nullable: true
          minLength: 1
          maxLength: 10
          description: |
            OSバージョン
        win_width:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/win_width'
        win_height:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/win_height'
        xdpi:
          nullable: true
          minLength: 1
          maxLength: 6
          description: |
            画面横幅のDPI
        ydpi:
          nullable: true
          minLength: 1
          maxLength: 6
          description: |
            画面縦幅のDPI
        result:
          allOf:
            - $ref: '#/components/schemas/KonbiniPaymentProcessResult'
        order_serial:
          type: string
          nullable: true
          minLength: 1
          maxLength: 18
          description: |
            注文管理ID
        invoice_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 20
          description: |
            請求ID
      x-req-properties:
        payment_term_day:
          type: string
          nullable: false
          minLength: 1
          maxLength: 2
          example: '2'
          description: |
            支払い期限日数\
            この決済の支払い期限日数です。`0`日から`14`日まで指定できます。

            - `0`を指定すると決済を作成した当日に限り支払いが可能な決済が作成されます。
            - デフォルト：`2`
    Payment.Konbini.list:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Payment'
              - $ref: '#/components/schemas/Payment.Konbini'
    Payment.Konbini.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Payment.Konbini.list'
    Payment.PayPay:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Paypay`: PayPay
        job_code:
          type: string
          enum:
            - AUTH
            - CAPTURE
            - CANCEL
          example: CAPTURE
          description: |
            取引種別

            - `AUTH`：仮売上
            - `CAPTURE`：即時売上
            - `CANCEL`：キャンセル
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるPayPay上での取引承認を待っている状態。</span>
            - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上としてPayPay残高の確保が完了しており、売上確定により請求を完了できます。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
        code_url:
          type: string
          nullable: true
          minLength: 1
          maxLength: 256
          example: https://www.paypay.example.com/app/cashier?code=https%3A%2F%2Fqr.paypay.example.com%2F0123456789abcdefghijklm
          description: |
            PayPay支払いURL\
            購入者をこのURLにリダイレクトすることでPayPay上での取引を開始します。
        code_expiry_date:
          type: string
          nullable: true
          example: 2022/05/16 12:34:56.999
          description: |
            支払期限\
            形式： `yyyy/MM/dd HH:mm:ss.SSS`
        redirect_url:
          type: string
          nullable: true
          minLength: 1
          maxLength: 256
          example: https://your-service.example.com/on-payment-complete
          description: |
            リダイレクトURL\
            決済が完了した際のPayPayからのリダイレクト先URL。
        redirect_type:
          type: string
          nullable: true
          enum:
            - '1'
            - '2'
          example: '1'
          description: |
            リダイレクト先種別\
            `redirect_url`の種別

            - `1`： Webページ／Webアプリケーション
            - `2`： ネイティブアプリ
        auth_max_date:
          type: string
          nullable: true
          example: 2022/05/16
          description: |
            仮売上期限\
            形式： `yyyy/MM/dd`
        order_description:
          type: string
          nullable: true
          maxLength: 100
          example: ○○の購入
          description: |
            注文内容の説明\
            購入者のPayPayアプリ上で表示される注文内容の説明。
        capture_description:
          type: string
          nullable: true
          maxLength: 100
          example: ○○の発送完了
          description: |
            売上確定の説明\
            購入者のPayPayアプリ上で表示される売上確定の説明。
        update_description:
          type: string
          nullable: true
          maxLength: 100
          example: ○○の変更の適用
          description: |
            金額変更の説明\
            購入者のPayPayアプリ上で表示される金額変更の説明。
        cancel_description:
          type: string
          nullable: true
          maxLength: 100
          example: ○○の購入キャンセル
          description: |
            キャンセルの説明\
            購入者のPayPayアプリ上で表示されるキャンセルの説明。
        store_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 18
          example: '123456'
          description: |
            店舗ID\
            PayPayによって発行された店舗ID。
        code_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          example: '123456'
          description: |
            PayPayの支払いコードID
        payment_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          description: |
            PayPay 決済ID
        paypay_result_code:
          type: string
          nullable: true
          minLength: 1
          maxLength: 256
          description: |
            PayPay処理結果コード
        merchant_payment_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          description: |
            PayPay トランザクションID
        merchant_capture_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          description: |
            PayPay 売上確定ID
        merchant_update_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          description: |
            PayPay 金額変更ID
        merchant_revert_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          description: |
            PayPay キャンセルID
        merchant_refund_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          description: |
            PayPay 返金ID
        payment_date:
          type: string
          nullable: true
          example: 2022/05/16 12:34:56.999
          description: |
            支払日時\
            形式： `yyyy/MM/dd HH:mm:ss.SSS`
        paypay_method:
          type: string
          nullable: true
          enum:
            - CONTINUOUS
          example: CONTINUOUS
          description: |
            決済方式\
            PayPayの決済方式。ウェブペイメントによる決済の場合は `null` が設定されます。

            - `CONTINUOUS`：継続課金
        payment_method_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 25
          example: pm_*********************
          description: |
            決済手段ID\
            継続課金の決済に使用したPayPayアカウント（決済手段）のID。それ以外の決済では `null` が設定されます。
        subscription_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
          description: |
            サブスクリプションID\
            この決済情報がサブスクリプションにより生成されたものである場合、このフィールドにサブスクリプションIDが設定されます。
      x-req-properties:
        expiry_date:
          type: string
          nullable: true
          example: 2022/05/16 23:59:59
          description: |
            支払期限\
            支払依頼リクエストAPIで、購入者が支払いを行える期限を指定します。\
            形式： `yyyy/MM/dd HH:mm:ss`\
            \
            指定しなかった場合、支払期限はPayPayの既定値（支払依頼から6時間）となります。\
            指定できる範囲はPayPayの仕様に従います（現在時刻から10分より後、48時間より前）。範囲外の日時を指定した場合はエラーとなります。
        user_agent:
          type: string
          minLength: 1
          maxLength: 256
          example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3
          description: |
            ユーザーエージェント\
            リクエストを送信したユーザーエージェントの情報。`redirect_type`が`1`（Webページ／Webアプリケーション）の場合指定できます。
    Payment.PayPay.list:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Payment'
              - $ref: '#/components/schemas/Payment.PayPay'
    Payment.PayPay.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Payment.PayPay.list'
    Payment.DirectDebit:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Directdebit`: 口座振替
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">振替はまだ実行されていません。</span>
            - `AWAITING_PAYMENT_APPROVAL`: 決済処理待ち<br /><span class="smallText">fincodeおよび金融機関による振替処理を待っています。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">振替が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この振替はキャンセルされました。</span>
            - `FAILED`: 請求失敗<br /><span class="smallText">何らかの理由により振替に失敗しました。</span>
        result_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/DirectDebitResultCode'
        target_date:
          type: string
          nullable: true
          example: 2022/05/06
          description: |
            振替指定日\
            振替を行う日を指定します。\
            実際の振替は営業日に行われるため、必ずしも指定した日付に引き落としが行われるとは限りません。\
            指定可能な日付及び引き落とし日は[Docs > 口座振替年間スケジュール](https://docs.fincode.jp/payment/directdebit/schedule)の「振替指定日」及び「振替日」の列で確認できます。
        withdrawal_date:
          type: string
          nullable: true
          example: 2022/05/06
          description: |
            引き落とし日\
            実際に購入者の口座から引き落としが行われた実績日です。\
            \
            形式： `yyyy/MM/dd`
        request_accept_end_date:
          type: string
          nullable: true
          example: 2022/04/25
          description: |
            請求依頼受付期間 終了日\
            振替依頼を受け付ける最終日。この日付の23:59までに振替依頼（決済実行）を受け付けます。\
            \
            形式： `yyyy/MM/dd`\
            詳細は[Docs > 口座振替年間スケジュール](https://docs.fincode.jp/payment/directdebit/schedule)の「請求依頼受付期間終了日」の列で確認できます。
        transfer_return_date:
          type: string
          nullable: true
          example: 2022/05/11
          description: |
            請求結果反映 予定日\
            \
            形式： `yyyy/MM/dd`\
            詳細は[Docs > 口座振替年間スケジュール](https://docs.fincode.jp/payment/directdebit/schedule)の「振替結果返却日」の列で確認できます。
        payment_method_id:
          type: string
          nullable: true
          minLength: 25
          maxLength: 25
          description: |
            決済手段ID\
            この決済に使用された決済手段のIDです。
        bank_code:
          type: string
          nullable: true
          minLength: 4
          maxLength: 4
          example: '0310'
          description: |
            金融機関コード\
            fincodeの口座振替に対応している金融機関のコードのリストは[Docs > 利用可能な金融機関（口座振替）](https://docs.fincode.jp/payment/directdebit/restriction)で参照できます。
        bank_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 45
          example: ''
          description: |
            金融機関名
        branch_code:
          type: string
          nullable: true
          minLength: 3
          maxLength: 3
          example: '101'
          description: |
            支店コード
        branch_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 45
          description: |
            支店名
        remarks:
          type: string
          nullable: true
          minLength: 1
          maxLength: 9
          example: フィンコードショッ
          description: |
            ご利用明細表示内容

            - フォーマット：半角英数カナ／全角英数カナ／一部の記号／半角全角スペース
            - デフォルト： `ショップ名カナの先頭9文字`

            ※ 利用可能な記号

            - 半角：`.`、`(`、`)`、`–`
            - 全角：`．`、`（`、`）`、`ー`
        subscription_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
          description: |
            サブスクリプションID\
            この決済情報がブスクリプションにより生成されたものである場合、このフィールドにサブスクリプションIDが設定されます。
        settlement_route:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/DirectDebitSettlementRoute'
    Payment.DirectDebit.list:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Payment'
              - $ref: '#/components/schemas/Payment.DirectDebit'
              - type: object
                properties:
                  invoice_id:
                    type: string
                    nullable: true
                    minLength: 1
                    maxLength: 30
                    description: |
                      紐づくインボイスID\
                      この決済に後付けで紐付けられたインボイスがある場合、そのインボイスIDが設定されます。
    Payment.DirectDebit.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Payment.DirectDebit.list'
    Payment.VirtualAccount:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Virtualaccount`: 銀行振込（バーチャル口座）
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるバーチャル口座への振込を待っている状態。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">振込が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
        billing_amount:
          type: integer
          format: int64
          minLength: 1
          maxLength: 10
          example: 1000
          description: |
            振込依頼金額
        billing_tax:
          type: integer
          format: int64
          nullable: true
          minLength: 1
          maxLength: 10
          example: 100
          description: |
            振込依頼金額（税送料）
        billing_total_amount:
          type: integer
          format: int64
          minLength: 1
          maxLength: 10
          example: 1100
          description: |
            振込依頼金額 合計\
            振込依頼金額と振込依頼金額（税送料）の合計金額です。
        payment_term_day:
          type: integer
          format: int64
          minLength: 1
          maxLength: 2
          example: 3
          description: |
            支払期限日数\
            \
            実行日から見て、支払期限日数後の翌日AMに期限切れになります。\
            例）2024/4/1に、`支払期限日数=2`で決済実行した場合、2024/4/4 AMに期限切れ
        payment_term:
          type: string
          nullable: true
          example: 2022/05/16 23:59:59.999
          description: |
            支払期限\
            形式： `yyyy/MM/dd HH:mm:ss.SSS`
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
        va_branch_code:
          type: string
          nullable: true
          minLength: 1
          maxLength: 3
          example: '502'
          description: |
            支店コード\
            \
            発行されたバーチャル口座の支店コードです。
        va_branch_name:
          type: string
          nullable: true
          maxLength: 15
          example: アジサイ
          description: |
            支店名\
            \
            発行されたバーチャル口座の支店名です。
        va_account_number:
          type: string
          nullable: true
          minLength: 7
          maxLength: 7
          example: '1234567'
          description: |
            口座番号\
            \
            発行されたバーチャル口座の口座番号です。
        va_account_name:
          type: string
          nullable: true
          maxLength: 40
          example: ジーエムオーイプシロン（カ
          description: |
            口座名義\
            \
            発行されたバーチャル口座の口座名義です。
        virtual_account_id:
          type: string
          nullable: true
          minLength: 10
          maxLength: 10
          example: '1234567890'
          description: |
            バーチャル口座ID\
            \
            発行されたバーチャル口座のIDです。
        account_assignment_date:
          type: string
          nullable: true
          example: 2022/05/16 12:34:56.999
          description: |
            バーチャル口座 割当日時\
            形式： `yyyy/MM/dd HH:mm:ss.SSS`
        transaction_date:
          type: string
          nullable: false
          example: 2022/05/16
          description: |
            取引日\
            \
            形式： `yyyy/MM/dd`
        value_date:
          type: string
          nullable: true
          example: 2022/05/16
          description: |
            起算日\
            \
            銀行で入金が処理された営業日\
            形式： `yyyy/MM/dd`
        remitter_account_name:
          type: string
          nullable: true
          maxLength: 48
          example: ヤマダ　タロウ
          description: |
            振込依頼人 氏名\
            \
            振込依頼人（購入者）の氏名です。
        remitter_bank_name:
          type: string
          nullable: true
          maxLength: 30
          example: イロハギンコウ
          description: |
            振込依頼人 銀行名\
            \
            振込依頼人（購入者）の銀行名です。
        remitter_branch_name:
          type: string
          nullable: true
          maxLength: 15
          example: ホンテン
          description: |
            振込依頼人 支店名\
            \
            振込依頼人（購入者）の支店名です。
        overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            多重支払フラグ\
            この決済に対して複数回支払いが行われた場合`1`になります。

            - `0`: 0回、または1回の支払いが行われた
            - `1`: 2回以上、同一のバーチャル口座に対して支払いが行われた
        cancel_overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            キャンセル後支払フラグ\
            この決済をキャンセルした後に購入者がバーチャル口座に対して支払いを行った場合`1`になります。

            - `0`: キャンセル後支払は行われていない
            - `1`: キャンセル後支払が行われた
        expire_overpayment_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            期限切れ後支払フラグ\
            この決済の支払期限が過ぎた後に購入者がバーチャル口座に対して支払いを行った場合`1`になります。

            - `0`: 期限切れ後支払は行われていない
            - `1`: 期限切れ後支払が行われた
        use_exact_deposit_amount:
          type: boolean
          enum:
            - true
            - false
          description: |
            入金可能額設定利用フラグ\
            この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを示すフラグです。
            設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

            - `true`: 入金可能額を設定する
            - `false`: 入金可能額を設定しない（デフォルト）
        use_static_virtual_account:
          type: boolean
          enum:
            - true
            - false
          description: |
            顧客固定バーチャル口座利用フラグ\
            この決済において顧客固定バーチャル口座が利用されているかどうかを示すフラグです。

            - `true`: 顧客固定バーチャル口座を利用している
            - `false`: 顧客固定バーチャル口座を利用していない
        bulk_payment_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
          description: |
            一括決済ID\
            この決済情報が一括決済機能を用いて登録されたものである場合、このフィールドに一括決済IDが設定されます。
      x-req-properties:
        billing_amount:
          type: string
          minLength: 1
          maxLength: 10
          description: |
            振込依頼金額\
            `billing_tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照例： [銀行振込（バーチャル口座） > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/virtualaccount/restriction)
        billing_tax:
          type: string
          nullable: true
          minLength: 1
          maxLength: 10
          description: |
            振込依頼金額（税送料）\
            `billing_amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照例： [銀行振込（バーチャル口座） > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/virtualaccount/restriction)
        payment_term_day:
          type: string
          nullable: true
          minLength: 1
          maxLength: 2
          example: '2'
          description: |
            支払期限日数\
            \
            `0`～`99`日の範囲でバーチャル口座で振り込み可能な期限日数を指定します。\
            実行日から見て、支払期限日数後の翌日AMに期限切れになります。\
            例）2024/4/1に、`支払期限日数=2`で決済実行した場合、2024/4/4 AMに期限切れ
        reference_order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
          description: |
            バーチャル口座 再利用 オーダーID\
            \
            あるオーダーIDのバーチャル口座を再利用する場合、その決済のオーダーIDを参照先として指定します。\
            バーチャル口座の再利用が可能な決済の条件は以下の通りです。

            1. 参照する決済の`status`が`CAPTURED`、`CANCELED`、`EXPIRED`であること
            2. 参照する決済に紐づくバーチャル口座への振込から90日以内であること
        use_exact_deposit_amount:
          type: boolean
          enum:
            - true
            - false
          description: |
            入金可能額設定利用フラグ\
            この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを指定します。\
            設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

            - `true`: 入金可能額を設定する
            - `false`: 入金可能額を設定しない（デフォルト）
    Payment.VirtualAccount.list:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Payment'
              - $ref: '#/components/schemas/Payment.VirtualAccount'
    Payment.VirtualAccount.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Payment.VirtualAccount.list'
    Payment.Amazonpay:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別    この決済で利用する決済手段です。

            - `Amazonpay`: Amazon Pay
        job_code:
          type: string
          enum:
            - AUTH
            - CAPTURE
            - CANCEL
            - CHANGE
          example: CAPTURE
          description: |
            取引種別

            - `AUTH`：仮売上
            - `CAPTURE`：即時売上／売上確定
            - `CANCEL`：キャンセル
            - `CHANGE`：金額変更
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentAmazonpayStatus'
        payment_method_id:
          type: string
          nullable: true
          minLength: 25
          maxLength: 25
          example: pm_**********************
          description: |
            決済手段ID\
            随時決済（登録済みの決済手段を用いた決済）の場合に使用した決済手段のIDです。
        redirect_url:
          type: string
          nullable: true
          minLength: 1
          maxLength: 256
          example: https://your-service.example.com/on-payment-complete
          description: |
            リダイレクトURL\
            Amazon Pay上での購入者の操作が完了した際のリダイレクト先URLです。
        start_url:
          type: string
          nullable: true
          minLength: 1
          maxLength: 256
          example: https://api.test.fincode.jp/v1/payments/amazonpay/start_session/o_**********************
          description: |
            決済開始URL\
            購入者をこのURLにリダイレクトすることでAmazon Pay上での決済を開始します。\
            <span class="smallText">※ 都度決済の場合のみ返却されます。</span>
        start_limit_time:
          type: string
          nullable: true
          example: 2026/10/01 12:34:56.789
          description: |
            決済処理開始期限\
            `start_url`へのアクセス期限です。この期限を過ぎるとAmazon Pay上での決済を開始できません。\
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        sales_limit_time:
          type: string
          nullable: true
          example: 2026/10/31 12:34:56.789
          description: |
            売上確定処理期限\
            仮売上（`AUTHORIZED`）に対して売上確定を行える期限です。\
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        start_flag:
          type: string
          nullable: true
          enum:
            - '0'
            - '1'
          example: '1'
          description: |
            決済開始済みフラグ\
            購入者がAmazon Pay上での決済を開始したかどうかを示すフラグです。

            - `0`：決済開始未実施
            - `1`：決済開始済み
        merchant_store_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 50
          example: Your Shop
          description: |
            事業者名\
            購入者のAmazon Pay画面および注文履歴に表示される事業者名です。\
            <span class="smallText">※ 最大50バイト。指定しなかった場合はショップ名が設定されます。</span>
        note_to_buyer:
          type: string
          nullable: true
          minLength: 1
          maxLength: 1024
          example: ○○の購入
          description: |
            説明文\
            購入者のAmazon Pay画面および注文履歴に表示される説明文です。\
            <span class="smallText">※ 最大1024バイト。</span>
        product_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AmazonpayProductType'
        amazonpay_seller_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 14
          example: A1BCDEFGHIJKLM
          description: |
            Amazon Pay 出品者ID\
            Amazon Payによって発行された出品者（マーチャント）IDです。
        amazonpay_checkout_session_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 256
          example: ada3f397-7d4b-4a55-abac-786685c02d8b
          description: |
            Amazon チェックアウトセッションID\
            Amazon Payのチェックアウトセッション（Checkout Session）のIDです。
        amazonpay_charge_permission_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 32
          example: S01-0000000-0000000
          description: |
            Amazon チャージパーミッションID\
            Amazon Payのチャージパーミッション（Charge Permission）のIDです。購入者から得た請求の許可を表します。
        amazonpay_charge_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          example: S01-0000000-0000000-C000000
          description: |
            Amazon チャージID\
            Amazon Payのチャージ（Charge）のIDです。1回の請求（オーソリ・売上確定）を表します。
        amazonpay_refund_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          example: S01-0000000-0000000-R000000
          description: |
            Amazon 返金ID\
            Amazon Payの返金（Refund）のIDです。売上確定後のキャンセル（返金）を行った場合に設定されます。
        amazonpay_buyer_id:
          type: string
          nullable: true
          minLength: 1
          maxLength: 42
          example: amzn1.account.AAAAAAAAAAAAAAAAAAAAAAAAAAA
          description: |
            Amazon バイヤーID\
            購入者のAmazon Payアカウントを一意に識別するIDです。
        amazonpay_reason_code:
          type: string
          nullable: true
          minLength: 1
          maxLength: 64
          example: TransactionAmountExceeded
          description: |
            Amazon Pay 理由コード\
            Amazon Payでの処理が失敗した際に、その理由を示すコードです。
        amazonpay_charge_permission_expiration_time:
          type: string
          nullable: true
          example: 2026/10/31 12:34:56.789
          description: |
            Amazon Pay チャージパーミッション有効期限\
            Amazon Pay側で管理されているチャージパーミッションの有効期限です。\
            形式：`yyyy/MM/dd HH:mm:ss.SSS`（タイムゾーンはUTC）
        shipping:
          type: object
          nullable: true
          description: |
            配送先情報\
            購入者がAmazon Pay上で選択した配送先住所です。\
            <span class="smallText">※ 決済 取得（`GET /v1/payments/{id}`）のレスポンスでのみ返却されます。`product_type`が`pay_and_ship`の場合に値が入ります。</span>
          properties:
            country_code:
              $ref: '#/components/schemas/country_code'
            city:
              $ref: '#/components/schemas/city'
            county:
              $ref: '#/components/schemas/county'
            district:
              $ref: '#/components/schemas/district'
            postal_code:
              $ref: '#/components/schemas/postal_code'
            state_or_region:
              $ref: '#/components/schemas/state_or_region'
            addr_line_1:
              $ref: '#/components/schemas/properties-addr_line_1'
            addr_line_2:
              $ref: '#/components/schemas/properties-addr_line_2'
            addr_line_3:
              $ref: '#/components/schemas/properties-addr_line_3'
            name:
              $ref: '#/components/schemas/properties-name'
            phone_number:
              $ref: '#/components/schemas/phone_number'
        billing:
          type: object
          nullable: true
          description: |
            請求先情報\
            購入者のAmazon Payアカウントに登録されている請求先住所です。\
            <span class="smallText">※ 決済 取得（`GET /v1/payments/{id}`）のレスポンスでのみ返却されます。</span>
          properties:
            country_code:
              $ref: '#/components/schemas/country_code'
            city:
              $ref: '#/components/schemas/city'
            county:
              $ref: '#/components/schemas/county'
            district:
              $ref: '#/components/schemas/district'
            postal_code:
              $ref: '#/components/schemas/postal_code'
            state_or_region:
              $ref: '#/components/schemas/state_or_region'
            addr_line_1:
              $ref: '#/components/schemas/properties-addr_line_1'
            addr_line_2:
              $ref: '#/components/schemas/properties-addr_line_2'
            addr_line_3:
              $ref: '#/components/schemas/properties-addr_line_3'
            name:
              $ref: '#/components/schemas/properties-name'
            phone_number:
              $ref: '#/components/schemas/phone_number'
      x-req-properties:
        redirect_url:
          type: string
          minLength: 1
          maxLength: 256
          example: https://your-service.example.com/on-payment-complete
          description: |
            リダイレクトURL\
            Amazon Pay上での購入者の操作が完了した際のリダイレクト先URLです。\
            <span class="smallText">※ 都度決済の場合は必須</span>
        redirect_term_sec:
          type: string
          minLength: 1
          maxLength: 5
          default: '120'
          example: '120'
          description: |
            リダイレクト開始期限秒\
            `start_url`へのアクセス期限を秒数で指定します。\
            指定できる範囲は`1`〜`86400`（1日）です。指定しなかった場合は`120`（秒）が設定されます。
        merchant_store_name:
          type: string
          minLength: 1
          maxLength: 50
          example: Your Shop
          description: |
            事業者名\
            購入者のAmazon Pay画面および注文履歴に表示される事業者名を指定します。\
            <span class="smallText">※ 最大50バイト。指定しなかった場合はショップ名が設定されます。</span>
        note_to_buyer:
          type: string
          minLength: 1
          maxLength: 1024
          example: ○○の購入
          description: |
            説明文\
            購入者のAmazon Pay画面および注文履歴に表示される説明文を指定します。\
            <span class="smallText">※ 最大1024バイト。</span>
        shipping:
          type: object
          description: |
            配送先情報\
            Amazon Payに引き渡す配送先住所を指定します。\
            <span class="smallText">※ `product_type`が`pay_and_ship`の場合に指定します。</span>
          properties:
            country_code:
              $ref: '#/components/schemas/x-req-properties-country_code'
            postal_code:
              $ref: '#/components/schemas/x-req-properties-postal_code'
            state_or_region:
              $ref: '#/components/schemas/x-req-properties-state_or_region'
            city:
              $ref: '#/components/schemas/x-req-properties-city'
            addr_line_1:
              $ref: '#/components/schemas/x-req-properties-addr_line_1'
            addr_line_2:
              $ref: '#/components/schemas/x-req-properties-addr_line_2'
            addr_line_3:
              $ref: '#/components/schemas/x-req-properties-addr_line_3'
            name:
              $ref: '#/components/schemas/x-req-properties-name'
            phone_number:
              $ref: '#/components/schemas/x-req-properties-phone_number'
    Payment.Amazonpay.list:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Payment'
              - $ref: '#/components/schemas/Payment.Amazonpay'
    Payment.Amazonpay.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Payment.Amazonpay.list'
    Payment_properties-id:
      type: string
      nullable: false
      minLength: 1
      maxLength: 30
      example: o_**********************
      description: |
        オーダーID\
        決済情報のIDです。
    CardPaymentJobCode:
      type: string
      enum:
        - CHECK
        - AUTH
        - CAPTURE
      example: CAPTURE
      description: |
        取引種別\
        この決済に対し決済実行を行った際、仮売上にするか即座に売上確定するか、カードの有効性チェックのみを行うかを指定します。

        - `CHECK`：有効性チェックのみ行う
        - `AUTH`：仮売上にする
        - `CAPTURE`：即時売上
    amount:
      type: string
      nullable: false
      minLength: 1
      example: '1000'
      description: |
        利用金額\
        `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
        参照例： [カード決済 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/restriction)
    tax:
      type: string
      nullable: false
      minLength: 1
      example: '100'
      description: |
        税送料\
        `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
        参照例： [カード決済 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/restriction)
    Payment.Card.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Card`: カード
        job_code:
          allOf:
            - $ref: '#/components/schemas/CardPaymentJobCode'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額  
            job_code = `CHECK` 以外の場合は必須です。  

            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [カード決済 > 制限事項 > 利用可能な金額](/payment/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [カード決済 > 制限事項 > 利用可能な金額](/payment/restriction)
        tds_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds_type'
        tds2_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_type'
        td_tenant_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/td_tenant_name'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1\
            任意の値を挿入し、決済情報に保存できます。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
      required:
        - pay_type
        - job_code
    ApplePayPaymentJobCode:
      type: string
      enum:
        - AUTH
        - CAPTURE
      example: CAPTURE
      description: |
        取引種別\
        この決済に対し決済実行を行った際、仮売上にするか即座に売上確定するかを指定します。

        - `AUTH`：仮売上にする
        - `CAPTURE`：即時売上
    Payment.ApplePay.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Applepay`: Apple Pay
        job_code:
          allOf:
            - $ref: '#/components/schemas/ApplePayPaymentJobCode'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [Apple Pay > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/applepay/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [Apple Pay > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/applepay/restriction)
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1\
            任意の値を挿入し、決済情報に保存できます。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        item_code:
          nullable: true
          type: string
          minLength: 7
          maxLength: 7
          description: |
            商品コード
      required:
        - pay_type
        - job_code
        - amount
    GooglePayPaymentJobCode:
      type: string
      enum:
        - AUTH
        - CAPTURE
      example: CAPTURE
      description: |
        取引種別\
        この決済に対し決済実行を行った際、仮売上にするか即座に売上確定するかを指定します。

        - `AUTH`：仮売上
        - `CAPTURE`：即時売上
    Payment.GooglePay.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        job_code:
          allOf:
            - $ref: '#/components/schemas/GooglePayPaymentJobCode'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額  

            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [Google Pay > 制限事項 > 利用可能な金額](/payment/googlepay/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [Google Pay > 制限事項 > 利用可能な金額](/payment/googlepay/restriction)
        tds_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds_type'
        tds2_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_type'
        td_tenant_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/td_tenant_name'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1\
            任意の値を挿入し、決済情報に保存できます。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
      required:
        - pay_type
        - job_code
        - amount
    Payment.Konbini.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Konbini`: コンビニ決済
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 6
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [コンビニ決済 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/konbini/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 6
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [コンビニ決済 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/konbini/restriction)
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1\
            任意の値を挿入し、決済情報に保存できます。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
      required:
        - pay_type
        - amount
    PayPayPaymentJobCode:
      type: string
      enum:
        - AUTH
        - CAPTURE
      example: CAPTURE
      description: |
        取引種別\
        この決済に対し決済実行を行った際、仮売上にするか即座に売上確定するか指定します。

        - `AUTH`：仮売上にする
        - `CAPTURE`：即時売上
    order_description:
      type: string
      nullable: true
      maxLength: 100
      example: ○○の購入
      description: |
        注文内容の説明\
        購入者のPayPayアプリ上で表示される注文内容の説明。
    Payment.PayPay.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Paypay`: PayPay
        job_code:
          allOf:
            - $ref: '#/components/schemas/PayPayPaymentJobCode'
          description: |
            処理区分\
            \
            - `AUTH`：仮売上
            - `CAPTURE`：即時売上

            ※ 継続課金は`CAPTURE`のみ利用できます。`AUTH`で登録した取引に対して決済実行API（`PUT /v1/payments/{id}`）で継続課金を行うことはできません。
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 9
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [PayPay > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/paypay/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 9
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [PayPay > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/paypay/restriction)
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1\
            任意の値を挿入し、決済情報に保存できます。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        order_description:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/order_description'
      required:
        - pay_type
        - job_code
        - amount
    remarks:
      type: string
      nullable: true
      minLength: 1
      maxLength: 9
      example: フィンコードショッ
      description: |
        ご利用明細表示内容

        - フォーマット：半角英数カナ／全角英数カナ／一部の記号／半角全角スペース
        - デフォルト： `ショップ名カナの先頭9文字`

        ※ 利用可能な記号

        - 半角：`.`、`(`、`)`、`–`
        - 全角：`．`、`（`、`）`、`ー`
    Payment.DirectDebit.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Directdebit`: 口座振替
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 10
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [口座振替 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/directdebit/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 10
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [口座振替 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/directdebit/restriction)
        remarks:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/remarks'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1\
            任意の値を挿入し、決済情報に保存できます。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
      required:
        - pay_type
        - amount
    billing_amount:
      type: string
      minLength: 1
      maxLength: 10
      description: |
        振込依頼金額\
        `billing_tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
        参照例： [銀行振込（バーチャル口座） > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/virtualaccount/restriction)
    billing_tax:
      type: string
      nullable: true
      minLength: 1
      maxLength: 10
      description: |
        振込依頼金額（税送料）\
        `billing_amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
        参照例： [銀行振込（バーチャル口座） > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/virtualaccount/restriction)
    use_exact_deposit_amount:
      type: boolean
      enum:
        - true
        - false
      description: |
        入金可能額設定利用フラグ\
        この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを指定します。\
        設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

        - `true`: 入金可能額を設定する
        - `false`: 入金可能額を設定しない（デフォルト）
    Payment.VirtualAccount.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Virtualaccount`: 銀行振込（バーチャル口座）
        billing_amount:
          allOf:
            - $ref: '#/components/schemas/billing_amount'
        billing_tax:
          allOf:
            - $ref: '#/components/schemas/billing_tax'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1\
            任意の値を挿入し、決済情報に保存できます。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        use_exact_deposit_amount:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/use_exact_deposit_amount'
          description: |
            入金可能額設定利用フラグ\
            この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを示すフラグです。\
            設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。
            - `true`: 入金可能額を設定する
            - `false`: 入金可能額を設定しない（デフォルト）
      required:
        - pay_type
        - billing_amount
    AmazonpayPaymentJobCode:
      type: string
      enum:
        - AUTH
        - CAPTURE
      example: CAPTURE
      description: |
        取引種別\
        この決済に対し決済実行を行った際、仮売上にするか即座に売上確定するか指定します。

        - `AUTH`：仮売上にする
        - `CAPTURE`：即時売上
    Payment.Amazonpay.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
          description: |
            オーダーID\
            指定しなかった場合はfincodeが自動採番します。
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別    この決済で利用する決済手段です。

            - `Amazonpay`: Amazon Pay
        job_code:
          allOf:
            - $ref: '#/components/schemas/AmazonpayPaymentJobCode'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額\
            `tax`との合計値が7桁以内である必要があります。0円は指定できません。
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料\
            `amount`との合計値が7桁以内である必要があります。指定しなかった場合は`0`が設定されます。
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1\
            任意の値を挿入し、決済情報に保存できます。
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
      required:
        - pay_type
        - job_code
        - amount
    Payment.Card.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Card'
    Payment.ApplePay.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.ApplePay'
    Payment.GooglePay.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.GooglePay'
    Payment.Konbini.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Konbini'
    Payment.PayPay.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.PayPay'
    Payment.DirectDebit.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.DirectDebit'
    Payment.VirtualAccount.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.VirtualAccount'
    Payment.Amazonpay.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Amazonpay'
    OrderId_schema:
      type: string
      example: o_**********************
    Payment.Retrieving.QueryParams:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
      required:
        - pay_type
    Payment.AutoCancel:
      type: object
      properties:
        is_auto_cancelled:
          type: boolean
          description: |
            自動キャンセル有無

            - `true`: 仮売上有効期限（`auth_max_date`）の超過により自動でキャンセルされた決済
            - `false`: 上記以外
    Payment.Card.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Card'
        - $ref: '#/components/schemas/Payment.AutoCancel'
    Payment.ApplePay.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.ApplePay'
        - $ref: '#/components/schemas/Payment.AutoCancel'
    Payment.GooglePay.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.GooglePay'
        - $ref: '#/components/schemas/Payment.AutoCancel'
    Payment.Konbini.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Konbini'
    Payment.PayPay.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.PayPay'
    Payment.DirectDebit.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.DirectDebit'
        - type: object
          properties:
            invoice_id:
              type: string
              nullable: true
              minLength: 1
              maxLength: 30
              description: |
                紐づくインボイスID\
                この決済に後付けで紐付けられたインボイスがある場合、そのインボイスIDが設定されます。
    Payment.VirtualAccount.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.VirtualAccount'
    Payment.Amazonpay.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Amazonpay'
    CardPayTimes:
      type: string
      enum:
        - '3'
        - '5'
        - '6'
        - '10'
        - '12'
        - '15'
        - '18'
        - '20'
        - '24'
      example: null
      description: |
        （分割払いの場合）支払回数\
        \
        指定可能な値： `3`, `5`, `6`, `10`, `12`, `15`, `18`, `20`, `24`
    Payment.Card.Executing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Card`: カード
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        token:
          allOf:
            - $ref: '#/components/schemas/token'
          description: |
            カードトークン\
            `customer_id`と`card_id`を指定しない場合、fincode JSの`tokens`メソッドで取得したトークンをこのフィールドに指定します。
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            購入者となる顧客のIDです。
        card_id:
          allOf:
            - $ref: '#/components/schemas/properties-id'
          description: |
            カードID\
            この決済に使用するカードのIDです。指定しない場合、デフォルトカードが使用されます。
        security_code:
          type: string
          minLength: 3
          maxLength: 4
          example: '123'
          nullable: true
          description: |
            セキュリティコード\
            登録済みのカードを使用する場合に、セキュリティコードを再度指定できます。
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
          description: |
            支払方法\
            この決済の`job_code`（処理区分）が`AUTH`または`CAPTURE`であるとき、このフィールドを指定する必要があります。

            - `1`: 一括払い
            - `2`: 分割払い
            - `5`: リボ払い
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimes'
        tds2_ret_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ret_url'
          description: |
            3Dセキュア認証における戻りURL  
            3Dセキュア認証処理に使用するURLを指定してください。  
            このURLに後続処理のためのデータがPOSTメソッドで送信されます。   

            ※ 指定した場合、3Dセキュア認証に必要なAPIの呼び出しやコールバック処理をすべて加盟店で実装する必要があります。
            お客様のブラウザとfincode間で3Dセキュア認証を自動で行う場合はこのパラメータを未指定としてください。

            詳細はDocs [3Dセキュア2.0認証を使用する](/payment/fraud_protection/3d_secure_2)を確認してください。
        return_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-return_url'
          description: |
            加盟店戻りURL（成功時）  
            購入者のブラウザとfincode間で3Dセキュア認証を自動で行う場合に、
            3Dセキュア認証処理後、決済に成功した際にリダイレクトされるURLです。  
            POSTメソッドでリダイレクトされます。

            指定しない場合はデフォルトの成功ページのURLが設定されます。  
            また、`tds2_ret_url`を指定した場合は無視されます。  
        return_url_on_failure:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-return_url_on_failure'
          description: |
            加盟店戻りURL（失敗時）  
            購入者のブラウザとfincode間で3Dセキュア認証を自動で行う場合に、
            3Dセキュア認証に失敗、または決済に失敗した際にリダイレクトされるURLです。  
            POSTメソッドでリダイレクトされます。

            指定しない場合はデフォルトの失敗ページのURLが設定されます。  
            また、`tds2_ret_url`を指定した場合は無視されます。  
        tds2_ch_acc_change:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_change'
        tds2_ch_acc_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_date'
        tds2_ch_acc_pw_change:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_pw_change'
        tds2_nb_purchase_account:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_nb_purchase_account'
        tds2_payment_acc_age:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_payment_acc_age'
        tds2_provision_attempts_day:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_provision_attempts_day'
        tds2_ship_address_usage:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_address_usage'
        tds2_ship_name_ind:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_name_ind'
        tds2_suspicious_acc_activity:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_suspicious_acc_activity'
        tds2_txn_activity_day:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_txn_activity_day'
        tds2_txn_activity_year:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_txn_activity_year'
        tds2_three_ds_req_auth_data:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_data'
        tds2_three_ds_req_auth_method:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_method'
        tds2_three_ds_req_auth_timestamp:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_timestamp'
        tds2_email:
          allOf:
            - $ref: '#/components/schemas/tds2_email'
        tds2_addr_match:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_addr_match'
        tds2_bill_addr_country:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_country'
        tds2_bill_addr_state:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_state'
        tds2_bill_addr_city:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_city'
        tds2_bill_addr_line_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_1'
        tds2_bill_addr_line_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_2'
        tds2_bill_addr_line_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_3'
        tds2_bill_addr_post_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_post_code'
        tds2_ship_addr_country:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_country'
        tds2_ship_addr_state:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_state'
        tds2_ship_addr_city:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_city'
        tds2_ship_addr_line_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_1'
        tds2_ship_addr_line_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_2'
        tds2_ship_addr_line_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_3'
        tds2_ship_addr_post_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_post_code'
        tds2_ship_ind:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_ind'
        tds2_delivery_email_address:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_delivery_email_address'
        tds2_home_phone_cc:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_home_phone_cc'
        tds2_home_phone_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_home_phone_no'
        tds2_mobile_phone_cc:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_mobile_phone_cc'
        tds2_mobile_phone_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_mobile_phone_no'
        tds2_work_phone_cc:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_work_phone_cc'
        tds2_work_phone_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_work_phone_no'
        tds2_delivery_timeframe:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_delivery_timeframe'
        tds2_pre_order_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_pre_order_date'
        tds2_pre_order_purchase_ind:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_pre_order_purchase_ind'
        tds2_reorder_items_ind:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_reorder_items_ind'
        tds2_recurring_expiry:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_recurring_expiry'
        tds2_recurring_frequency:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_recurring_frequency'
        tds2_gift_card_amount:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_amount'
        tds2_gift_card_count:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_count'
        tds2_gift_card_curr:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_curr'
      required:
        - pay_type
        - access_id
    Payment.ApplePay_x-req-properties-token:
      type: string
      example: eyJoZWFkZXIiOnsiZXBoZW1lcmFsUHVibGljS2V5IjoidGVzdFB1YmxpY0tleSIsInB1YmxpY0tleUhhc2giOiJ0ZXN0S2V5SGFzaCIsInRyYW5zYWN0aW9uSWQiOiJ0ZXN0VHJhbnNhY3Rpb24ifSwiZGF0YSI6ImV5SmhjSEJzYVdOaGRHbHZibEJ5YVcxaGNubEJZMk52ZFc1MFRuVnRZbVZ5SWpvaU5ERXhNVEV4TVRFeE1URXhNVEV4TVNJc0ltRndjR3hwWTJGMGFXOXVSWGh3YVhKaGRHbHZia1JoZEdVaU9pSXlOakV5TXpFaUxDSmpkWEp5Wlc1amVVTnZaR1VpT2lJek9USWlMQ0owY21GdWMyRmpkR2x2YmtGdGIzVnVkQ0k2SWpFeE1URWlMQ0pqWVhKa2FHOXNaR1Z5VG1GdFpTSTZJaUlzSW1SbGRtbGpaVTFoYm5WbVlXTjBkWEpsY2tsa1pXNTBhV1pwWlhJaU9pSWlMQ0p3WVhsdFpXNTBSR0YwWVZSNWNHVWlPaUl6UkZObFkzVnlaU0lzSW5CaGVXMWxiblJFWVhSaElqcDdJbTl1YkdsdVpWQmhlVzFsYm5SRGNubHdkRzluY21GdElqb2lSSFZ0YlhsRFFWWldRVUZCUVVGQlFVRkJRVUZCUVVGQlFVRkJRU0lzSW1WamFVbHVaR2xqWVhSdmNpSTZJalVpZlgwPSIsInNpZ25hdHVyZSI6InRlc3RTaWduYXR1cmUiLCJ2ZXJzaW9uIjoiTW9jayJ9
      description: |
        Apple Pay カードトークン\
        Apple Payが利用可能なデバイスから取得したトークンをBase64エンコードした値を設定します。\
        \
        トークンの取得方法
        - Swift： `PKPayment.token.paymentData`の値をBase64エンコード
        - JavaScript： `ApplePayPaymentAuthorizedEvent.payment.token`の値をBase64エンコード

        詳細は[Docs > 決済処理を実行する（Apple Pay）](https://docs.fincode.jp/payment/applepay/execution)または[Offering Apple Pay in Your App](https://developer.apple.com/documentation/passkit_apple_pay_and_wallet/apple_pay/offering_apple_pay_in_your_app)（Apple公式）を参照できます。
    Payment.ApplePay.Executing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Applepay`: Apple Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        token:
          allOf:
            - $ref: '#/components/schemas/Payment.ApplePay_x-req-properties-token'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            購入者となる顧客のIDです。
      required:
        - pay_type
        - access_id
        - token
    Payment.GooglePay_x-req-properties-token:
      type: string
      example: eyJ2ZXJzaW9uIjoiR21vTW9jayIsInByb3RvY29sVmVyc2lvbiI6IkVDdjIiLCJzaWduYXR1cmUiOiJNRVFDSUR4Qm9VQ29GUkdSZUxkWi9jQUJsU1NSSUtvT0VGb1UzZTI3YzE0dk1adGZBaUJ0WDNwR01FcG53Nm1TQWJuYWdDQ2dIbENrM05jRndXWUV5eElFNktHWlZBdTAwM2R1MDAzZCIsInNpZ25lZE1lc3NhZ2UiOiJ7XCJlbmNyeXB0ZWRNZXNzYWdlXCI6XCJleUpuWVhSbGQyRjVUV1Z5WTJoaGJuUkpaQ0k2SUNKemIyMWxMVzFsY21Ob1lXNTBMV2xrSWl3aWJXVnpjMkZuWlVWNGNHbHlZWFJwYjI0aU9pQWlNalUxTmpFeE1UVTVPVEF3TUNJc0ltMWxjM05oWjJWSlpDSTZJQ0pCU0RKRmFuUmpPRGhhU0VvdE1tRlpRbEZYZWtoM2RuQTJiREJLYzBOSVozaFdkRGh6T1RGQkxWcFZhV3RoV0U1aVkycHpSbTAyWjJjNVJYaGxWbEl0YW5wSmVWUXRiVXAyUVY5dWRIWm1Vbk5FUkU5SU1tcHVTMDFxWkZSMFdFbEtkbEIwTUU1Q1ZWVTBOVkkzTFdkdWFuaHJlQzF6U1RCc1pHTlhkbUpFU0hOV01EY3pOWGxHUkdKWGF5SXNJbkJoZVcxbGJuUk5aWFJvYjJRaU9pQWlRMEZTUkNJc0luQmhlVzFsYm5STlpYUm9iMlJFWlhSaGFXeHpJam9nZXlKbGVIQnBjbUYwYVc5dVdXVmhjaUk2SURJd05UQXNJbVY0Y0dseVlYUnBiMjVOYjI1MGFDSTZJREV5TENKd1lXNGlPaUFpTkRFd01EQXdNREF3TURBd01ERXdNQ0lzSW1GMWRHaE5aWFJvYjJRaU9pQWlVRUZPWDA5T1RGa2lmWDA9XCIsXCJlcGhlbWVyYWxQdWJsaWNLZXlcIjpcIkJHTXhlc256S0NWRFlTWTdpNk5sWHJyeDNDRTFvRERUTElhOGx2QUFpZkxnZ2s0WW92bHV5SXZWNlh4VVllTTI1VzRqeWFKaWtNcVF3MGh3ZDVCVEw4OD1cIixcInRhZ1wiOlwiWlZ3bEp0N2RVOFBsazArcjhyUEY4RG1QVHZEaU9BMVVBb05qRFYrU3FERXUwMDNkXCJ9In0=
      description: |
        Google Pay カードトークン\
        Google Payを利用するデバイスから取得したトークン（`paymentMethodData.tokenizationData.token`）をBase64エンコードした値を設定します。  

        トークン生成時、`tokenizationSpecification`には以下の値を指定してください。
        - gateway： `fincode`
        - gatewayMerchantId： `{{ショップID}}`<br>（例：s_01234567890）

        詳細は[Docs > 決済処理を実行する（Google Pay）](/payment/googlepay/execution)または[Google Pay ウェブ デベロッパー向けドキュメント](https://developers.google.com/pay/api/web?hl=ja)（Google公式）を参照してください。
    Payment.GooglePay.Executing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        token:
          allOf:
            - $ref: '#/components/schemas/Payment.GooglePay_x-req-properties-token'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
          description: |
            支払方法  
            - `1`: 一括払い
            - `2`: 分割払い
            - `5`: リボ払い
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimes'
        tds2_ret_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ret_url'
          description: |
            3Dセキュア認証における戻りURL  
            3Dセキュア認証処理に使用するURLを指定してください。  
            このURLに後続処理のためのデータがPOSTメソッドで送信されます。   

            ※ 指定した場合、3Dセキュア認証に必要なAPIの呼び出しやコールバック処理をすべて加盟店で実装する必要があります。
            お客様のブラウザとfincode間で3Dセキュア認証を自動で行う場合はこのパラメータを未指定としてください。

            詳細はDocs [3Dセキュア2.0認証を使用する](/payment/fraud_protection/3d_secure_2)を確認してください。
        return_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-return_url'
          description: |
            加盟店戻りURL（成功時）  
            購入者のブラウザとfincode間で3Dセキュア認証を自動で行う場合に、
            3Dセキュア認証処理後、決済に成功した際にリダイレクトされるURLです。  
            POSTメソッドでリダイレクトされます。

            指定しない場合はデフォルトの成功ページのURLが設定されます。  
            また、`tds2_ret_url`を指定した場合は無視されます。
        return_url_on_failure:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-return_url_on_failure'
          description: |
            加盟店戻りURL（失敗時）  
            購入者のブラウザとfincode間で3Dセキュア認証を自動で行う場合に、
            3Dセキュア認証に失敗、または決済に失敗した際にリダイレクトされるURLです。  
            POSTメソッドでリダイレクトされます。

            指定しない場合はデフォルトの失敗ページのURLが設定されます。  
            また、`tds2_ret_url`を指定した場合は無視されます。
        tds2_ch_acc_change:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_change'
        tds2_ch_acc_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_date'
        tds2_ch_acc_pw_change:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_pw_change'
        tds2_nb_purchase_account:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_nb_purchase_account'
        tds2_payment_acc_age:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_payment_acc_age'
        tds2_provision_attempts_day:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_provision_attempts_day'
        tds2_ship_address_usage:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_address_usage'
        tds2_ship_name_ind:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_name_ind'
        tds2_suspicious_acc_activity:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_suspicious_acc_activity'
        tds2_txn_activity_day:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_txn_activity_day'
        tds2_txn_activity_year:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_txn_activity_year'
        tds2_three_ds_req_auth_data:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_data'
        tds2_three_ds_req_auth_method:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_method'
        tds2_three_ds_req_auth_timestamp:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_timestamp'
        tds2_email:
          allOf:
            - $ref: '#/components/schemas/tds2_email'
        tds2_addr_match:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_addr_match'
        tds2_bill_addr_country:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_country'
        tds2_bill_addr_state:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_state'
        tds2_bill_addr_city:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_city'
        tds2_bill_addr_line_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_1'
        tds2_bill_addr_line_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_2'
        tds2_bill_addr_line_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_3'
        tds2_bill_addr_post_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_post_code'
        tds2_ship_addr_country:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_country'
        tds2_ship_addr_state:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_state'
        tds2_ship_addr_city:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_city'
        tds2_ship_addr_line_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_1'
        tds2_ship_addr_line_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_2'
        tds2_ship_addr_line_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_3'
        tds2_ship_addr_post_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_post_code'
        tds2_ship_ind:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_ship_ind'
        tds2_delivery_email_address:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_delivery_email_address'
        tds2_home_phone_cc:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_home_phone_cc'
        tds2_home_phone_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_home_phone_no'
        tds2_mobile_phone_cc:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_mobile_phone_cc'
        tds2_mobile_phone_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_mobile_phone_no'
        tds2_work_phone_cc:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_work_phone_cc'
        tds2_work_phone_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_work_phone_no'
        tds2_delivery_timeframe:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_delivery_timeframe'
        tds2_pre_order_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_pre_order_date'
        tds2_pre_order_purchase_ind:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_pre_order_purchase_ind'
        tds2_reorder_items_ind:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_reorder_items_ind'
        tds2_recurring_expiry:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_recurring_expiry'
        tds2_recurring_frequency:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_recurring_frequency'
        tds2_gift_card_amount:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_amount'
        tds2_gift_card_count:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_count'
        tds2_gift_card_curr:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_curr'
      required:
        - pay_type
        - access_id
        - token
        - method
    payment_term_day:
      type: string
      nullable: false
      minLength: 1
      maxLength: 2
      example: '2'
      description: |
        支払い期限日数\
        この決済の支払い期限日数です。`0`日から`14`日まで指定できます。

        - `0`を指定すると決済を作成した当日に限り支払いが可能な決済が作成されます。
        - デフォルト：`2`
    pixel_ratio:
      type: string
      minLength: 1
      maxLength: 5
      example: '2.00'
      description: |
        デバイスピクセル比\
        `window.devicePixelRatio`から取得した値を小数点以下2桁まで指定します。
    win_size_type:
      type: string
      enum:
        - '1'
        - '2'
      minLength: 1
      maxLength: 1
      example: '1'
      description: |
        画面サイズ種別\
        バーコード表示を行うデバイスのピクセルの種類を指定します。

        - `1`: 物理ピクセル（Androidのときはこちらを指定）
        - `2`: CSSピクセル（iPhoneのときはこちらを指定）
    Payment.Konbini.Executing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Konbini`: コンビニ決済
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            購入者となる顧客のIDです。
        payment_term_day:
          allOf:
            - $ref: '#/components/schemas/payment_term_day'
        device_name:
          allOf:
            - $ref: '#/components/schemas/device_name'
        win_width:
          allOf:
            - $ref: '#/components/schemas/win_width'
        win_height:
          allOf:
            - $ref: '#/components/schemas/win_height'
        pixel_ratio:
          allOf:
            - $ref: '#/components/schemas/pixel_ratio'
        win_size_type:
          allOf:
            - $ref: '#/components/schemas/win_size_type'
      required:
        - pay_type
        - access_id
        - device_name
        - win_width
        - win_height
        - pixel_ratio
        - win_size_type
    Payment.PayPay_properties-redirect_url:
      type: string
      nullable: true
      minLength: 1
      maxLength: 256
      example: https://your-service.example.com/on-payment-complete
      description: |
        リダイレクトURL\
        決済が完了した際のPayPayからのリダイレクト先URL。
    user_agent:
      type: string
      minLength: 1
      maxLength: 256
      example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3
      description: |
        ユーザーエージェント\
        リクエストを送信したユーザーエージェントの情報。`redirect_type`が`1`（Webページ／Webアプリケーション）の場合指定できます。
    Payment.PayPay.Executing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Paypay`: PayPay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            購入者となる顧客のIDです。\
            `payment_method_id`を指定する場合は必須です。
        payment_method_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID\
            継続課金を行う場合、購入者のPayPayアカウントを表す決済手段（`pay_type = Paypay`・`paypay_method = CONTINUOUS`・`status = ACTIVATED`）のIDを指定します。\
            指定できるのは`customer_id`で指定した顧客に登録されている決済手段のみです。\
            \
            指定した場合、この決済は**継続課金**として扱われ、QRコードの発行や購入者の操作なしで課金されます。\
            指定しなかった場合は従来のウェブペイメント（QRコード）による決済になります。
        redirect_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Payment.PayPay_properties-redirect_url'
          description: |
            リダイレクトURL\
            ウェブペイメント（QRコード）による決済の場合は必須です。\
            \
            継続課金（`payment_method_id`を指定する決済）では購入者の操作を伴わないため、指定する必要はありません。
        redirect_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/redirect_type'
        user_agent:
          allOf:
            - $ref: '#/components/schemas/user_agent'
      required:
        - pay_type
        - access_id
    target_date:
      type: string
      nullable: true
      example: 2022/05/06
      description: |
        振替指定日\
        振替を行う日を指定します。\
        実際の振替は営業日に行われるため、必ずしも指定した日付に引き落としが行われるとは限りません。\
        指定可能な日付及び引き落とし日は[Docs > 口座振替年間スケジュール](https://docs.fincode.jp/payment/directdebit/schedule)の「振替指定日」及び「振替日」の列で確認できます。
    Payment.DirectDebit.Executing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Directdebit`: 口座振替
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            購入者となる顧客のIDです。
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID\
            この決済に使用する決済手段（口座振替用口座）のIDです。指定しない場合、デフォルト決済手段が使用されます。
        target_date:
          allOf:
            - $ref: '#/components/schemas/target_date'
      required:
        - pay_type
        - access_id
        - customer_id
        - target_date
    x-req-properties-payment_term_day:
      type: string
      nullable: true
      minLength: 1
      maxLength: 2
      example: '2'
      description: |
        支払期限日数\
        \
        `0`～`99`日の範囲でバーチャル口座で振り込み可能な期限日数を指定します。\
        実行日から見て、支払期限日数後の翌日AMに期限切れになります。\
        例）2024/4/1に、`支払期限日数=2`で決済実行した場合、2024/4/4 AMに期限切れ
    reference_order_id:
      allOf:
        - $ref: '#/components/schemas/Payment_properties-id'
      description: |
        バーチャル口座 再利用 オーダーID\
        \
        あるオーダーIDのバーチャル口座を再利用する場合、その決済のオーダーIDを参照先として指定します。\
        バーチャル口座の再利用が可能な決済の条件は以下の通りです。

        1. 参照する決済の`status`が`CAPTURED`、`CANCELED`、`EXPIRED`であること
        2. 参照する決済に紐づくバーチャル口座への振込から90日以内であること
    Payment.VirtualAccount.Executing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Virtualaccount`: 銀行振込（バーチャル口座）
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        payment_term_day:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-payment_term_day'
        reference_order_id:
          allOf:
            - $ref: '#/components/schemas/reference_order_id'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            購入者となる顧客のIDです。
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID\
            この決済に使用する決済手段（銀行振込（バーチャル口座））のIDです。指定しない場合、デフォルト決済手段が使用されます。
      required:
        - pay_type
        - access_id
    payment_method_id:
      type: string
      nullable: true
      minLength: 25
      maxLength: 25
      example: pm_**********************
      description: |
        決済手段ID\
        随時決済（登録済みの決済手段を用いた決済）の場合に使用した決済手段のIDです。
    Payment.Amazonpay.Executing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別    この決済で利用する決済手段です。

            - `Amazonpay`: Amazon Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            購入者となる顧客のIDです。\
            <span class="smallText">※ 登録済みの決済手段を用いた決済（随時決済）を行う場合は必須</span>
        payment_method_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/payment_method_id'
          description: |
            決済手段ID\
            請求に使用する決済手段のIDです。\
            <span class="smallText">※ 登録済みの決済手段を用いた決済（随時決済）を行う場合は必須</span>
        redirect_url:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/redirect_url'
        redirect_term_sec:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/redirect_term_sec'
        merchant_store_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/x-req-properties-merchant_store_name'
        note_to_buyer:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-note_to_buyer'
        product_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AmazonpayProductType'
          description: |
            プロダクトタイプ\
            Amazon Payのチェックアウト画面で購入者から取得する情報の種類を指定します。

            - `pay_only`：支払いのみ（配送先住所を取得しない）
            - `pay_and_ship`：支払いと配送（配送先住所を取得する）

            <span class="smallText">※ 購入者にAmazon Pay上で決済を行わせる決済（都度決済）の場合は必須</span>
        shipping:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/shipping'
      required:
        - pay_type
        - access_id
        - note_to_buyer
    Payment.Card.Executing:
      type: object
      properties:
        acs_url:
          type: string
          nullable: true
          description: |
            3Dセキュア認証初期化URL  
            決済実行後に購入者に遷移させる3Dセキュア認証ページのURLです。  

            3Dセキュア認証に必要なAPIの呼び出しやコールバック処理をすべて加盟店で実装する場合に使用します。  
            このURLに遷移後3Dセキュア認証が開始し、`tds2_ret_url`に後続処理のためのデータがPOSTメソッドで送信されます。  
            `tds2_ret_url`が指定された場合のみ返却されます。
        redirect_url:
          type: string
          nullable: true
          description: |
            リダイレクトURL  
            決済実行後に購入者に遷移させる3Dセキュア認証ページのURLです。  

            お客様のブラウザとfincode間で3Dセキュア認証を自動で行う場合に使用します。  
            このURLに遷移後お客様のブラウザとfincode間で3Dセキュア認証を自動で行います。  
            認証後、結果に応じて`return_url`または`return_url_on_failure`に自動で遷移します。  
            `tds2_ret_url`が指定されなかった場合のみ返却されます。
    Payment.Card.Executing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Card'
        - $ref: '#/components/schemas/Payment.Card.Executing'
    Payment.ApplePay.Executing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.ApplePay'
    Payment.GooglePay.Executing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.GooglePay'
        - $ref: '#/components/schemas/Payment.Card.Executing'
    Payment.Konbini.Executing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Konbini'
    Payment.PayPay.Executing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.PayPay'
    Payment.DirectDebit.Executing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.DirectDebit'
    Payment.VirtualAccount.Executing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.VirtualAccount'
    Payment.Amazonpay.Executing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Amazonpay'
    Payment.Card.Capturing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Card`: カード
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
          description: |-
            支払方法\
            `CANCELED`ステータスの決済に対して指定ができます。

            - `1`: 一括払い
            - `2`: 分割払い
            - `5`: リボ払い
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimes'
          description: |
            （分割払いの場合）支払回数\
            `CANCELED`ステータスの決済に対して指定ができます。\
            \
            指定可能な値： `3`, `5`, `6`, `10`, `12`, `15`, `18`, `20`, `24`
      required:
        - pay_type
        - access_id
    Payment.ApplePay.Capturing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Applepay`: Apple Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    Payment.GooglePay.Capturing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
          description: |-
            支払方法\
            `CANCELED`ステータスの決済に対して指定ができます。

            - `1`: 一括払い
            - `2`: 分割払い
            - `5`: リボ払い
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimes'
          description: |
            （分割払いの場合）支払回数\
            `CANCELED`ステータスの決済に対して指定ができます。\
            \
            指定可能な値： `3`, `5`, `6`, `10`, `12`, `15`, `18`, `20`, `24`
      required:
        - pay_type
        - access_id
    capture_description:
      type: string
      nullable: true
      maxLength: 100
      example: ○○の発送完了
      description: |
        売上確定の説明\
        購入者のPayPayアプリ上で表示される売上確定の説明。
    Payment.PayPay.Capturing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Paypay`: PayPay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        capture_description:
          allOf:
            - $ref: '#/components/schemas/capture_description'
      required:
        - pay_type
        - access_id
    Payment.Amazonpay.Capturing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別    この決済で利用する決済手段です。

            - `Amazonpay`: Amazon Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        amount:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額\
            指定した金額で売上を確定します。指定しなかった場合は登録済みの金額で売上を確定します（`tax`の指定は無視されます）。
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料\
            `amount`を指定した場合に併せて指定します。`amount`を指定して`tax`を指定しなかった場合は`0`が設定されます。
      required:
        - pay_type
        - access_id
    Payment.Card.Capturing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Card'
    Payment.ApplePay.Capturing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.ApplePay'
    Payment.GooglePay.Capturing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.GooglePay'
    Payment.PayPay.Capturing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.PayPay'
    Payment.Amazonpay.Capturing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Amazonpay'
    Payment.Card.Canceling.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Card`: カード
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    Payment.ApplePay.Canceling.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Applepay`: Apple Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    Payment.GooglePay.Canceling.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    Payment.Konbini.Canceling.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Konbini`: コンビニ決済
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    cancel_description:
      type: string
      nullable: true
      maxLength: 100
      example: ○○の購入キャンセル
      description: |
        キャンセルの説明\
        購入者のPayPayアプリ上で表示されるキャンセルの説明。
    Payment.PayPay.Canceling.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Paypay`: PayPay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        cancel_description:
          allOf:
            - $ref: '#/components/schemas/cancel_description'
      required:
        - pay_type
        - access_id
    Payment.DirectDebit.Canceling.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Directdebit`: 口座振替
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    Payment.VirtualAccount.Canceling.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Virtualaccount`: 銀行振込（バーチャル口座）
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    Payment.Amazonpay.Canceling.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別    この決済で利用する決済手段です。

            - `Amazonpay`: Amazon Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    Payment.Card.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Card'
    Payment.ApplePay.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.ApplePay'
    Payment.GooglePay.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.GooglePay'
    Payment.Konbini.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Konbini'
    Payment.PayPay.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.PayPay'
    Payment.DirectDebit.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.DirectDebit'
    Payment.VirtualAccount.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.VirtualAccount'
    Payment.Amazonpay.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Amazonpay'
    Payment.Card.Reauthorizing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Card`: カード
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
          description: |-
            支払方法

            - `1`: 一括払い
            - `2`: 分割払い
            - `5`: リボ払い
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimes'
          description: |-
            （分割払いの場合）支払回数\
            `CANCELED`ステータスの決済に対して指定ができます。\
            \
            指定可能な値： `3`, `5`, `6`, `10`, `12`, `15`, `18`, `20`, `24`
      required:
        - pay_type
        - access_id
        - method
    Payment.GooglePay.Reauthorizing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
          description: |-
            支払方法

            - `1`: 一括払い
            - `2`: 分割払い
            - `5`: リボ払い
        pay_times:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CardPayTimes'
          description: |-
            （分割払いの場合）支払回数\
            `CANCELED`ステータスの決済に対して指定ができます。\
            \
            指定可能な値： `3`, `5`, `6`, `10`, `12`, `15`, `18`, `20`, `24`
      required:
        - pay_type
        - access_id
        - method
    Payment.Amazonpay.Reauthorizing.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別    この決済で利用する決済手段です。

            - `Amazonpay`: Amazon Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
      required:
        - pay_type
        - access_id
    Payment.Card.Reauthorizing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Card'
    Payment.GooglePay.Reauthorizing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.GooglePay'
    Payment.Amazonpay.Reauthorizing.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Amazonpay'
    Payment.Card.ChangingAmount.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Card`: カード
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [カード決済 > 制限事項 > 利用可能な金額](/payment/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [カード決済 > 制限事項 > 利用可能な金額](/payment/restriction)
        job_code:
          allOf:
            - $ref: '#/components/schemas/CardPaymentJobCode'
          enum:
            - AUTH
            - CAPTURE
          description: |
            取引種別\
            仮売上にするか即座に売上確定するかを指定します。

            - `AUTH`：仮売上
            - `CAPTURE`：即時売上
      required:
        - pay_type
        - access_id
        - job_code
        - amount
    Payment.GooglePay.ChangingAmount.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [Google Pay > 制限事項 > 利用可能な金額](/payment/googlepay/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [Google Pay > 制限事項 > 利用可能な金額](/payment/googlepay/restriction)
        job_code:
          allOf:
            - $ref: '#/components/schemas/CardPaymentJobCode'
          enum:
            - AUTH
            - CAPTURE
          description: |
            取引種別\
            仮売上にするか即座に売上確定するかを指定します。

            - `AUTH`：仮売上
            - `CAPTURE`：即時売上
      required:
        - pay_type
        - access_id
        - job_code
        - amount
    update_description:
      type: string
      nullable: true
      maxLength: 100
      example: ○○の変更の適用
      description: |
        金額変更の説明\
        購入者のPayPayアプリ上で表示される金額変更の説明。
    Payment.PayPay.ChangingAmount.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Paypay`: PayPay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 9
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [PayPay > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/paypay/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 9
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [PayPay > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/paypay/restriction)
        update_description:
          allOf:
            - $ref: '#/components/schemas/update_description'
      required:
        - pay_type
        - access_id
        - amount
    Payment.DirectDebit.ChangingAmount.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Directdebit`: 口座振替
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 10
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [口座振替 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/directdebit/restriction)
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 10
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。\
            参照： [口座振替 > 制限事項 > 利用可能な金額](https://docs.fincode.jp/payment/directdebit/restriction)
      required:
        - pay_type
        - access_id
        - amount
    Payment.Amazonpay.ChangingAmount.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別    この決済で利用する決済手段です。

            - `Amazonpay`: Amazon Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            変更後の利用金額\
            `tax`との合計値が7桁以内である必要があります。
        tax:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            変更後の税送料\
            指定しなかった場合は`0`で更新されます。
      required:
        - pay_type
        - access_id
        - amount
    Payment.Card.ChangingAmount.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Card'
    Payment.GooglePay.ChangingAmount.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.GooglePay'
    Payment.PayPay.ChangingAmount.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.PayPay'
    Payment.DirectDebit.ChangingAmount.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.DirectDebit'
    Payment.Amazonpay.ChangingAmount.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Amazonpay'
    Payment.Card.ExecutingAfterThreeDSecure.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別  
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pa_res:
          type: string
          deprecated: true
          description: |
            ※ 閉塞機能\
            3Dセキュアサービス結果電文\
            \
            3Dセキュア1.0利用時のみ必須。
      required:
        - pay_type
        - access_id
    Payment.Card.ExecutingAfterThreeDSecure.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Card'
    Payment.Konbini.GeneratingBarcode.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Konbini`: コンビニ決済
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        device_name:
          allOf:
            - $ref: '#/components/schemas/device_name'
        win_width:
          allOf:
            - $ref: '#/components/schemas/win_width'
        win_height:
          allOf:
            - $ref: '#/components/schemas/win_height'
        pixel_ratio:
          allOf:
            - $ref: '#/components/schemas/pixel_ratio'
        win_size_type:
          allOf:
            - $ref: '#/components/schemas/win_size_type'
      required:
        - pay_type
        - access_id
        - device_name
        - win_width
        - win_height
        - pixel_ratio
        - win_size_type
    Payment.Konbini.GeneratingBarcode.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.Konbini'
    expiry_date:
      type: string
      nullable: true
      example: 2022/05/16 23:59:59
      description: |
        支払期限\
        支払依頼リクエストAPIで、購入者が支払いを行える期限を指定します。\
        形式： `yyyy/MM/dd HH:mm:ss`\
        \
        指定しなかった場合、支払期限はPayPayの既定値（支払依頼から6時間）となります。\
        指定できる範囲はPayPayの仕様に従います（現在時刻から10分より後、48時間より前）。範囲外の日時を指定した場合はエラーとなります。
    Payment.PayPay.PaymentRequesting.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Paypay`: PayPay
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            指定した場合、この決済に紐づく顧客IDを指定した値で更新します。
        expiry_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/expiry_date'
      required:
        - pay_type
    Payment.PayPay.PaymentRequesting.Response:
      allOf:
        - $ref: '#/components/schemas/Payment'
        - $ref: '#/components/schemas/Payment.PayPay'
    Payment.LogRetrieving.QueryParams:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            ログを取得する対象の決済の決済種別を指定します。
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            指定しなかった場合は`process_date␣asc`でソートされます。\
            \
            ソート可能な項目

            - `process_date`: 処理日時
      required:
        - pay_type
    Payment_properties-process_date:
      type: string
      example: 2022/01/01 12:34:56.789
      description: |
        決済 処理日時\
        決済の各種処理（決済実行、キャンセルなど）が行われた日時です。
    job_code:
      type: string
      enum:
        - AUTH
        - CAPTURE
        - CANCEL
        - CHANGE
      example: CAPTURE
      description: |
        取引種別

        - `AUTH`：仮売上
        - `CAPTURE`：即時売上／売上確定
        - `CANCEL`：キャンセル
        - `CHANGE`：金額変更
    properties-amount:
      type: integer
      nullable: false
      example: 1000
      description: |
        利用金額
    properties-tax:
      type: integer
      nullable: false
      example: 100
      description: |
        税送料
    total_amount:
      type: integer
      format: int64
      nullable: false
      example: 1100
      description: |
        合計金額\
        `amount`と`tax`の合計値です。
    customer_group_id:
      type: string
      nullable: true
      minLength: 13
      maxLength: 13
      example: cg_**********
      description: |
        顧客情報共有グループID\
        プラットフォームショップにおいて顧客情報が共有されている場合、顧客が所属する共有グループのIDです。
    Payment_properties-customer_id:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/id'
      description: |
        顧客ID\
        この決済の請求先となる顧客情報のIDです。
    Payment.Amazonpay_properties-redirect_url:
      type: string
      nullable: true
      minLength: 1
      maxLength: 256
      example: https://your-service.example.com/on-payment-complete
      description: |
        リダイレクトURL\
        Amazon Pay上での購入者の操作が完了した際のリダイレクト先URLです。
    start_limit_time:
      type: string
      nullable: true
      example: 2026/10/01 12:34:56.789
      description: |
        決済処理開始期限\
        `start_url`へのアクセス期限です。この期限を過ぎるとAmazon Pay上での決済を開始できません。\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    sales_limit_time:
      type: string
      nullable: true
      example: 2026/10/31 12:34:56.789
      description: |
        売上確定処理期限\
        仮売上（`AUTHORIZED`）に対して売上確定を行える期限です。\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    amazonpay_charge_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      example: S01-0000000-0000000-C000000
      description: |
        Amazon チャージID\
        Amazon Payのチャージ（Charge）のIDです。1回の請求（オーソリ・売上確定）を表します。
    amazonpay_refund_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      example: S01-0000000-0000000-R000000
      description: |
        Amazon 返金ID\
        Amazon Payの返金（Refund）のIDです。売上確定後のキャンセル（返金）を行った場合に設定されます。
    amazonpay_buyer_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 42
      example: amzn1.account.AAAAAAAAAAAAAAAAAAAAAAAAAAA
      description: |
        Amazon バイヤーID\
        購入者のAmazon Payアカウントを一意に識別するIDです。
    properties-client_field_1:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/client_field_n'
      description: |
        加盟店自由項目 1
    properties-client_field_2:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/client_field_n'
      description: |
        加盟店自由項目 2
    properties-client_field_3:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/client_field_n'
      description: |
        加盟店自由項目 3
    Payment_properties-error_code:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/error_code'
      description: |
        この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
        [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
    start_flag:
      type: string
      nullable: true
      enum:
        - '0'
        - '1'
      example: '1'
      description: |
        決済開始済みフラグ\
        購入者がAmazon Pay上での決済を開始したかどうかを示すフラグです。

        - `0`：決済開始未実施
        - `1`：決済開始済み
    Payment.Amazonpay.LogRetrieving.Response:
      type: object
      properties:
        list:
          type: array
          description: |
            決済ログリスト\
            決済に対して行われた処理1件につき1オブジェクトが格納されます。
          items:
            type: object
            properties:
              shop_id:
                $ref: '#/components/schemas/Shop_properties-id'
              id:
                $ref: '#/components/schemas/Payment_properties-id'
              pay_type:
                allOf:
                  - $ref: '#/components/schemas/PayType'
                description: |
                  決済種別    この決済で利用する決済手段です。

                  - `Amazonpay`: Amazon Pay
              status:
                allOf:
                  - $ref: '#/components/schemas/PaymentAmazonpayStatus'
              access_id:
                $ref: '#/components/schemas/access_id'
              process_date:
                $ref: '#/components/schemas/Payment_properties-process_date'
              job_code:
                $ref: '#/components/schemas/job_code'
              amount:
                $ref: '#/components/schemas/properties-amount'
              tax:
                $ref: '#/components/schemas/properties-tax'
              total_amount:
                $ref: '#/components/schemas/total_amount'
              customer_group_id:
                $ref: '#/components/schemas/customer_group_id'
              customer_id:
                $ref: '#/components/schemas/Payment_properties-customer_id'
              redirect_url:
                $ref: '#/components/schemas/Payment.Amazonpay_properties-redirect_url'
              start_limit_time:
                $ref: '#/components/schemas/start_limit_time'
              sales_limit_time:
                $ref: '#/components/schemas/sales_limit_time'
              payment_method_id:
                $ref: '#/components/schemas/payment_method_id'
              amazonpay_seller_id:
                $ref: '#/components/schemas/amazonpay_seller_id'
              amazonpay_checkout_session_id:
                $ref: '#/components/schemas/amazonpay_checkout_session_id'
              amazonpay_charge_permission_id:
                $ref: '#/components/schemas/amazonpay_charge_permission_id'
              amazonpay_charge_id:
                $ref: '#/components/schemas/amazonpay_charge_id'
              amazonpay_refund_id:
                $ref: '#/components/schemas/amazonpay_refund_id'
              amazonpay_buyer_id:
                $ref: '#/components/schemas/amazonpay_buyer_id'
              amazonpay_reason_code:
                $ref: '#/components/schemas/amazonpay_reason_code'
              client_field_1:
                $ref: '#/components/schemas/properties-client_field_1'
              client_field_2:
                $ref: '#/components/schemas/properties-client_field_2'
              client_field_3:
                $ref: '#/components/schemas/properties-client_field_3'
              error_code:
                $ref: '#/components/schemas/Payment_properties-error_code'
              start_flag:
                $ref: '#/components/schemas/start_flag'
              created:
                $ref: '#/components/schemas/created'
    AccessId_schema:
      type: string
      example: a_**********************
    ThreeDSecure2TransactionResult:
      type: string
      enum:
        - 'Y'
        - A
        - C
        - 'N'
        - U
        - R
      minLength: 1
      maxLength: 1
      description: |
        3Dセキュア2.0認証処理 結果

        - `Y`: 認証に成功
        - `A`: 認証の試行が認められた<br><span class="smallText">認証 / 確認は行われなかったが、認証 / 確認を試行したことの証拠は提供されている</span>
        - `C`: 追加のチャレンジ認証が必要<br><span class="smallText">購入者による`challenge_url`上での追加認証が必要</span>
        - `N`: 取引拒否もしくは未認証・口座未確認
        - `R`: 認証・口座確認拒否<br><span class="smallText">カード発行会社が認証を拒否し、承認を試行しないよう要求している</span>
        - `U`: 認証・口座確認の実行失敗または技術的な問題
    ThreeDSecure2TransactionResultReason:
      type: string
      enum:
        - '01'
        - '02'
        - '03'
        - '04'
        - '05'
        - '06'
        - '07'
        - '08'
        - '09'
        - '11'
        - '12'
        - '13'
        - '14'
        - '15'
        - '16'
        - '17'
        - '18'
        - '19'
        - '20'
        - '21'
        - '22'
        - '23'
        - '24'
        - '25'
        - '26'
        - 80...99
      example: '01'
      minLength: 1
      maxLength: 2
      description: |
        3Dセキュア認証結果の理由コード\
        \
        3Dセキュア認証2.0の結果（`tds2_trans_result`）の理由を示すコードです。

        - `01`: カード認証に失敗
        - `02`: 不明なデバイス
        - `03`: サポートされていないデバイス
        - `04`: 認証頻度の上限を超えた
        - `05`: 有効期限切れのカード
        - `06`: 無効なカード番号
        - `07`: 無効な取引
        - `08`: カードのレコードが存在しない
        - `09`: セキュリティ障害
        - `10`: 盗難カード
        - `11`: 不正の疑い
        - `12`: カード会員に取引が許可されていない
        - `13`: カード会員がサービスに登録されていない
        - `14`: 取引が3Dセキュア処理サービスでタイムアウトした
        - `15`: 信頼度が低い
        - `16`: 信頼度が中程度
        - `17`: 信頼度が高い
        - `18`: 信頼度が非常に高い
        - `19`: 3Dセキュア処理サービスの最大チャレンジを超える
        - `20`: 非決済取引はサポートされていません
        - `21`: 3RIトランザクションはサポートされていません
        - `22`: 3Dセキュア処理サービスの技術的な問題
        - `23`: 3Dセキュア処理サービスによってDecoupled認証が必要と判断されたが、ThreeDSecureリクエスターからは要求されていない
        - `24`: ThreeDSecure Requestor Decoupled Max Timeを超過
        - `25`: Decoupled認証のためのカード会員を認証するのに十分な時間が与えられなかった
        - `26`: 認証は試行されたが、カード会員によって実行されなかった
    ThreeDSecureTransResult:
      type: object
      properties:
        tds2_trans_result:
          allOf:
            - $ref: '#/components/schemas/ThreeDSecure2TransactionResult'
        tds2_trans_result_reason:
          allOf:
            - $ref: '#/components/schemas/ThreeDSecure2TransactionResultReason'
    ThreeDSecure.Confirming.Response:
      allOf:
        - type: object
          properties:
            pay_type:
              type: string
              enum:
                - Card
                - Googlepay
              default: Card
              description: |
                決済種別  
                この決済で利用する決済手段です。未指定の場合、`Card`となります。

                - `Card`: カード（デフォルト）
                - `Googlepay`: Google Pay
        - $ref: '#/components/schemas/ThreeDSecureTransResult'
    param:
      type: string
      minLength: 1
      maxLength: 2000
      example: ew0KICAgICJicm93c2VyQWNjZXB0SGVhZGVyIjogInRleHQvaHRtbCxhcHBsaWNhdGlvbi94aHRtbCt4bWwsYXBwbGljYXRpb24veG1sO3E9MC45LGltYWdlL2F2aWYsaW1hZ2Uvd2VicCxpbWFnZS9hcG5nLCovKjtxPTAuOCxhcHBsaWNhdGlvbi9zaWduZWQtZXhjaGFuZ2U7dj1iMztxPTAuNyIsDQogICAgImJyb3dzZXJJUCI6ICIxOTIuMTY4LngueCIsDQogICAgImJyb3dzZXJKYXZhRW5hYmxlZCI6IGZhbHNlLA0KICAgICJicm93c2VyTGFuZ3VhZ2UiOiAiamEtSlAiLA0KICAgICJicm93c2VySmF2YXNjcmlwdEVuYWJsZWQiOiB0cnVlLA0KICAgICJicm93c2VyQ29sb3JEZXB0aCI6ICJ7e0NvbG9yIGRlcHRofX0iLA0KICAgICJicm93c2VyU2NyZWVuSGVpZ2h0IjogInt7U2NyZWVuIGhlaWdodH19IiwNCiAgICAiYnJvd3NlclNjcmVlbldpZHRoIjogInt7U2NyZWVuIHdpZHRofX0iLA0KICAgICJicm93c2VyVFoiOiAiLTU0MCIsDQogICAgImJyb3dzZXJVc2VyQWdlbnQiOiAiTW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTVfNykgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEyMi4wLjAuMCBTYWZhcmkvNTM3LjM2Ig0KfQ0K
      description: |
        ブラウザ情報\
        \
        購入者が`acs_url`にアクセスしたことをトリガーにfincodeが`tds2_ret_url`宛てに送信するデータのうち、`param`の値を設定します。
    ThreeDSecure.Authorizing.Request:
      type: object
      properties:
        pay_type:
          type: string
          enum:
            - Card
            - Googlepay
          default: Card
          description: |
            決済種別  
            この決済で利用する決済手段です。未指定の場合、`Card`となります。

            - `Card`: カード（デフォルト）
            - `Googlepay`: Google Pay
        param:
          allOf:
            - $ref: '#/components/schemas/param'
      required:
        - param
    ThreeDSecure.Authorizing.Response:
      allOf:
        - type: object
          properties:
            pay_type:
              type: string
              enum:
                - Card
                - Googlepay
              default: Card
              description: |
                決済種別  
                この決済で利用する決済手段です。未指定の場合、`Card`となります。

                - `Card`: カード（デフォルト）
                - `Googlepay`: Google Pay
            challenge_url:
              type: string
              nullable: true
              minLength: 1
              maxLength: 256
              description: |
                3Dセキュア2.0認証チャレンジURL\
                \
                購入者による`acs_url`へのアクセス後、カード発行会社によって追加のチャレンジ認証が必要と判定された場合、このパラメータにURLが設定されて返却されます。
        - $ref: '#/components/schemas/ThreeDSecureTransResult'
    PaymentSessionPayType:
      type: string
      enum:
        - Card
        - Konbini
        - Paypay
        - Virtualaccount
        - Amazonpay
      description: |
        決済方法\
        このリダイレクト型決済で利用できる決済方法です。\
        \
        - `Card`：カード決済\
        - `Konbini`：コンビニ決済\
        - `Paypay`：PayPay
        - `Virtualaccount`：バーチャル口座決済
        - `Amazonpay`：Amazon Pay
    pay_type:
      type: array
      nullable: false
      items:
        allOf:
          - $ref: '#/components/schemas/PaymentSessionPayType'
      description: |
        決済手段\
        この決済URL上で使用できる決済手段を指定します。複数指定可能です。

        - `Card`：カード決済
        - `Konbini`：コンビニ決済
        - `Paypay`：PayPay
        - `Virtualaccount`：バーチャル口座決済
        - `Amazonpay`：Amazon Pay
    CardPaymentSessionJobCode:
      type: string
      enum:
        - AUTH
        - CAPTURE
      example: CAPTURE
      default: AUTH
      description: |
        取引種別\
        この決済URL上でカード決済を行った際、仮売上にするか即座に売上確定するか指定します。

        - `AUTH`：仮売上にする（デフォルト）
        - `CAPTURE`：即時売上
    PaymentSession.Konbini_x-req-properties-payment_term_day:
      type: string
      nullable: true
      minLength: 1
      maxLength: 3
      example: '2'
      description: |
        コンビニ決済 支払期限日数\
        店頭レジでの支払い期限日数です。
    konbini_reception_mail_send_flag:
      type: string
      nullable: false
      enum:
        - '0'
        - '1'
      example: '1'
      description: |
        コンビニ決済 支払い画面案内メール送信フラグ\
        コンビニ決済の支払い画面案内メールを送信するかどうかを設定します。

        - `0`：送信しない
        - `1`：送信する
    properties-order_description:
      nullable: true
      type: string
      maxLength: 100
      example: Your Shop上での購入
      description: |
        注文内容の説明\
        PayPayアプリ上で注文内容として表示されます。
    PaymentSession.VirtualAccount_x-req-properties-payment_term_day:
      type: string
      nullable: true
      minLength: 1
      maxLength: 2
      example: '90'
      description: |
        支払期限日数\
        \
        `0`～`99`日の範囲でバーチャル口座で振り込み可能な期限日数を指定します。\
        実行日から見て、支払期限日数後の翌日AMに期限切れになります。\
        例）2024/4/1に、`支払期限日数=2`で決済実行した場合、2024/4/4 AMに期限切れ
    virtualaccount_reception_mail_send_flag:
      type: string
      nullable: false
      enum:
        - '0'
        - '1'
      example: '1'
      description: |
        銀行振込（バーチャル口座） 支払い画面案内メール送信フラグ\
        銀行振込（バーチャル口座）の支払い画面案内メールを送信するかどうかを設定します。

        - `0`：送信しない
        - `1`：送信する
    properties-job_code:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/AmazonpayPaymentJobCode'
      description: |
        この決済URL上でAmazon Payによる決済を行った際、仮売上にするか即座に売上確定するか指定します。\
        指定しなかった場合は`AUTH`が設定されます。

        - `AUTH`：仮売上にする
        - `CAPTURE`：即時売上
    success_url:
      type: string
      nullable: true
      maxLength: 256
      example: https://your-service.example.com/success
      description: |
        成功時リダイレクトURL\
        `link_url`上で決済に成功すると、fincodeはこのURLにPOSTメソッドでリダイレクトします。
    cancel_url:
      type: string
      nullable: true
      maxLength: 256
      example: https://your-service.example.com/cancel
      description: |
        キャンセル時リダイレクトURL\
        `link_url`上で決済がキャンセルされると、fincodeはこのURLにPOSTメソッドでリダイレクトします。
    PaymentSession_properties-expire:
      type: string
      nullable: false
      example: 2022/02/31 23:59:59.999
      description: |
        リダイレクト型決済URL 有効期限\
        形式： `yyyy/MM/dd HH:mm:ss.SSS`
    shop_service_name:
      type: string
      nullable: true
      maxLength: 100
      example: Your Service
      description: |
        ショップ／サービス名\
        決済URL上で表示されるショップおよびサービスの名称です。\
        \
        デフォルトでは本番環境申請時に登録した「明細書表記」の値が設定されます。
    guide_mail_send_flag:
      type: string
      enum:
        - '0'
        - '1'
      nullable: false
      example: '1'
      description: |
        決済メール 送信フラグ\
        リダイレクト型決済URLをfincodeからのメール送信機能で送信したかどうかを示します。

        - `0`：送信しなかった（デフォルト）
        - `1`：送信した
    receiver_mail:
      type: string
      nullable: true
      maxLength: 254
      example: receiver-email@example.com
      description: |
        決済メール 送信先メールアドレス\
        リダイレクト型決済URLをfincodeからのメール送信機能で送信する場合の送信先メールアドレスです。
    mail_customer_name:
      type: string
      nullable: true
      maxLength: 384
      example: 買物 太郎
      description: |
        購入メール 購入者の名前\
        リダイレクト型決済URLをfincodeからのメール送信機能で送信する場合のメール中で用いられる購入者の名前です。\
        \
        fincodeが提供するデフォルトのメールテンプレートでは敬称がテンプレート側に含まれています。
    thanks_mail_send_flag:
      type: string
      enum:
        - '0'
        - '1'
      nullable: false
      description: |
        完了メール 送信フラグ\
        決済が完了した際に購入者に完了メールを送信するかどうかを示します。

        - `0`：送信しない（デフォルト）
        - `1`：送信する
    shop_mail_template_id:
      type: string
      nullable: true
      maxLength: 25
      example: null
      description: |
        メールテンプレートID\
        メールテンプレートIDが設定されている場合、リダイレクト型決済URLの送信先メールアドレスに送信されるメールのテンプレートが変更されます。\
        \
        fincodeが提供するデフォルトのメールテンプレートを使用する場合は`null`を設定します。
    PaymentSession.Creating.Request:
      type: object
      properties:
        transaction:
          type: object
          description: |
            決済共通項目\
            決済手段を問わず共通して使用される決済に関するパラメータです。
          properties:
            pay_type:
              nullable: true
              default:
                - Card
              allOf:
                - $ref: '#/components/schemas/pay_type'
            amount:
              type: string
              minLength: 1
              maxLength: 10
              example: '1000'
              description: |
                決済金額\
                決済金額を指定します。\
                \
                指定可能な金額の範囲は各決済手段ごとの制限事項に準じます。
            order_id:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/Payment_properties-id'
              description: |
                オーダーID\
                このリダイレクト型決済URL上で決済後生成される決済情報のIDを予め指定できます。
            tax:
              nullable: true
              default: null
              type: string
              minLength: 1
              maxLength: 10
              example: '100'
              description: |
                税送料\
                税送料を指定します。\
                \
                指定可能な金額の範囲は各決済手段ごとの制限事項に準じます。
            client_field_1:
              nullable: true
              default: null
              allOf:
                - $ref: '#/components/schemas/client_field_n'
              description: |
                加盟店自由項目 1
            client_field_2:
              nullable: true
              default: null
              allOf:
                - $ref: '#/components/schemas/client_field_n'
              description: |
                加盟店自由項目 2
            client_field_3:
              nullable: true
              default: null
              allOf:
                - $ref: '#/components/schemas/client_field_n'
              description: |
                加盟店自由項目 3
          required:
            - amount
        card:
          type: object
          nullable: true
          description: |
            カード決済パラメータ\
            `pay_type`に`Card`を含めた場合に用いられる、カード決済に関するパラメータです。
          properties:
            job_code:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/CardPaymentSessionJobCode'
            tds_type:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds_type'
            tds2_type:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_type'
            td_tenant_name:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/td_tenant_name'
            tds2_ch_acc_change:
              allOf:
                - $ref: '#/components/schemas/tds2_ch_acc_change'
            tds2_ch_acc_date:
              allOf:
                - $ref: '#/components/schemas/tds2_ch_acc_date'
            tds2_ch_acc_pw_change:
              allOf:
                - $ref: '#/components/schemas/tds2_ch_acc_pw_change'
            tds2_nb_purchase_account:
              allOf:
                - $ref: '#/components/schemas/tds2_nb_purchase_account'
            tds2_payment_acc_age:
              allOf:
                - $ref: '#/components/schemas/tds2_payment_acc_age'
            tds2_provision_attempts_day:
              allOf:
                - $ref: '#/components/schemas/tds2_provision_attempts_day'
            tds2_ship_address_usage:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_address_usage'
            tds2_ship_name_ind:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_name_ind'
            tds2_suspicious_acc_activity:
              allOf:
                - $ref: '#/components/schemas/tds2_suspicious_acc_activity'
            tds2_txn_activity_day:
              allOf:
                - $ref: '#/components/schemas/tds2_txn_activity_day'
            tds2_txn_activity_year:
              allOf:
                - $ref: '#/components/schemas/tds2_txn_activity_year'
            tds2_three_ds_req_auth_data:
              allOf:
                - $ref: '#/components/schemas/tds2_three_ds_req_auth_data'
            tds2_three_ds_req_auth_method:
              allOf:
                - $ref: '#/components/schemas/tds2_three_ds_req_auth_method'
            tds2_three_ds_req_auth_timestamp:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/tds2_three_ds_req_auth_timestamp'
            tds2_email:
              allOf:
                - $ref: '#/components/schemas/tds2_email'
            tds2_addr_match:
              allOf:
                - $ref: '#/components/schemas/tds2_addr_match'
            tds2_bill_addr_country:
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_country'
            tds2_bill_addr_state:
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_state'
            tds2_bill_addr_city:
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_city'
            tds2_bill_addr_line_1:
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_line_1'
            tds2_bill_addr_line_2:
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_line_2'
            tds2_bill_addr_line_3:
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_line_3'
            tds2_bill_addr_post_code:
              allOf:
                - $ref: '#/components/schemas/tds2_bill_addr_post_code'
            tds2_ship_addr_country:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_country'
            tds2_ship_addr_state:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_state'
            tds2_ship_addr_city:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_city'
            tds2_ship_addr_line_1:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_line_1'
            tds2_ship_addr_line_2:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_line_2'
            tds2_ship_addr_line_3:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_line_3'
            tds2_ship_addr_post_code:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_addr_post_code'
            tds2_ship_ind:
              allOf:
                - $ref: '#/components/schemas/tds2_ship_ind'
            tds2_delivery_email_address:
              allOf:
                - $ref: '#/components/schemas/tds2_delivery_email_address'
            tds2_home_phone_cc:
              allOf:
                - $ref: '#/components/schemas/tds2_home_phone_cc'
            tds2_home_phone_no:
              allOf:
                - $ref: '#/components/schemas/tds2_home_phone_no'
            tds2_mobile_phone_cc:
              allOf:
                - $ref: '#/components/schemas/tds2_mobile_phone_cc'
            tds2_mobile_phone_no:
              allOf:
                - $ref: '#/components/schemas/tds2_mobile_phone_no'
            tds2_work_phone_cc:
              allOf:
                - $ref: '#/components/schemas/tds2_work_phone_cc'
            tds2_work_phone_no:
              allOf:
                - $ref: '#/components/schemas/tds2_work_phone_no'
            tds2_delivery_timeframe:
              allOf:
                - $ref: '#/components/schemas/tds2_delivery_timeframe'
            tds2_pre_order_date:
              allOf:
                - $ref: '#/components/schemas/tds2_pre_order_date'
            tds2_pre_order_purchase_ind:
              allOf:
                - $ref: '#/components/schemas/tds2_pre_order_purchase_ind'
            tds2_reorder_items_ind:
              allOf:
                - $ref: '#/components/schemas/tds2_reorder_items_ind'
            tds2_recurring_expiry:
              allOf:
                - $ref: '#/components/schemas/tds2_recurring_expiry'
            tds2_recurring_frequency:
              allOf:
                - $ref: '#/components/schemas/tds2_recurring_frequency'
            tds2_gift_card_amount:
              allOf:
                - $ref: '#/components/schemas/tds2_gift_card_amount'
            tds2_gift_card_count:
              allOf:
                - $ref: '#/components/schemas/tds2_gift_card_count'
            tds2_gift_card_curr:
              allOf:
                - $ref: '#/components/schemas/tds2_gift_card_curr'
          required:
            - job_code
        konbini:
          type: object
          nullable: true
          description: |
            コンビニ決済パラメータ\
            `pay_type`に`Konbini`を含めた場合に用いられる、コンビニ決済に関するパラメータです。
          properties:
            payment_term_day:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/PaymentSession.Konbini_x-req-properties-payment_term_day'
            konbini_reception_mail_send_flag:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/konbini_reception_mail_send_flag'
          required:
            - konbini_reception_mail_send_flag
        paypay:
          type: object
          nullable: true
          description: |
            PayPayパラメータ\
            `pay_type`に`Paypay`を含めた場合に用いられる、PayPayによる決済に関するパラメータです。
          properties:
            job_code:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/PayPayPaymentJobCode'
              description: |
                この決済URL上でPayPayによる決済を行った際、仮売上にするか即座に売上確定するか指定します。

                - `AUTH`：仮売上にする
                - `CAPTURE`：即時売上
            order_description:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/properties-order_description'
          required:
            - job_code
        virtualaccount:
          type: object
          nullable: true
          description: |
            銀行振込（バーチャル口座）パラメータ\
            `pay_type`に`Virtualaccount`を含めた場合に用いられる、銀行振込（バーチャル口座）に関するパラメータです。
          properties:
            payment_term_day:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/PaymentSession.VirtualAccount_x-req-properties-payment_term_day'
            virtualaccount_reception_mail_send_flag:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/virtualaccount_reception_mail_send_flag'
            reference_order_id:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/reference_order_id'
            use_exact_deposit_amount:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/use_exact_deposit_amount'
          required:
            - virtualaccount_reception_mail_send_flag
        amazonpay:
          type: object
          nullable: true
          description: |
            Amazon Payパラメータ\
            `pay_type`に`Amazonpay`を含めた場合に用いられる、Amazon Payによる決済に関するパラメータです。
          properties:
            job_code:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/properties-job_code'
            merchant_store_name:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/x-req-properties-merchant_store_name'
            note_to_buyer:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/x-req-properties-note_to_buyer'
            product_type:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/AmazonpayProductType'
            shipping:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/shipping'
          required:
            - note_to_buyer
            - product_type
        success_url:
          nullable: true
          example: https://your-service.example.com/success
          allOf:
            - $ref: '#/components/schemas/success_url'
        cancel_url:
          nullable: true
          example: https://your-service.example.com/cancel
          allOf:
            - $ref: '#/components/schemas/cancel_url'
        expire:
          allOf:
            - $ref: '#/components/schemas/PaymentSession_properties-expire'
          nullable: true
          description: |
            リダイレクト型決済URL 有効期限\
            形式： `yyyy/MM/dd HH:mm:ss`

            - デフォルト： URL発行時点から24時間
            - 最長： 60日
            - 最短： 5分
        shop_service_name:
          nullable: true
          example: Your Service
          allOf:
            - $ref: '#/components/schemas/shop_service_name'
        guide_mail_send_flag:
          nullable: true
          default: '0'
          example: '1'
          allOf:
            - $ref: '#/components/schemas/guide_mail_send_flag'
          description: |
            決済メール 送信フラグ\
            リダイレクト型決済URLを添付したメールをfincodeから送信するかどうかを指定します。

            - `0`：送信しない（デフォルト）
            - `1`：送信する
        receiver_mail:
          nullable: true
          example: receiver-email@example.com
          allOf:
            - $ref: '#/components/schemas/receiver_mail'
        mail_customer_name:
          nullable: true
          example: 買物 太郎
          allOf:
            - $ref: '#/components/schemas/mail_customer_name'
        thanks_mail_send_flag:
          default: '0'
          example: '1'
          allOf:
            - $ref: '#/components/schemas/thanks_mail_send_flag'
          nullable: true
        shop_mail_template_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/shop_mail_template_id'
      required:
        - transaction
    PaymentSessionStatus:
      type: string
      enum:
        - CREATE
      maxLength: 10
      nullable: false
      example: CREATE
      description: |
        ステータス\
        リダイレクト型決済URLのステータスを表します。

        - `CREATE`：決済URLが作成された状態
    PaymentSession.Card:
      type: object
      properties:
        job_code:
          $ref: '#/components/schemas/CardPaymentSessionJobCode'
        tds_type:
          nullable: true
          $ref: '#/components/schemas/tds_type'
        td_tenant_name:
          nullable: true
          $ref: '#/components/schemas/td_tenant_name'
        tds2_type:
          nullable: true
          $ref: '#/components/schemas/tds2_type'
        item_code:
          type: string
          nullable: true
          maxLength: 100
          example: null
          description: |
            商品コード\
            ※ 通常は`null`
      x-req-properties:
        tds2_ch_acc_change:
          type: string
          example: '20240101'
          minLength: 8
          maxLength: 8
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            購入者ユーザーアカウント 最終更新日\
            形式：`YYYYMMDD`\
            \
            加盟店アプリケーションにおけるユーザーアカウントの情報が最後に更新された日付を設定します。
        tds2_ch_acc_date:
          type: string
          example: '20220101'
          minLength: 8
          maxLength: 8
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            購入者ユーザーアカウント 開設日\
            形式：`YYYYMMDD`\
            \
            加盟店アプリケーションにおけるユーザーアカウントの開設日を設定します。
        tds2_ch_acc_pw_change:
          type: string
          example: '20230101'
          minLength: 8
          maxLength: 8
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            購入者ユーザーアカウント パスワード最終更新日\
            形式：`YYYYMMDD`\
            \
            加盟店アプリケーションにおけるユーザーアカウントのパスワードが最後に更新された日付を設定します。
        tds2_nb_purchase_account:
          type: string
          example: '9999'
          minLength: 1
          maxLength: 4
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            購入者の過去6カ月間の購入回数
        tds2_payment_acc_age:
          type: string
          example: '20231231'
          minLength: 8
          maxLength: 8
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客ユーザーアカウント カード登録日。\
            形式：`YYYYMMDD`
        tds2_provision_attempts_day:
          type: string
          example: '999'
          minLength: 3
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客ユーザーアカウント 過去24時間のカード追加の試行回数
        tds2_ship_address_usage:
          type: string
          example: '20230930'
          minLength: 8
          maxLength: 8
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            配送先住所の最初の使用日。\
            形式：`YYYYMMDD`
        tds2_ship_name_ind:
          type: string
          enum:
            - '01'
            - '02'
          minLength: 2
          maxLength: 2
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            購入者名と配送先名が一致しているか否か\
            購入者名と登録に使用される配送先名の一致/不一致を設定

            - `01`: 顧客名と配送先名が一致
            - `02`: 顧客名と配送先名が不一致
        tds2_suspicious_acc_activity:
          type: string
          enum:
            - '01'
            - '02'
          minLength: 2
          maxLength: 2
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客ユーザーアカウント 不審行為有無\
            顧客ユーザーアカウントで、不審な行動（過去の不正行為を含む）を加盟店様が発見したかどうかを設定

            - `01`: 不審な行動なし
            - `02`: 不審な行動あり
        tds2_txn_activity_day:
          type: string
          example: '999'
          minLength: 3
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            購入者の過去24時間の取引回数
        tds2_txn_activity_year:
          type: string
          example: '999'
          minLength: 3
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            前年の取引回数
        tds2_three_ds_req_auth_data:
          type: string
          minLength: 1
          maxLength: 2048
          nullable: true
          example: null
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客ユーザーアカウント ログイン証跡\
            \
            加盟店アプリケーションにおけるログインの証跡。
            ログイン証跡を設定する場合、ログイン方法とログイン日時の設定が必要です。
        tds2_three_ds_req_auth_method:
          type: string
          enum:
            - '01'
            - '02'
            - '03'
            - '04'
            - '05'
            - '06'
          minLength: 2
          maxLength: 2
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客ユーザーアカウント ログイン方法\
            ログイン方法を設定する場合、ログイン証跡とログイン日時の設定が必要です。

            - `01`: 認証なし（ゲストとしてログイン）
            - `02`: 加盟店様自身の認証情報
            - `03`: SSO(シングルサインオン)
            - `04`: イシュアーの認証情報
            - `05`: サードパーティ認証
            - `06`: FIDO認証
        tds2_three_ds_req_auth_timestamp:
          type: string
          example: '202205191234'
          minLength: 12
          maxLength: 12
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客ユーザーアカウント ログイン日時\
            \
            ログイン証跡を設定する場合、ログイン方法とログイン日時の設定が必要です。\
            形式：`YYYYMMDDHHmm`
        tds2_email:
          type: string
          minLength: 1
          maxLength: 254
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客のメールアドレス\
            \
            未指定の場合、顧客の`email`が自動で設定されます。\
            \
            2024年8月12日以降、下記の内少なくとも1つが必須となります。

            - 顧客の自宅電話番号（`tds2_home_phone_no`）
            - 顧客の携帯電話番号（`tds2_mobile_phone_no`）
            - 顧客の職場電話番号（`tds2_work_phone_no`）
            - 顧客のメールアドレス（`tds2_email`）

            ※当面は連携しなかった場合でも認証は実施されますが、将来的には利用不可になる可能性があります。
        tds2_addr_match:
          type: string
          enum:
            - 'Y'
            - 'N'
          example: 'Y'
          minLength: 1
          maxLength: 1
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            請求先住所と配送先住所が一致しているか否か

            - `Y`: 住所は一致している
            - `N`: 住所は一致していない
        tds2_bill_addr_country:
          type: string
          example: '392'
          minLength: 1
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の請求先住所 国コード\
            形式：ISO 3166-1 numeric
            \
            未指定の場合、顧客の`addr_country`が自動で設定されます。  
            ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
            ※住所情報を保持していない場合、指定は不要です。
        tds2_bill_addr_state:
          type: string
          example: '13'
          minLength: 1
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の請求先住所 州または都道府県コード。\
            参照： [国土交通省 都道府県コード](https://nlftp.mlit.go.jp/ksj/gml/codelist/PrefCd.html)\
            \
            未指定の場合、顧客の`addr_state`が自動で設定されます。  
            ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
            ※住所情報を保持していない場合、指定は不要です。
        tds2_bill_addr_city:
          type: string
          example: 渋谷区
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の請求先住所 都市名\
            \
            未指定の場合、顧客の`addr_city`が自動で設定されます。  
            ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
            ※住所情報を保持していない場合、指定は不要です。
        tds2_bill_addr_line_1:
          type: string
          example: 道玄坂1-14-6
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の請求先住所 区域部1行目\
            \
            顧客の住所の番地・区画を指定してください。未指定の場合。顧客の`addr_line_1`が自動で設定されます。

            - 都道府県や市区を含めることができます。
            - 保持している住所をパラメータの形式に分割できない場合は、桁数が収まるように`tds2_bill_addr_line_1` ~ `tds2_bill_addr_line_3`に住所を設定してください。
            - `tds2_bill_addr_line_2`と`tds2_bill_addr_line_3`を空にして、`tds2_bill_addr_line_1`に全ての住所を設定できます。

            未指定の場合、顧客に登録された`addr_line_1`を設定します。  
            ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
            ※住所情報を保持していない場合、指定は不要です。
        tds2_bill_addr_line_2:
          type: string
          example: ヒューマックス渋谷ビル
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の請求先住所 区域部2行目\
            \
            顧客の住所の建物名・部屋番号を指定してください。未指定の場合、顧客に登録された`addr_line_2`を設定します。
        tds2_bill_addr_line_3:
          type: string
          example: 7F
          minLength: 1
          maxLength: 50
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の請求先住所 区域部3行目\
            \
            顧客の住所のその他を指定してください。未指定の場合、顧客に登録された`addr_line_3`を設定します。
        tds2_bill_addr_post_code:
          type: string
          example: 150-0043
          minLength: 1
          maxLength: 16
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の請求先住所 郵便番号\
            \
            未指定の場合、顧客に登録された`addr_post_code`を設定します。  
            ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
            ※住所情報を保持していない場合、指定は不要です。
        tds2_ship_addr_country:
          type: string
          example: '392'
          minLength: 1
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の配送先住所 国コード。\
            形式：ISO 3166-1 numeric
        tds2_ship_addr_state:
          type: string
          example: '13'
          minLength: 1
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の配送先住所 州または都道府県コード。\
            参照： [国土交通省 都道府県コード](https://nlftp.mlit.go.jp/ksj/gml/codelist/PrefCd.html)
        tds2_ship_addr_city:
          type: string
          example: 渋谷区
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の配送先住所 都市名
        tds2_ship_addr_line_1:
          type: string
          example: 道玄坂1-14-6
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の配送先住所 区域部1行目
        tds2_ship_addr_line_2:
          type: string
          example: ヒューマックス渋谷ビル
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の配送先住所 区域部2行目
        tds2_ship_addr_line_3:
          type: string
          example: 7F
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の配送先住所 区域部3行目
        tds2_ship_addr_post_code:
          type: string
          example: 150-0043
          minLength: 1
          maxLength: 16
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の配送先住所 郵便番号
        tds2_ship_ind:
          type: string
          enum:
            - '01'
            - '02'
            - '03'
            - '04'
            - '05'
            - '06'
            - '07'
          example: '01'
          minLength: 2
          maxLength: 2
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            取引商品の配送方法

            - `01`: 顧客の請求先住所に配送
            - `02`: 加盟店が保持している確認済み住所（請求先住所でない）に配送
            - `03`: 顧客の請求先住所と異なる住所に配送
            - `04`: 店舗への配送（店舗の住所は配送先住所で指定）
            - `05`: デジタル商品（オンラインサービス、電子ギフトカードおよび償還コードを含む）
            - `06`: 配送なし（旅行およびイベントのチケット）
            - `07`: その他（ゲーム、配送されないデジタルサービス、電子メディアの購読料など）
        tds2_delivery_email_address:
          type: string
          example: email@example.com
          minLength: 1
          maxLength: 254
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客 メールアドレス
        tds2_home_phone_cc:
          type: string
          example: '81'
          minLength: 1
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の自宅電話番号の国コード（+を含まない）\
            ※ この値を設定する場合、`tds2_home_phone_no`の設定が必要です。\
            \
            未指定の場合、顧客の`phone_cc`が自動で設定されます。
        tds2_home_phone_no:
          type: string
          example: '312345678'
          minLength: 1
          maxLength: 15
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の自宅電話番号（ハイフンなし半角数字のみ）\
            ※ この値を設定する場合、`tds2_home_phone_cc`の設定が必要です。\
            \
            未指定の場合、顧客の`phone_no`が自動で設定されます。\
            \
            2024年8月12日以降、下記の内少なくとも1つが必須となります。

            - 顧客の自宅電話番号（`tds2_home_phone_no`）
            - 顧客の携帯電話番号（`tds2_mobile_phone_no`）
            - 顧客の職場電話番号（`tds2_work_phone_no`）
            - 顧客のメールアドレス（`tds2_email`）

            ※当面は連携しなかった場合でも認証は実施されますが、将来的には利用不可になる可能性があります。
        tds2_mobile_phone_cc:
          type: string
          example: '81'
          minLength: 1
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の携帯電話番号の国コード（+を含まない）\
            ※ この値を設定する場合、`tds2_mobile_phone_no`の設定が必要です。
        tds2_mobile_phone_no:
          type: string
          example: '9012345678'
          minLength: 1
          maxLength: 15
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の携帯電話番号（ハイフンなし半角数字のみ）\
            ※ この値を設定する場合、`tds2_mobile_phone_cc`の設定が必要です。\
            \
            2024年8月12日以降、下記の内少なくとも1つが必須となります。

            - 顧客の自宅電話番号（`tds2_home_phone_no`）
            - 顧客の携帯電話番号（`tds2_mobile_phone_no`）
            - 顧客の職場電話番号（`tds2_work_phone_no`）
            - 顧客のメールアドレス（`tds2_email`）

            ※当面は連携しなかった場合でも認証は実施されますが、将来的には利用不可になる可能性があります。
        tds2_work_phone_cc:
          type: string
          example: '81'
          minLength: 1
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の勤務先電話番号の国コード（+を含まない）\
            ※ この値を設定する場合、`tds2_work_phone_no`の設定が必要です。
        tds2_work_phone_no:
          type: string
          example: '312345678'
          minLength: 1
          maxLength: 15
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            顧客の勤務先電話番号（ハイフンなし半角数字のみ）\
            ※ この値を設定する場合、`tds2_work_phone_cc`の設定が必要です。\
            \
            2024年8月12日以降、下記の内少なくとも1つが必須となります。

            - 顧客の自宅電話番号（`tds2_home_phone_no`）
            - 顧客の携帯電話番号（`tds2_mobile_phone_no`）
            - 顧客の職場電話番号（`tds2_work_phone_no`）
            - 顧客のメールアドレス（`tds2_email`）

            ※当面は連携しなかった場合でも認証は実施されますが、将来的には利用不可になる可能性があります。
        tds2_delivery_timeframe:
          type: string
          enum:
            - '01'
            - '02'
            - '03'
            - '04'
          example: '01'
          minLength: 2
          maxLength: 2
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            商品納品時間枠

            - `01`: 電子デリバリー
            - `02`: 当日出荷
            - `03`: 翌日出荷
            - `04`: 2日目以降の出荷
        tds2_pre_order_date:
          type: string
          example: '20231231'
          minLength: 8
          maxLength: 8
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            商品の発売予定日\
            形式：`YYYYMMDD`
        tds2_pre_order_purchase_ind:
          type: string
          enum:
            - '01'
            - '02'
          example: '01'
          minLength: 2
          maxLength: 2
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            商品の販売時期情報

            - `01`: 発売済み商品
            - `02`: 先行予約商品
        tds2_reorder_items_ind:
          type: string
          enum:
            - '01'
            - '02'
          example: '01'
          minLength: 2
          maxLength: 2
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            商品の注文が初回か再注文か

            - `01`: 初回注文
            - `02`: 再注文
        tds2_recurring_expiry:
          type: string
          example: '20231231'
          minLength: 8
          maxLength: 8
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            ※ サブスクリプションなど継続課金型のビジネスモデルのみ\
            継続課金の終了日\
            形式：`YYYYMMDD`
        tds2_recurring_frequency:
          type: string
          example: '99'
          minLength: 1
          maxLength: 4
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            ※ サブスクリプションなど継続課金型のビジネスモデルのみ\
            継続課金の課金間隔の日数（最小）
        tds2_gift_card_amount:
          type: string
          example: '999999'
          minLength: 1
          maxLength: 15
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            ※ プリペイドカードまたはギフトカードを購入する場合のみ\
            プリペイドカードまたはギフトカードの総購入金額
        tds2_gift_card_count:
          type: string
          example: '99'
          minLength: 1
          maxLength: 2
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            ※ プリペイドカードまたはギフトカードを購入する場合のみ\
            購入したプリペイドカードまたはギフトカードの総数
        tds2_gift_card_curr:
          type: string
          example: '392'
          minLength: 1
          maxLength: 3
          nullable: true
          description: |
            <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>\
            ※ プリペイドカードまたはギフトカードを購入する場合のみ\
            プリペイドカードまたはギフトカードの通貨コード。\
            形式：ISO 4217 numeric\
            \
            以下の通貨コードは利用できません。（債券市場単位等）\
            `955`, `956`, `957`, `958`, `959`, `960`, `961`, `962`, `963`, `964`, `999`
    PaymentSession.Konbini:
      type: object
      properties:
        konbini_reception_url:
          type: string
          nullable: true
          maxLength: 256
          example: https://secure.test.fincode.jp/v1/links/lk_**********************/konbini
          description: |
            コンビニ決済 支払い画面URL
        payment_term_day:
          type: integer
          format: int64
          nullable: true
          minLength: 1
          maxLength: 3
          example: 2
          description: |
            コンビニ決済 支払期限日数\
            店頭レジでの支払い期限日数です。
        konbini_reception_mail_send_flag:
          type: string
          nullable: false
          enum:
            - '0'
            - '1'
          example: '1'
          description: |
            コンビニ決済 支払い画面案内メール送信フラグ\
            コンビニ決済の支払い画面案内メールを送信するかどうかを設定します。

            - `0`：送信しない
            - `1`：送信する
      x-req-properties:
        payment_term_day:
          type: string
          nullable: true
          minLength: 1
          maxLength: 3
          example: '2'
          description: |
            コンビニ決済 支払期限日数\
            店頭レジでの支払い期限日数です。
    PaymentSession.PayPay:
      type: object
      properties:
        job_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PayPayPaymentJobCode'
          description: |
            この決済URL上でPayPayによる決済を行った際、仮売上にするか即座に売上確定するか指定します。

            - `AUTH`：仮売上にする
            - `CAPTURE`：即時売上
        order_description:
          nullable: true
          type: string
          maxLength: 100
          example: Your Shop上での購入
          description: |
            注文内容の説明\
            PayPayアプリ上で注文内容として表示されます。
    PaymentSession.VirtualAccount:
      type: object
      properties:
        virtualaccount_reception_url:
          type: string
          nullable: true
          maxLength: 256
          example: https://secure.test.fincode.jp/v1/links/lk_**********************/virtualaccount
          description: |
            銀行振込（バーチャル口座） 支払い画面URL
        payment_term_day:
          type: integer
          format: int64
          minLength: 1
          maxLength: 2
          example: 90
          description: |
            支払期限日数\
            \
            実行日から見て、支払期限日数後の翌日AMに期限切れになります。\
            例）2024/4/1に、`支払期限日数=2`で決済実行した場合、2024/4/4 AMに期限切れ
        virtualaccount_reception_mail_send_flag:
          type: string
          nullable: false
          enum:
            - '0'
            - '1'
          example: '1'
          description: |
            銀行振込（バーチャル口座） 支払い画面案内メール送信フラグ\
            銀行振込（バーチャル口座）の支払い画面案内メールを送信するかどうかを設定します。

            - `0`：送信しない
            - `1`：送信する
        use_exact_deposit_amount:
          type: boolean
          enum:
            - true
            - false
          description: |
            入金可能額設定利用フラグ\
            この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを示すフラグです。
            設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

            - `true`: 入金可能額を設定する
            - `false`: 入金可能額を設定しない（デフォルト）
      x-req-properties:
        reference_order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
          description: |
            バーチャル口座 再利用 オーダーID\
            \
            あるオーダーIDのバーチャル口座を再利用する場合、その決済のオーダーIDを参照先として指定します。\
            バーチャル口座の再利用が可能な決済の条件は以下の通りです。

            1. 参照する決済の`status`が`CAPTURED`、`CANCELED`、`EXPIRED`であること
            2. 参照する決済に紐づくバーチャル口座への振込から90日以内であること
        payment_term_day:
          type: string
          nullable: true
          minLength: 1
          maxLength: 2
          example: '90'
          description: |
            支払期限日数\
            \
            `0`～`99`日の範囲でバーチャル口座で振り込み可能な期限日数を指定します。\
            実行日から見て、支払期限日数後の翌日AMに期限切れになります。\
            例）2024/4/1に、`支払期限日数=2`で決済実行した場合、2024/4/4 AMに期限切れ
        use_exact_deposit_amount:
          type: boolean
          enum:
            - true
            - false
          description: |
            入金可能額設定利用フラグ\
            この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを指定します。\
            設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

            - `true`: 入金可能額を設定する
            - `false`: 入金可能額を設定しない（デフォルト）
    PaymentSession.Amazonpay:
      type: object
      properties:
        job_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AmazonpayPaymentJobCode'
          description: |
            この決済URL上でAmazon Payによる決済を行った際、仮売上にするか即座に売上確定するか指定します。\
            指定しなかった場合は`AUTH`が設定されます。

            - `AUTH`：仮売上にする
            - `CAPTURE`：即時売上
        merchant_store_name:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/merchant_store_name'
        note_to_buyer:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/note_to_buyer'
        product_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AmazonpayProductType'
    PaymentSession:
      type: object
      properties:
        id:
          type: string
          nullable: false
          example: lk_**********************
          minLength: 25
          maxLength: 25
          description: |
            リダイレクト型決済URL ID
        link_url:
          type: string
          nullable: false
          maxLength: 100
          example: https://secure.test.fincode.jp/v1/links/lk_**********************
          description: |
            リダイレクト型決済URL
        success_url:
          type: string
          nullable: true
          maxLength: 256
          example: https://your-service.example.com/success
          description: |
            成功時リダイレクトURL\
            `link_url`上で決済に成功すると、fincodeはこのURLにPOSTメソッドでリダイレクトします。
        cancel_url:
          type: string
          nullable: true
          maxLength: 256
          example: https://your-service.example.com/cancel
          description: |
            キャンセル時リダイレクトURL\
            `link_url`上で決済がキャンセルされると、fincodeはこのURLにPOSTメソッドでリダイレクトします。
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentSessionStatus'
        expire:
          type: string
          nullable: false
          example: 2022/02/31 23:59:59.999
          description: |
            リダイレクト型決済URL 有効期限\
            形式： `yyyy/MM/dd HH:mm:ss.SSS`
        shop_service_name:
          type: string
          nullable: true
          maxLength: 100
          example: Your Service
          description: |
            ショップ／サービス名\
            決済URL上で表示されるショップおよびサービスの名称です。\
            \
            デフォルトでは本番環境申請時に登録した「明細書表記」の値が設定されます。
        guide_mail_send_flag:
          type: string
          enum:
            - '0'
            - '1'
          nullable: false
          example: '1'
          description: |
            決済メール 送信フラグ\
            リダイレクト型決済URLをfincodeからのメール送信機能で送信したかどうかを示します。

            - `0`：送信しなかった（デフォルト）
            - `1`：送信した
        receiver_mail:
          type: string
          nullable: true
          maxLength: 254
          example: receiver-email@example.com
          description: |
            決済メール 送信先メールアドレス\
            リダイレクト型決済URLをfincodeからのメール送信機能で送信する場合の送信先メールアドレスです。
        mail_customer_name:
          type: string
          nullable: true
          maxLength: 384
          example: 買物 太郎
          description: |
            購入メール 購入者の名前\
            リダイレクト型決済URLをfincodeからのメール送信機能で送信する場合のメール中で用いられる購入者の名前です。\
            \
            fincodeが提供するデフォルトのメールテンプレートでは敬称がテンプレート側に含まれています。
        thanks_mail_send_flag:
          type: string
          enum:
            - '0'
            - '1'
          nullable: false
          description: |
            完了メール 送信フラグ\
            決済が完了した際に購入者に完了メールを送信するかどうかを示します。

            - `0`：送信しない（デフォルト）
            - `1`：送信する
        shop_mail_template_id:
          type: string
          nullable: true
          maxLength: 25
          example: null
          description: |
            メールテンプレートID\
            メールテンプレートIDが設定されている場合、リダイレクト型決済URLの送信先メールアドレスに送信されるメールのテンプレートが変更されます。\
            \
            fincodeが提供するデフォルトのメールテンプレートを使用する場合は`null`を設定します。
        transaction:
          type: object
          nullable: false
          description: |
            決済共通項目\
            決済手段を問わず共通して使用される、決済に関するデータです。
          properties:
            pay_type:
              type: array
              nullable: false
              items:
                allOf:
                  - $ref: '#/components/schemas/PaymentSessionPayType'
              description: |
                決済手段\
                この決済URL上で使用できる決済手段を指定します。複数指定可能です。

                - `Card`：カード決済
                - `Konbini`：コンビニ決済
                - `Paypay`：PayPay
                - `Virtualaccount`：バーチャル口座決済
                - `Amazonpay`：Amazon Pay
            order_id:
              nullable: false
              allOf:
                - $ref: '#/components/schemas/Payment_properties-id'
              description: |
                オーダーID\
                このリダイレクト型決済URL上で決済後生成される決済情報のID
            amount:
              type: integer
              format: int32
              minLength: 1
              maxLength: 10
              nullable: false
              example: 1000
              description: |
                利用金額
            tax:
              type: integer
              format: int32
              minLength: 1
              maxLength: 10
              nullable: false
              example: 1000
              description: |
                税送料
            client_field_1:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/client_field_n'
              description: |
                加盟店自由項目 1
            client_field_2:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/client_field_n'
              description: |
                加盟店自由項目 2
            client_field_3:
              nullable: true
              allOf:
                - $ref: '#/components/schemas/client_field_n'
              description: |
                加盟店自由項目 3
        card:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/PaymentSession.Card'
          description: |
            カード決済に関する情報
        konbini:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/PaymentSession.Konbini'
          description: |
            コンビニ決済に関する情報
        paypay:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/PaymentSession.PayPay'
          description: |
            PayPayに関する情報
        virtualaccount:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/PaymentSession.VirtualAccount'
          description: |
            銀行振込（バーチャル口座）に関する情報
        amazonpay:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/PaymentSession.Amazonpay'
          description: |
            Amazon Payに関する情報
        bill_id:
          type: string
          description: |
            請求ID
          minLength: 1
          maxLength: 30
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
    PaymentSession.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/PaymentSession'
    properties-success_url:
      type: string
      nullable: true
      maxLength: 256
      example: https://your-service.example.com/success
      description: |
        成功時リダイレクトURL\
        `link_url`上でカード登録に成功すると、fincodeはこのURLにPOSTメソッドでリダイレクトします。
    properties-cancel_url:
      type: string
      nullable: true
      maxLength: 256
      example: https://your-service.example.com/cancel
      description: |
        キャンセル時リダイレクトURL\
        `link_url`上でカード登録がキャンセルされると、fincodeはこのURLにPOSTメソッドでリダイレクトします。
    CardRegistrationSession_properties-expire:
      type: string
      nullable: false
      example: 2022/02/31 23:59:59.999
      description: |
        リダイレクト型カード登録URL 有効期限\
        形式： `yyyy/MM/dd HH:mm:ss.SSS`
    properties-shop_service_name:
      type: string
      nullable: true
      maxLength: 100
      example: Your Service
      description: |
        ショップ／サービス名\
        カード登録URL上で表示されるショップおよびサービスの名称です。\
        \
        デフォルトでは本番環境申請時に登録した「明細書表記」の値が設定されます。
    properties-receiver_mail:
      type: string
      nullable: true
      maxLength: 254
      example: receiver-email@example.com
      description: |
        カード登録メール 送信先メールアドレス\
        リダイレクト型カード登録URLをfincodeからのメール送信機能で送信する場合の送信先メールアドレスです。
    properties-mail_customer_name:
      type: string
      nullable: true
      maxLength: 384
      example: 買物 太郎
      description: |
        カード登録メール カード登録をするユーザーの名前\
        リダイレクト型決済URLをfincodeからのメール送信機能で送信する場合のメール中で用いられるユーザーの名前です。\
        \
        fincodeが提供するデフォルトのメールテンプレートでは敬称がテンプレート側に含まれています。
    properties-guide_mail_send_flag:
      type: string
      enum:
        - '0'
        - '1'
      nullable: false
      example: '1'
      description: |
        カード登録メール 送信フラグ\
        リダイレクト型カード登録URLをfincodeからのメール送信機能で送信したかどうかを示します。

        - `0`：送信しなかった（デフォルト）
        - `1`：送信した
    completion_mail_send_flag:
      type: string
      enum:
        - '0'
        - '1'
      nullable: false
      description: |
        完了メール 送信フラグ\
        決済が完了した際にカード登録をしたユーザーに完了メールを送信するかどうかを示します。

        - `0`：送信しない（デフォルト）
        - `1`：送信する
    properties-shop_mail_template_id:
      type: string
      nullable: true
      maxLength: 25
      example: null
      description: |
        メールテンプレートID\
        メールテンプレートIDが設定されている場合、リダイレクト型カード登録URLの送信先メールアドレスに送信されるメールのテンプレートが変更されます。\
        \
        fincodeが提供するデフォルトのメールテンプレートを使用する場合は`null`を設定します。
    CardRegistrationSession_properties-customer_id:
      allOf:
        - $ref: '#/components/schemas/id'
      description: |
        顧客ID\
        カード登録URLによりカードが登録される顧客のIDです。
    customer_name:
      type: string
      nullable: true
      minLength: 1
      maxLength: 384
      example: 買物 太郎
      description: |
        顧客名
    CardRegistrationSession.Creating.Request:
      type: object
      properties:
        success_url:
          allOf:
            - $ref: '#/components/schemas/properties-success_url'
        cancel_url:
          allOf:
            - $ref: '#/components/schemas/properties-cancel_url'
        expire:
          allOf:
            - $ref: '#/components/schemas/CardRegistrationSession_properties-expire'
          description: |
            リダイレクト型カード登録URL 有効期限\
            形式： `yyyy/MM/dd HH:mm:ss`
        shop_service_name:
          allOf:
            - $ref: '#/components/schemas/properties-shop_service_name'
        receiver_mail:
          allOf:
            - $ref: '#/components/schemas/properties-receiver_mail'
        mail_customer_name:
          allOf:
            - $ref: '#/components/schemas/properties-mail_customer_name'
        guide_mail_send_flag:
          allOf:
            - $ref: '#/components/schemas/properties-guide_mail_send_flag'
        completion_mail_send_flag:
          allOf:
            - $ref: '#/components/schemas/completion_mail_send_flag'
        shop_mail_template_id:
          allOf:
            - $ref: '#/components/schemas/properties-shop_mail_template_id'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/CardRegistrationSession_properties-customer_id'
        customer_name:
          allOf:
            - $ref: '#/components/schemas/customer_name'
        td_tenant_name:
          allOf:
            - $ref: '#/components/schemas/td_tenant_name'
        tds_type:
          allOf:
            - $ref: '#/components/schemas/tds_type'
        tds2_type:
          allOf:
            - $ref: '#/components/schemas/tds2_type'
        tds2_ch_acc_change:
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_change'
        tds2_ch_acc_date:
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_date'
        tds2_ch_acc_pw_change:
          allOf:
            - $ref: '#/components/schemas/tds2_ch_acc_pw_change'
        tds2_nb_purchase_account:
          allOf:
            - $ref: '#/components/schemas/tds2_nb_purchase_account'
        tds2_payment_acc_age:
          allOf:
            - $ref: '#/components/schemas/tds2_payment_acc_age'
        tds2_provision_attempts_day:
          allOf:
            - $ref: '#/components/schemas/tds2_provision_attempts_day'
        tds2_ship_address_usage:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_address_usage'
        tds2_ship_name_ind:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_name_ind'
        tds2_suspicious_acc_activity:
          allOf:
            - $ref: '#/components/schemas/tds2_suspicious_acc_activity'
        tds2_txn_activity_day:
          allOf:
            - $ref: '#/components/schemas/tds2_txn_activity_day'
        tds2_txn_activity_year:
          allOf:
            - $ref: '#/components/schemas/tds2_txn_activity_year'
        tds2_three_ds_req_auth_data:
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_data'
        tds2_three_ds_req_auth_method:
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_method'
        tds2_three_ds_req_auth_timestamp:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/tds2_three_ds_req_auth_timestamp'
        tds2_email:
          allOf:
            - $ref: '#/components/schemas/tds2_email'
        tds2_addr_match:
          allOf:
            - $ref: '#/components/schemas/tds2_addr_match'
        tds2_bill_addr_country:
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_country'
        tds2_bill_addr_state:
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_state'
        tds2_bill_addr_city:
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_city'
        tds2_bill_addr_line_1:
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_1'
        tds2_bill_addr_line_2:
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_2'
        tds2_bill_addr_line_3:
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_line_3'
        tds2_bill_addr_post_code:
          allOf:
            - $ref: '#/components/schemas/tds2_bill_addr_post_code'
        tds2_ship_addr_country:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_country'
        tds2_ship_addr_state:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_state'
        tds2_ship_addr_city:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_city'
        tds2_ship_addr_line_1:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_1'
        tds2_ship_addr_line_2:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_2'
        tds2_ship_addr_line_3:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_line_3'
        tds2_ship_addr_post_code:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_addr_post_code'
        tds2_ship_ind:
          allOf:
            - $ref: '#/components/schemas/tds2_ship_ind'
        tds2_delivery_email_address:
          allOf:
            - $ref: '#/components/schemas/tds2_delivery_email_address'
        tds2_home_phone_cc:
          allOf:
            - $ref: '#/components/schemas/tds2_home_phone_cc'
        tds2_home_phone_no:
          allOf:
            - $ref: '#/components/schemas/tds2_home_phone_no'
        tds2_mobile_phone_cc:
          allOf:
            - $ref: '#/components/schemas/tds2_mobile_phone_cc'
        tds2_mobile_phone_no:
          allOf:
            - $ref: '#/components/schemas/tds2_mobile_phone_no'
        tds2_work_phone_cc:
          allOf:
            - $ref: '#/components/schemas/tds2_work_phone_cc'
        tds2_work_phone_no:
          allOf:
            - $ref: '#/components/schemas/tds2_work_phone_no'
        tds2_delivery_timeframe:
          allOf:
            - $ref: '#/components/schemas/tds2_delivery_timeframe'
        tds2_pre_order_date:
          allOf:
            - $ref: '#/components/schemas/tds2_pre_order_date'
        tds2_pre_order_purchase_ind:
          allOf:
            - $ref: '#/components/schemas/tds2_pre_order_purchase_ind'
        tds2_reorder_items_ind:
          allOf:
            - $ref: '#/components/schemas/tds2_reorder_items_ind'
        tds2_recurring_expiry:
          allOf:
            - $ref: '#/components/schemas/tds2_recurring_expiry'
        tds2_recurring_frequency:
          allOf:
            - $ref: '#/components/schemas/tds2_recurring_frequency'
        tds2_gift_card_amount:
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_amount'
        tds2_gift_card_count:
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_count'
        tds2_gift_card_curr:
          allOf:
            - $ref: '#/components/schemas/tds2_gift_card_curr'
    CardRegistrationSessionStatus:
      type: string
      enum:
        - CREATE
      maxLength: 10
      nullable: false
      example: CREATE
      description: |
        ステータス\
        リダイレクト型カード登録URLのステータスを表します。

        - `CREATE`：カード登録URLが作成された状態
    CardRegistrationSession:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 25
          nullable: false
          example: lk_**********************
          description: |
            リダイレクト型カード登録URL ID
        link_url:
          type: string
          minLength: 1
          maxLength: 100
          nullable: false
          example: https://secure.test.fincode.jp/v1/links_customers_and_cards/lk_**********************
          description: |
            リダイレクト型カード登録URL\
            カード登録を行うユーザーがこのURLにアクセスし、カード情報を登録することで登録手続きが完了します。
        success_url:
          type: string
          nullable: true
          maxLength: 256
          example: https://your-service.example.com/success
          description: |
            成功時リダイレクトURL\
            `link_url`上でカード登録に成功すると、fincodeはこのURLにPOSTメソッドでリダイレクトします。
        cancel_url:
          type: string
          nullable: true
          maxLength: 256
          example: https://your-service.example.com/cancel
          description: |
            キャンセル時リダイレクトURL\
            `link_url`上でカード登録がキャンセルされると、fincodeはこのURLにPOSTメソッドでリダイレクトします。
        status:
          allOf:
            - $ref: '#/components/schemas/CardRegistrationSessionStatus'
        expire:
          type: string
          nullable: false
          example: 2022/02/31 23:59:59.999
          description: |
            リダイレクト型カード登録URL 有効期限\
            形式： `yyyy/MM/dd HH:mm:ss.SSS`
        shop_service_name:
          type: string
          nullable: true
          maxLength: 100
          example: Your Service
          description: |
            ショップ／サービス名\
            カード登録URL上で表示されるショップおよびサービスの名称です。\
            \
            デフォルトでは本番環境申請時に登録した「明細書表記」の値が設定されます。
        guide_mail_send_flag:
          type: string
          enum:
            - '0'
            - '1'
          nullable: false
          example: '1'
          description: |
            カード登録メール 送信フラグ\
            リダイレクト型カード登録URLをfincodeからのメール送信機能で送信したかどうかを示します。

            - `0`：送信しなかった（デフォルト）
            - `1`：送信した
        receiver_mail:
          type: string
          nullable: true
          maxLength: 254
          example: receiver-email@example.com
          description: |
            カード登録メール 送信先メールアドレス\
            リダイレクト型カード登録URLをfincodeからのメール送信機能で送信する場合の送信先メールアドレスです。
        mail_customer_name:
          type: string
          nullable: true
          maxLength: 384
          example: 買物 太郎
          description: |
            カード登録メール カード登録をするユーザーの名前\
            リダイレクト型決済URLをfincodeからのメール送信機能で送信する場合のメール中で用いられるユーザーの名前です。\
            \
            fincodeが提供するデフォルトのメールテンプレートでは敬称がテンプレート側に含まれています。
        completion_mail_send_flag:
          type: string
          enum:
            - '0'
            - '1'
          nullable: false
          description: |
            完了メール 送信フラグ\
            決済が完了した際にカード登録をしたユーザーに完了メールを送信するかどうかを示します。

            - `0`：送信しない（デフォルト）
            - `1`：送信する
        shop_mail_template_id:
          type: string
          nullable: true
          maxLength: 25
          example: null
          description: |
            メールテンプレートID\
            メールテンプレートIDが設定されている場合、リダイレクト型カード登録URLの送信先メールアドレスに送信されるメールのテンプレートが変更されます。\
            \
            fincodeが提供するデフォルトのメールテンプレートを使用する場合は`null`を設定します。
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            カード登録URLによりカードが登録される顧客のIDです。
        customer_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 384
          example: 買物 太郎
          description: |
            顧客名
        tds_type:
          nullable: true
          $ref: '#/components/schemas/tds_type'
        td_tenant_name:
          nullable: true
          $ref: '#/components/schemas/td_tenant_name'
        tds2_type:
          nullable: true
          $ref: '#/components/schemas/tds2_type'
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
    CardRegistrationSession.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/CardRegistrationSession'
    Plan.ListRetrieving.QueryParams:
      type: object
      properties:
        total_amount_min:
          type: integer
          format: int64
          description: |
            合計金額（始値）\
            利用金額と税送料の合計額（`total_amount`）を対象に範囲検索を行います。この値以上の合計金額を持つプラン情報を取得します。
        total_amount_max:
          type: integer
          format: int64
          description: |
            合計金額（終値）\
            利用金額と税送料の合計額（`total_amount`）を対象に範囲検索を行います。この値以下の合計金額を持つプラン情報を取得します。
        interval_pattern:
          type: string
          enum:
            - month
            - year
          description: |
            課金間隔

            - `month`: 月
            - `year`: 年
        update_date_from:
          type: string
          description: |
            更新日時（始値）\
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新された決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        update_date_to:
          type: string
          description: |
            更新日時（終値）\
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新された決済情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        plan_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 25
          example: Gold Plan
          description: |
            プラン名\
            `plan_name`に対する部分一致検索を行います。
        delete_flag:
          type: string
          nullable: true
          minLength: 1
          maxLength: 1
          enum:
            - '0'
            - '1'
          description: |
            削除済みフラグ
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `total_amount`: 合計金額
            - `created`: 作成日時
            - `updated`: 更新日時
    Plan:
      type: object
      properties:
        id:
          type: string
          nullable: false
          example: pl_*********************
          minLength: 1
          maxLength: 25
          description: |
            プランID
        plan_name:
          type: string
          nullable: false
          maxLength: 200
          example: Basic Plan
          description: |
            プラン名
        description:
          type: string
          nullable: true
          maxLength: 400
          example: Basic Plan Description
          description: |
            プランの説明
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        amount:
          type: integer
          format: int64
          nullable: false
          example: 1000
          description: |
            利用金額
        tax:
          type: integer
          format: int64
          nullable: false
          example: 100
          description: |
            税送料
        total_amount:
          type: integer
          format: int64
          nullable: false
          example: 1100
          description: |
            合計金額\
            利用金額と税送料の合計金額です。
        interval_pattern:
          type: string
          enum:
            - month
            - year
          nullable: false
          example: month
          description: |
            課金間隔

            - `month`：月
            - `year`：年
        interval_count:
          type: number
          format: integer
          nullable: false
          enum:
            - 1
            - 2
            - 3
            - 6
          description: |
            課金間隔数

            - `1`：月次／年次の課金
            - `2`：2ヶ月に1回の課金
            - `3`：3ヶ月に1回の課金
            - `6`：6ヶ月に1回の課金
        used_flag:
          type: string
          nullable: false
          enum:
            - '0'
            - '1'
          example: '1'
          description: |
            利用済みフラグ\
            このプランを用いたサブスクリプション（解約含む）が1つ以上存在する場合`1`を返し、存在しない場合`0`を返します。

            - `0`：このプランを用いたサブスクリプションはまだ存在しない
            - `1`：このプランを用いたサブスクリプションが存在する
        subscription_retry_mode:
          type: string
          nullable: false
          enum:
            - enabled
            - disabled
          example: disabled
          description: |
            リトライ対象設定\
            このプランを利用したサブスクリプション課金が失敗した場合に、自動でリトライを行うかどうかの設定です。

            - `enabled`：リトライ対象
            - `disabled`：リトライ対象外
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
        created:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/updated'
      x-req-properties:
        amount:
          type: string
          nullable: false
          minLength: 1
          maxLength: 7
          example: '1000'
          description: |
            利用金額\
            `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。
        tax:
          type: string
          nullable: false
          minLength: 1
          maxLength: 7
          example: '100'
          description: |
            税送料\
            `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。
        interval_pattern:
          type: string
          enum:
            - month
            - year
          nullable: false
          example: month
          description: |
            課金間隔\
            課金間隔数（`interval_count`）を指定した場合必須です。
            省略した場合、`month`が設定されます。

            - `month`：月
            - `year`：年
        interval_count:
          type: string
          nullable: false
          enum:
            - '1'
            - '2'
            - '3'
            - '6'
          default: '1'
          description: |
            課金間隔数\
            課金間隔（`interval_pattern`）を指定した場合必須です。
            省略した場合、`1`が設定されます。

            - `1`：月次／年次の課金
            - `2`：2ヶ月に1回の課金
            - `3`：3ヶ月に1回の課金
            - `6`：6ヶ月に1回の課金
        subscription_retry_mode:
          type: string
          nullable: true
          enum:
            - enabled
            - disabled
          default: disabled
          description: |
            リトライ対象設定\
            課金失敗時に自動リトライを行うかを指定します。省略した場合 `disabled` が設定されます。

            - `enabled`：リトライ対象
            - `disabled`：リトライ対象外
    Plan.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/Plan'
    Plan.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Plan.list'
    Plan_properties-id:
      type: string
      nullable: false
      example: pl_*********************
      minLength: 1
      maxLength: 25
      description: |
        プランID
    plan_name:
      type: string
      nullable: false
      maxLength: 200
      example: Basic Plan
      description: |
        プラン名
    description:
      type: string
      nullable: true
      maxLength: 400
      example: Basic Plan Description
      description: |
        プランの説明
    x-req-properties-amount:
      type: string
      nullable: false
      minLength: 1
      maxLength: 7
      example: '1000'
      description: |
        利用金額\
        `tax`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。
    x-req-properties-tax:
      type: string
      nullable: false
      minLength: 1
      maxLength: 7
      example: '100'
      description: |
        税送料\
        `amount`との合計値が決済手段ごとに定められた決済金額の範囲内に収まる必要があります。
    interval_pattern:
      type: string
      enum:
        - month
        - year
      nullable: false
      example: month
      description: |
        課金間隔\
        課金間隔数（`interval_count`）を指定した場合必須です。
        省略した場合、`month`が設定されます。

        - `month`：月
        - `year`：年
    interval_count:
      type: string
      nullable: false
      enum:
        - '1'
        - '2'
        - '3'
        - '6'
      default: '1'
      description: |
        課金間隔数\
        課金間隔（`interval_pattern`）を指定した場合必須です。
        省略した場合、`1`が設定されます。

        - `1`：月次／年次の課金
        - `2`：2ヶ月に1回の課金
        - `3`：3ヶ月に1回の課金
        - `6`：6ヶ月に1回の課金
    subscription_retry_mode:
      type: string
      nullable: true
      enum:
        - enabled
        - disabled
      default: disabled
      description: |
        リトライ対象設定\
        課金失敗時に自動リトライを行うかを指定します。省略した場合 `disabled` が設定されます。

        - `enabled`：リトライ対象
        - `disabled`：リトライ対象外
    Plan.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        plan_name:
          allOf:
            - $ref: '#/components/schemas/plan_name'
        description:
          allOf:
            - $ref: '#/components/schemas/description'
        amount:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-amount'
        tax:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-tax'
        interval_pattern:
          allOf:
            - $ref: '#/components/schemas/interval_pattern'
        interval_count:
          allOf:
            - $ref: '#/components/schemas/interval_count'
        subscription_retry_mode:
          allOf:
            - $ref: '#/components/schemas/subscription_retry_mode'
      required:
        - plan_name
        - amount
    Plan.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Plan'
    PlanId_schema:
      type: string
      example: pl_*********************
    Plan.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Plan'
    Plan.Updating.Request:
      type: object
      properties:
        plan_name:
          allOf:
            - $ref: '#/components/schemas/plan_name'
        description:
          allOf:
            - $ref: '#/components/schemas/description'
        amount:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-amount'
        tax:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-tax'
        interval_pattern:
          allOf:
            - $ref: '#/components/schemas/interval_pattern'
        interval_count:
          allOf:
            - $ref: '#/components/schemas/interval_count'
        subscription_retry_mode:
          allOf:
            - $ref: '#/components/schemas/subscription_retry_mode'
    Plan.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/Plan'
    Plan.Deleting.Response:
      allOf:
        - $ref: '#/components/schemas/Plan'
    SubscriptionPayType:
      type: string
      enum:
        - Card
        - Directdebit
        - Paypay
      example: Card
      description: |
        決済種別（サブスクリプションに対応しているもの）

        - `Card`: カード
        - `Directdebit`: 口座振替
        - `Paypay`: PayPay
    SubscriptionStatus:
      type: string
      enum:
        - ACTIVE
        - RUNNING
        - CANCELED
        - INCOMPLETE
      minLength: 6
      maxLength: 10
      description: |
        ステータス

        - `ACTIVE`: サブスクリプションが有効<br /><span class="smallText">設定した課金日に顧客に対して課金が行われます。</span>
        - `RUNNING`: 課金処理中
        - `CANCELED`: 解約済み<br /><span class="smallText">顧客に対して課金は行われません。</span>
        - `INCOMPLETE`: 登録失敗<br /><span class="smallText">何らかの理由により登録に失敗しました。顧客に対して課金は行われません。</span>
    properties-total_amount:
      type: integer
      format: int64
      nullable: false
      example: 1100
      description: |
        合計金額\
        利用金額と税送料の合計金額です。
    properties-interval_pattern:
      type: string
      enum:
        - month
        - year
      nullable: false
      example: month
      description: |
        課金間隔

        - `month`：月
        - `year`：年
    Subscription.ListRetrieving.QueryParams:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
          description: |
            決済種別\
            一覧で取得する対象の決済種別を指定します。

            - `Card`: カード
            - `Directdebit`: 口座振替
        id:
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
        plan_id:
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        status:
          allOf:
            - $ref: '#/components/schemas/SubscriptionStatus'
          description: |
            ステータス\
            指定したステータスのサブスクリプション情報を取得します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `ACTIVE`: サブスクリプションが有効
            - `RUNNING`: 課金処理中
            - `CANCELED`: 解約済み
            - `INCOMPLETE`: サブスクリプションの登録時点で何らかの理由により失敗
        total_amount_min:
          allOf:
            - $ref: '#/components/schemas/properties-total_amount'
          description: |
            合計金額（始値）\
            利用金額と税送料の合計額（`total_amount`）を対象に範囲検索を行います。この値以上の合計金額を持つサブスクリプション情報を取得します。
        total_amount_max:
          allOf:
            - $ref: '#/components/schemas/properties-total_amount'
          description: |
            合計金額（終値）\
            利用金額と税送料の合計額（`total_amount`）を対象に範囲検索を行います。この値以下の合計金額を持つサブスクリプション情報を取得します。
        interval_pattern:
          allOf:
            - $ref: '#/components/schemas/properties-interval_pattern'
        start_date_from:
          type: string
          description: |
            課金開始日（始値）\
            課金開始日（`start_date`）を対象に範囲検索を行います。この日付以降に課金開始されたサブスクリプション情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        start_date_to:
          type: string
          description: |
            課金開始日（終値）\
            課金開始日（`start_date`）を対象に範囲検索を行います。この日付以前に課金開始されたサブスクリプション情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        stop_date_from:
          type: string
          description: |
            課金停止日（始値）\
            課金停止日（`stop_date`）を対象に範囲検索を行います。この日付以降に課金停止されたサブスクリプション情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        stop_date_to:
          type: string
          description: |
            課金停止日（終値）\
            課金停止日（`stop_date`）を対象に範囲検索を行います。この日付以前に課金停止されたサブスクリプション情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        next_charge_date_from:
          type: string
          description: |
            次回課金日（始値）\
            次回課金日（`next_charge_date`）を対象に範囲検索を行います。この日付以降に次回課金されるサブスクリプション情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        next_charge_date_to:
          type: string
          description: |
            次回課金日（終値）\
            次回課金日（`next_charge_date`）を対象に範囲検索を行います。この日付以前に次回課金されるサブスクリプション情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        update_date_from:
          type: string
          description: |
            更新日時（始値）\
            更新日時（`updated`）を対象に範囲検索を行います。この日付以降に更新されたサブスクリプション情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        update_date_to:
          type: string
          description: |
            更新日時（終値）\
            更新日時（`updated`）を対象に範囲検索を行います。この日付以前に更新されたサブスクリプション情報を取得します。\
            \
            形式：`yyyy/MM/dd`
        is_retry_scheduled:
          type: string
          enum:
            - 'true'
            - 'false'
          example: 'true'
          description: |
            リトライ予定フラグ            自動リトライが予定されているサブスクリプション情報のみ（`true`）／予定されていないもののみ（`false`）に絞り込みます。                        課金失敗後に自動リトライを行う購入者へ手動での再請求を行うと二重課金になる恐れがあるため、手動リカバリの対象を絞り込む際にご利用ください。                        ※`pay_type = Card` および `pay_type = Paypay` で利用できます。口座振替は自動リトライに対応していないため、`true` を指定しても0件になります。
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `plan_id`: プランID
            - `total_amount`: 合計金額
            - `start_date`: 課金開始日
            - `stop_date`: 課金停止日
            - `next_charge_date`: 次回課金日
            - `created`: 作成日時
            - `updated`: 更新日時
      required:
        - pay_type
    Plan_properties-amount:
      type: integer
      format: int64
      nullable: false
      example: 1000
      description: |
        利用金額
    Plan_properties-tax:
      type: integer
      format: int64
      nullable: false
      example: 100
      description: |
        税送料
    Subscription:
      type: object
      properties:
        id:
          type: string
          example: su_*********************
          minLength: 1
          maxLength: 25
          description: |
            サブスクリプションID
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        plan_id:
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        plan_name:
          allOf:
            - $ref: '#/components/schemas/plan_name'
          nullable: true
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            \
            このサブスクリプションの請求先となる顧客のIDです。
        card_id:
          allOf:
            - $ref: '#/components/schemas/properties-id'
          description: |
            カードID\
            \
            このサブスクリプションの決済に使用するカードのIDです。
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID\
            \
            このサブスクリプションの決済に使用する決済手段のIDです。
        amount:
          allOf:
            - $ref: '#/components/schemas/Plan_properties-amount'
        tax:
          allOf:
            - $ref: '#/components/schemas/Plan_properties-tax'
        total_amount:
          allOf:
            - $ref: '#/components/schemas/properties-total_amount'
        initial_amount:
          type: integer
          minLength: 1
          maxLength: 9999999
          description: |
            初回利用金額\
            \
            この値が設定されているとき、このサブスクリプションは初回の課金のみこの金額で課金し、2回目以降はプラン情報がもつ`amount`の金額で課金します。
        initial_tax:
          type: integer
          minLength: 1
          maxLength: 9999999
          description: |
            初回税送料\
            \
            この値が設定されているとき、このサブスクリプションは初回の課金のみこの金額で課金し、2回目以降はプラン情報がもつ`tax`の金額で課金します。
        initial_total_amount:
          type: integer
          minLength: 1
          maxLength: 9999999
          description: |
            初回合計金額\
            \
            `initial_amount`と`initial_tax`の合計金額です。
        status:
          allOf:
            - $ref: '#/components/schemas/SubscriptionStatus'
        start_date:
          type: string
          example: 2022/05/16 00:00:00.000
          description: |
            課金開始日\
            サブスクリプションの開始日です。\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        next_charge_date:
          type: string
          example: 2022/06/16 00:00:00.000
          description: |
            次回課金日\
            サブスクリプションの次回課金日です。\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        stop_date:
          type: string
          example: 2022/06/16 00:00:00.000
          nullable: true
          description: |
            課金停止日\
            サブスクリプションの停止日です。\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        end_month_flag:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            月末課金フラグ

            - `0`：月末課金を行わない
            - `1`：月末課金を行う
        send_url:
          type: string
          nullable: true
          example: null
          description: |
            ※ 閉塞機能
        subscription_retry_mode:
          type: string
          nullable: true
          enum:
            - enabled
            - disabled
          description: |
            リトライ対象設定\
            このサブスクリプションが使用するプランのリトライ設定です。

            - `enabled`：リトライ対象
            - `disabled`：リトライ対象外
        is_retry_scheduled:
          type: boolean
          nullable: true
          description: |
            リトライ予定フラグ\
            課金失敗後にリトライが予定されている場合`true`を返します。\
            \
            ※`pay_type = Card` および `pay_type = Paypay` で利用できます。口座振替は自動リトライに対応していないため常に`false`です。
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            このサブスクリプションにおいて発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        remarks:
          allOf:
            - $ref: '#/components/schemas/remarks'
          description: |
            ご利用明細表示内容
        settlement_route:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/DirectDebitSettlementRoute'
          description: |
            振替サービス\
            ※`pay_type = Directdebit`のみ

            - `1`: 口座振替（5・6・23・27日）
            - `2`: 口座振替（1・5・20・26日）
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
      x-req-properties:
        initial_amount:
          type: string
          minLength: 1
          maxLength: 7
          description: |
            初回利用金額\
            \
            この値を設定すると、このサブスクリプションは初回の課金のみこの金額で課金し2回目以降はプラン情報がもつ`amount`の金額で課金します。
        initial_tax:
          type: string
          minLength: 1
          maxLength: 7
          description: |
            初回税送料\
            \
            この値を設定すると、このサブスクリプションは初回の課金のみこの金額で課金し2回目以降はプラン情報がもつ`tax`の金額で課金します。
    Subscription.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/Subscription'
    Subscription.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Subscription.list'
    start_date:
      type: string
      example: 2022/05/16 00:00:00.000
      description: |
        課金開始日\
        サブスクリプションの開始日です。\
        \
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    stop_date:
      type: string
      example: 2022/06/16 00:00:00.000
      nullable: true
      description: |
        課金停止日\
        サブスクリプションの停止日です。\
        \
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    end_month_flag:
      type: string
      enum:
        - '0'
        - '1'
      description: |
        月末課金フラグ

        - `0`：月末課金を行わない
        - `1`：月末課金を行う
    initial_amount:
      type: string
      minLength: 1
      maxLength: 7
      description: |
        初回利用金額\
        \
        この値を設定すると、このサブスクリプションは初回の課金のみこの金額で課金し2回目以降はプラン情報がもつ`amount`の金額で課金します。
    initial_tax:
      type: string
      minLength: 1
      maxLength: 7
      description: |
        初回税送料\
        \
        この値を設定すると、このサブスクリプションは初回の課金のみこの金額で課金し2回目以降はプラン情報がもつ`tax`の金額で課金します。
    send_url:
      type: string
      nullable: true
      example: null
      deprecated: true
      description: |
        ※ 閉塞機能
    Subscription.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        plan_id:
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
        card_id:
          allOf:
            - $ref: '#/components/schemas/properties-id'
          description: |
            カードID \
            （`pay_type = Card`の場合のみ利用可能）\
            このサブスクリプションで請求先となるカードのIDです。\
            省略した場合、顧客のデフォルトカードが使用されます。
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID \
            （`pay_type = Directdebit` または `pay_type = Paypay`の場合のみ利用可能）\
            このサブスクリプションで請求先となる決済手段のIDです。\
            \
            ※`pay_type = Directdebit`の場合、省略した場合は顧客のデフォルト決済手段が使用されます。\
            ※`pay_type = Paypay`の場合は**必須**です。継続課金用に連携済みのPayPayアカウントの決済手段IDを指定してください。デフォルト決済手段による補完は行われません。
        start_date:
          allOf:
            - $ref: '#/components/schemas/start_date'
          description: |
            課金開始日\
            サブスクリプションの開始日です。  

            ※`pay_type = Directdebit`の場合、
            サブスクリプションの登録が請求受付終了日の13:00を超えると課金開始日は翌月の同日となります。\
            \
            形式：`yyyy/MM/dd`
        stop_date:
          allOf:
            - $ref: '#/components/schemas/stop_date'
          description: |
            課金停止日\
            サブスクリプションの停止日です。\
            省略した場合、無期限となります。\
            \
            形式：`yyyy/MM/dd`
        end_month_flag:
          allOf:
            - $ref: '#/components/schemas/end_month_flag'
        initial_amount:
          allOf:
            - $ref: '#/components/schemas/initial_amount'
        initial_tax:
          allOf:
            - $ref: '#/components/schemas/initial_tax'
        remarks:
          allOf:
            - $ref: '#/components/schemas/remarks'
          description: |
            （`pay_type = Directdebit`の場合のみ利用可能）ご利用明細表示内容

            - フォーマット：半角英数カナ／全角英数カナ／一部の記号／半角全角スペース
            - デフォルト： `ショップ名カナの先頭9文字`

            ※ 利用可能な記号

            - 半角：`.`、`(`、`)`、`–`
            - 全角：`．`、`（`、`）`、`ー`
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        send_url:
          deprecated: true
          allOf:
            - $ref: '#/components/schemas/send_url'
      required:
        - pay_type
        - plan_id
        - customer_id
        - start_date
    Subscription.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Subscription'
    SubscriptionId_schema:
      type: string
      example: su_*********************
    Subscription.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Subscription'
    Subscription.Updating.Request:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        plan_id:
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        start_date:
          allOf:
            - $ref: '#/components/schemas/start_date'
        stop_date:
          allOf:
            - $ref: '#/components/schemas/stop_date'
        end_month_flag:
          allOf:
            - $ref: '#/components/schemas/end_month_flag'
        initial_amount:
          allOf:
            - $ref: '#/components/schemas/initial_amount'
        initial_tax:
          allOf:
            - $ref: '#/components/schemas/initial_tax'
        remarks:
          allOf:
            - $ref: '#/components/schemas/remarks'
          description: |
            （`pay_type = Directdebit`の場合のみ利用可能）ご利用明細表示内容

            - フォーマット：半角英数カナ／全角英数カナ／一部の記号／半角全角スペース
            - デフォルト： `ショップ名カナの先頭9文字`

            ※ 利用可能な記号

            - 半角：`.`、`(`、`)`、`–`
            - 全角：`．`、`（`、`）`、`ー`
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
      required:
        - pay_type
    Subscription.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/Subscription'
    Subscription.Unsubscribing.Response:
      allOf:
        - $ref: '#/components/schemas/Subscription'
    properties-pay_type:
      nullable: false
      allOf:
        - $ref: '#/components/schemas/SubscriptionPayType'
    SubscriptionResult.ListRetrieving.QueryParams:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/properties-pay_type'
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=process_date␣asc,created␣asc`\
            \
            ソート可能な項目

            - `process_date`: 処理日時
            - `created`: 作成日時
      required:
        - pay_type
    SubscriptionResultStatus:
      type: string
      enum:
        - CHECKED
        - SUCCEEDED
        - FAILED
      minLength: 1
      maxLength: 15
      example: SUCCEEDED
      description: |
        ステータス\
        サブスクリプション課金のステータス（結果）です。

        - `CHECKED`：有効性チェックに成功
        - `SUCCEEDED`：課金成功
        - `FAILED`：課金失敗
    properties-card_no:
      allOf:
        - $ref: '#/components/schemas/card_no'
    properties-interval_count:
      type: number
      format: integer
      nullable: false
      enum:
        - 1
        - 2
        - 3
        - 6
      description: |
        課金間隔数

        - `1`：月次／年次の課金
        - `2`：2ヶ月に1回の課金
        - `3`：3ヶ月に1回の課金
        - `6`：6ヶ月に1回の課金
    SubscriptionResult:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
        pay_type:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        status:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/SubscriptionResultStatus'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/process_date'
        plan_id:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        amount:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Plan_properties-amount'
        tax:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Plan_properties-tax'
        total_amount:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/properties-total_amount'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
          description: |
            顧客ID\
            サブスクリプションで請求した顧客のIDです。
        payment_method_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID\
            サブスクリプションで使用された決済手段のIDです。
        card_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-id'
          description: |
            カードID\
            サブスクリプションで使用されたカードのIDです。
        card_no:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-card_no'
        shop_id:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        access_id:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/access_id'
        send_url:
          type: string
          nullable: true
          example: null
          deprecated: true
          description: |
            ※ 閉塞機能
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        interval_pattern:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/properties-interval_pattern'
        interval_count:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/properties-interval_count'
        remarks:
          type: string
          nullable: true
          minLength: 1
          maxLength: 9
          example: カ）ジーエムオーイ
          description: |
            ご利用明細表示内容\
            デフォルト：ショップ名カナの先頭9文字
        settlement_route:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/DirectDebitSettlementRoute'
          description: |
            振替サービス\
            ※`pay_type = Directdebit`のみ

            - `1`: 口座振替（5・6・23・27日）
            - `2`: 口座振替（1・5・20・26日）
        is_retry_scheduled:
          type: boolean
          nullable: true
          description: |
            リトライフラグ\
            この課金がリトライバッチによって実行されたものである場合`true`を返します。
        process_interface:
          type: string
          nullable: true
          description: |
            処理種別\
            この課金ログを生成した処理の種別です。
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この課金において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        created:
          allOf:
            - $ref: '#/components/schemas/created'
    SubscriptionResult.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - type: object
          properties:
            list:
              type: array
              items:
                $ref: '#/components/schemas/SubscriptionResult'
    PaymentBulkStatus:
      type: string
      enum:
        - CHECKING
        - CHECKED
        - RUNNING
        - COMPLETED
        - ERROR
      description: |
        一括決済 ステータス

        - `CHECKING`: チェック中<br /><span class="smallText">アップロードした一括決済リクエストデータの形式などをチェック中です。</span>
        - `CHECKED`: チェック済み<br /><span class="smallText">データのチェックが完了し、決済処理の実行を待っています。</span>
        - `RUNNING`: 決済処理中<br /><span class="smallText">一括決済処理を実行中です。</span>
        - `COMPLETED`: 完了<br /><span class="smallText">一括決済処理が完了しました。</span>
        - `ERROR`: エラー<br /><span class="smallText">チェック処理中に1件以上のエラーが発生しました。</span>
    PaymentBulkPayType:
      type: string
      enum:
        - Card
        - Virtualaccount
        - Amazonpay
      example: Card
      description: |
        決済種別（一括決済に対応しているもの）

        - `Card`: カード
        - `Virtualaccount`: 銀行振込（バーチャル口座）
        - `Amazonpay`: Amazon Pay
    file_name:
      type: string
      minLength: 1
      maxLength: 100
      description: |
        一括決済データファイル名
    PaymentBulk.ListRetrieving.QueryParams:
      type: object
      properties:
        process_plan_date_from:
          type: string
          nullable: true
          example: 2022/05/01
          description: |
            処理予定日の範囲指定（開始日）を指定します。\
            処理予定日（`process_plan_date`）を対象に範囲検索を行います。この日付以降に処理予定日が設定された一括決済情報を検索します。\
            \
            形式： `yyyy/MM/dd`
        process_plan_date_to:
          type: string
          nullable: true
          example: 2022/05/31
          description: |
            処理予定日の範囲指定（終了日）を指定します。\
            処理予定日（`process_plan_date`）を対象に範囲検索を行います。この日付以前に処理予定日が設定された一括決済情報を検索します。\
            \
            形式： `yyyy/MM/dd`
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkStatus'
          description: |
            一括決済 ステータス。カンマ区切りにすることで複数指定（OR検索）できます。

            - `CHECKING`: チェック中
            - `CHECKED`: チェック済み
            - `RUNNING`: 決済処理中
            - `COMPLETED`: 完了
            - `ERROR`: エラー
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkPayType'
        file_name:
          allOf:
            - $ref: '#/components/schemas/file_name'
          description: |
            一括決済データファイル名\
            `file_name`に対する部分一致検索を行います。
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
        created_from:
          type: string
          nullable: true
          example: 2022/05/01
          description: |
            作成日時の範囲指定（開始日）を指定します。\
            作成日時（`created`）を対象に範囲検索を行います。この日付以降に登録された一括決済情報を検索します。\
            \
            形式： `yyyy/MM/dd`
        created_to:
          type: string
          nullable: true
          example: 2022/05/31
          description: |
            作成日時の範囲指定（終了日）を指定します。\
            作成日時（`created`）を対象に範囲検索を行います。この日付以前に登録された一括決済情報を検索します。\
            \
            形式： `yyyy/MM/dd`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=created␣asc,process_plan_date␣desc`\
            \
            ソート可能な項目

            - `process_plan_date`: 一括決済 処理予定日
            - `status`: ステータス
            - `pay_type`: 決済種別
            - `file_name`: 一括決済データファイル名
            - `delete_flag`: 削除フラグ
            - `created`: 作成日時
    PaymentBulk:
      type: object
      properties:
        id:
          type: string
          minLength: 25
          maxLength: 25
          description: |
            一括決済ID
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkPayType'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkStatus'
        process_plan_date:
          type: string
          description: |
            一括決済 処理予定日\
            この一括決済の処理予定日です。\
            pay_type=`Card`の場合は指定必須です。\
            形式：`yyyy/MM/dd`
        file_name:
          type: string
          minLength: 1
          maxLength: 100
          description: |
            一括決済データファイル名
        process_start_date:
          type: string
          nullable: true
          description: |
            一括決済 処理開始日時\
            この一括決済の処理開始日時です。\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        process_end_date:
          type: string
          nullable: true
          description: |
            一括決済 処理終了日時\
            この一括決済の処理終了日時です。\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        total_count:
          type: integer
          format: int32
          description: |
            一括決済 総件数\
            この一括決済に含まれる決済の件数です。
        process_success_count:
          type: integer
          format: int32
          description: |
            一括決済 成功件数\
            この一括決済の処理に成功した決済の件数です。
        process_failure_count:
          type: integer
          format: int32
          description: |
            一括決済 失敗件数\
            この一括決済の処理に失敗した決済の件数です。
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この一括決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
        created:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/updated'
      x-req-properties:
        file:
          type: string
          description: |
            一括決済情報を記載したJSONファイル。\
            \
            以下のようなファイルをアップロードします。\
            pay_type=`Card`の場合
            ```json
            {
                "data": [
                    {
                        "id": "order_001",
                        "amount": "1000",
                        "tax": "100",
                        "customer_id": "c_**********************",
                        "card_id": "cs_**********************",
                        "client_field_1": "自由項目1",
                        "client_field_2": "自由項目2",
                        "client_field_3": "自由項目3"
                    },
                    {
                        "id": "order_002",
                        "amount": "1000",
                        "customer_id": "c_**********************",
                        "card_id": "cs_**********************"
                    },
                    ...
                ]
            }
            ```
            パラメータ仕様は以下の通りで、各パラメータの形式は決済登録・決済実行APIに準拠します。（*は必須項目）

            - `data`: 決済情報のリストを格納する配列
            - `data[].id`: オーダーID
            - `data[].amount`: 利用金額*
            - `data[].tax`: 税送料
            - `data[].customer_id`: 顧客ID*
            - `data[].card_id`: カードID
            - `data[].client_field_1`: 自由項目1
            - `data[].client_field_2`: 自由項目2
            - `data[].client_field_3`: 自由項目3

            pay_type=`Virtualaccount`の場合
            ```json
            {
                "data": [
                    {
                        "id": "order_001",
                        "billing_amount": "1000",
                        "billing_tax": "100",
                        "customer_id": "c_**********************",
                        "payment_method_id": "pm_**********************",
                        "client_field_1": "自由項目1",
                        "client_field_2": "自由項目2",
                        "client_field_3": "自由項目3"
                    },
                    {
                        "id": "order_002",
                        "billing_amount": "1000",
                        "payment_term_day":"2",
                        "reference_order_id":"order_101",
                        "use_exact_deposit_amount": true
                    },
                    ...
                ]
            }
            ```
            パラメータ仕様は以下の通りで、各パラメータの形式は決済登録・決済実行APIに準拠します。（*は必須項目）

            - `data`: 決済情報のリストを格納する配列
            - `data[].id`: オーダーID
            - `data[].billing_amount`: 請求金額*
            - `data[].billing_tax`: 請求税送料
            - `data[].customer_id`: 顧客ID
            - `data[].payment_method_id`: 決済手段ID
            - `data[].client_field_1`: 自由項目1
            - `data[].client_field_2`: 自由項目2
            - `data[].client_field_3`: 自由項目3
            - `data[].payment_term_day`: 支払期限日数
            - `data[].reference_order_id`: バーチャル口座 再利用 オーダーID
            - `data[].use_exact_deposit_amount`: 入金可能額設定
    PaymentBulk.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/PaymentBulk'
    PaymentBulk.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/PaymentBulk.list'
    process_plan_date:
      type: string
      description: |
        一括決済 処理予定日\
        この一括決済の処理予定日です。\
        pay_type=`Card`の場合は指定必須です。\
        形式：`yyyy/MM/dd`
    file:
      type: string
      description: |
        一括決済情報を記載したJSONファイル。\
        \
        以下のようなファイルをアップロードします。\
        pay_type=`Card`の場合
        ```json
        {
            "data": [
                {
                    "id": "order_001",
                    "amount": "1000",
                    "tax": "100",
                    "customer_id": "c_**********************",
                    "card_id": "cs_**********************",
                    "client_field_1": "自由項目1",
                    "client_field_2": "自由項目2",
                    "client_field_3": "自由項目3"
                },
                {
                    "id": "order_002",
                    "amount": "1000",
                    "customer_id": "c_**********************",
                    "card_id": "cs_**********************"
                },
                ...
            ]
        }
        ```
        パラメータ仕様は以下の通りで、各パラメータの形式は決済登録・決済実行APIに準拠します。（*は必須項目）

        - `data`: 決済情報のリストを格納する配列
        - `data[].id`: オーダーID
        - `data[].amount`: 利用金額*
        - `data[].tax`: 税送料
        - `data[].customer_id`: 顧客ID*
        - `data[].card_id`: カードID
        - `data[].client_field_1`: 自由項目1
        - `data[].client_field_2`: 自由項目2
        - `data[].client_field_3`: 自由項目3

        pay_type=`Virtualaccount`の場合
        ```json
        {
            "data": [
                {
                    "id": "order_001",
                    "billing_amount": "1000",
                    "billing_tax": "100",
                    "customer_id": "c_**********************",
                    "payment_method_id": "pm_**********************",
                    "client_field_1": "自由項目1",
                    "client_field_2": "自由項目2",
                    "client_field_3": "自由項目3"
                },
                {
                    "id": "order_002",
                    "billing_amount": "1000",
                    "payment_term_day":"2",
                    "reference_order_id":"order_101",
                    "use_exact_deposit_amount": true
                },
                ...
            ]
        }
        ```
        パラメータ仕様は以下の通りで、各パラメータの形式は決済登録・決済実行APIに準拠します。（*は必須項目）

        - `data`: 決済情報のリストを格納する配列
        - `data[].id`: オーダーID
        - `data[].billing_amount`: 請求金額*
        - `data[].billing_tax`: 請求税送料
        - `data[].customer_id`: 顧客ID
        - `data[].payment_method_id`: 決済手段ID
        - `data[].client_field_1`: 自由項目1
        - `data[].client_field_2`: 自由項目2
        - `data[].client_field_3`: 自由項目3
        - `data[].payment_term_day`: 支払期限日数
        - `data[].reference_order_id`: バーチャル口座 再利用 オーダーID
        - `data[].use_exact_deposit_amount`: 入金可能額設定
    PaymentBulk.Creating.Request:
      type: object
      properties:
        file:
          allOf:
            - $ref: '#/components/schemas/file'
    PaymentBulk.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/PaymentBulk'
    PaymentBulkId_schema:
      type: string
      example: bp_**********************
    PaymentBulkDetailStatus:
      type: string
      enum:
        - CHECKED
        - SUCCEEDED
        - FAILED
      description: |
        ステータス

        - `CHECKED`: チェック済み<br /><span class="smallText">データのチェックが完了し、決済処理の実行を待っています。</span>
        - `SUCCEEDED`: 決済成功<br /><span class="smallText">この決済の処理においてエラーが発生せず請求が完了しました。</span>
        - `FAILED`: 決済失敗<br /><span class="smallText">この決済の処理において1件以上のエラーが発生しました。</span>
    PaymentBulkDetail.ListRetrieving.QueryParams:
      type: object
      properties:
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkPayType'
          description: |
            決済種別\
            決済種別を指定します。

            - `Card`: カード
            - `Virtualaccount`: 銀行振込（バーチャル口座）
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkDetailStatus'
          description: |
            ステータス\
            決済ステータスを指定します。カンマ区切りにすることで複数指定（OR検索）できます。

            - `CHECKED`: チェック済み<br /><span class="smallText">データのチェックが完了し、決済処理の実行を待っています。</span>
            - `SUCCEEDED`: 決済成功<br /><span class="smallText">この決済の処理においてエラーが発生せず請求が完了しました。</span>
            - `FAILED`: 決済失敗<br /><span class="smallText">この決済の処理において1件以上のエラーが発生しました。</span>
      required:
        - pay_type
    item_code:
      type: string
      nullable: true
      minLength: 7
      maxLength: 7
      description: |
        商品コード
    transaction_id:
      type: string
      nullable: true
      minLength: 28
      maxLength: 28
      example: null
      description: |
        トランザクションID
    approve:
      type: string
      nullable: true
      minLength: 1
      maxLength: 7
      example: null
      description: |
        承認番号
    forward:
      type: string
      nullable: true
      minLength: 1
      maxLength: 7
      example: '12345'
      description: |
        仕向け先
    PaymentBulkDetail:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkDetailStatus'
          description: |
            決済ステータス

            - `CHECKED`: チェック済み<br /><span class="smallText">データのチェックが完了し、決済処理の実行を待っています。</span>
            - `SUCCEEDED`: 決済成功<br /><span class="smallText">この決済の処理においてエラーが発生せず請求が完了しました。</span>
            - `FAILED`: 決済失敗<br /><span class="smallText">この決済の処理において1件以上のエラーが発生しました。</span>
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        job_code:
          allOf:
            - $ref: '#/components/schemas/CardPaymentJobCode'
          description: |
            取引種別

            - `CAPTURE`：売上確定
        amount:
          allOf:
            - $ref: '#/components/schemas/properties-amount'
        tax:
          allOf:
            - $ref: '#/components/schemas/properties-tax'
        total_amount:
          allOf:
            - $ref: '#/components/schemas/total_amount'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
        pay_times:
          allOf:
            - $ref: '#/components/schemas/CardPayTimesResponse'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
        card_id:
          allOf:
            - $ref: '#/components/schemas/properties-id'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 3
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
        item_code:
          allOf:
            - $ref: '#/components/schemas/item_code'
        transaction_id:
          allOf:
            - $ref: '#/components/schemas/transaction_id'
        approve:
          allOf:
            - $ref: '#/components/schemas/approve'
        forward:
          allOf:
            - $ref: '#/components/schemas/forward'
    PaymentBulkDetail.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/PaymentBulkDetail'
          description: |
            一括決済詳細リスト\
            \
            決済1件につき1オブジェクトが格納され、オブジェクト内には決済情報が格納されます。
    PaymentBulkErrorDetail:
      type: object
      properties:
        number:
          type: string
          description: |
            行数
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FincodeAPIError'
    PaymentBulkErrorDetail.list:
      type: object
      properties:
        error_detail:
          type: array
          items:
            $ref: '#/components/schemas/PaymentBulkErrorDetail'
          description: |
            一括決済エラー詳細リスト\
            \
            エラー1件につき1オブジェクトが格納され、オブジェクト内にはエラーが発生した決済のIDとその決済で発生したエラーのリストが格納されます。
    properties-billing_amount:
      type: integer
      format: int64
      minLength: 1
      maxLength: 10
      example: 1000
      description: |
        振込依頼金額
    properties-billing_tax:
      type: integer
      format: int64
      nullable: true
      minLength: 1
      maxLength: 10
      example: 100
      description: |
        振込依頼金額（税送料）
    billing_total_amount:
      type: integer
      format: int64
      minLength: 1
      maxLength: 10
      example: 1100
      description: |
        振込依頼金額 合計\
        振込依頼金額と振込依頼金額（税送料）の合計金額です。
    properties-payment_method_id:
      allOf:
        - $ref: '#/components/schemas/PaymentMethod_properties-id'
    transaction_date:
      type: string
      nullable: false
      example: 2022/05/16
      description: |
        取引日\
        \
        形式： `yyyy/MM/dd`
    value_date:
      type: string
      nullable: true
      example: 2022/05/16
      description: |
        起算日\
        \
        銀行で入金が処理された営業日\
        形式： `yyyy/MM/dd`
    remitter_account_name:
      type: string
      nullable: true
      maxLength: 48
      example: ヤマダ　タロウ
      description: |
        振込依頼人 氏名\
        \
        振込依頼人（購入者）の氏名です。
    remitter_bank_name:
      type: string
      nullable: true
      maxLength: 30
      example: イロハギンコウ
      description: |
        振込依頼人 銀行名\
        \
        振込依頼人（購入者）の銀行名です。
    remitter_branch_name:
      type: string
      nullable: true
      maxLength: 15
      example: ホンテン
      description: |
        振込依頼人 支店名\
        \
        振込依頼人（購入者）の支店名です。
    overpayment_flag:
      type: string
      enum:
        - '0'
        - '1'
      description: |
        多重支払フラグ\
        この決済に対して複数回支払いが行われた場合`1`になります。

        - `0`: 0回、または1回の支払いが行われた
        - `1`: 2回以上、同一のバーチャル口座に対して支払いが行われた
    cancel_overpayment_flag:
      type: string
      enum:
        - '0'
        - '1'
      description: |
        キャンセル後支払フラグ\
        この決済をキャンセルした後に購入者がバーチャル口座に対して支払いを行った場合`1`になります。

        - `0`: キャンセル後支払は行われていない
        - `1`: キャンセル後支払が行われた
    expire_overpayment_flag:
      type: string
      enum:
        - '0'
        - '1'
      description: |
        期限切れ後支払フラグ\
        この決済の支払期限が過ぎた後に購入者がバーチャル口座に対して支払いを行った場合`1`になります。

        - `0`: 期限切れ後支払は行われていない
        - `1`: 期限切れ後支払が行われた
    properties-payment_term_day:
      type: integer
      format: int64
      minLength: 1
      maxLength: 2
      example: 3
      description: |
        支払期限日数\
        \
        実行日から見て、支払期限日数後の翌日AMに期限切れになります。\
        例）2024/4/1に、`支払期限日数=2`で決済実行した場合、2024/4/4 AMに期限切れ
    payment_term:
      type: string
      nullable: true
      example: 2022/05/16 23:59:59.999
      description: |
        支払期限\
        形式： `yyyy/MM/dd HH:mm:ss.SSS`
    properties-use_exact_deposit_amount:
      type: boolean
      enum:
        - true
        - false
      description: |
        入金可能額設定利用フラグ\
        この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを示すフラグです。
        設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

        - `true`: 入金可能額を設定する
        - `false`: 入金可能額を設定しない（デフォルト）
    PaymentBulkDetail.VirtualAccount:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkDetailStatus'
          description: |
            決済ステータス

            - `CHECKED`: チェック済み<br /><span class="smallText">データのチェックが完了し、決済処理の実行を待っています。</span>
            - `SUCCEEDED`: 決済成功<br /><span class="smallText">この決済の処理においてエラーが発生せず請求が完了しました。</span>
            - `FAILED`: 決済失敗<br /><span class="smallText">この決済の処理において1件以上のエラーが発生しました。</span>
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        billing_amount:
          allOf:
            - $ref: '#/components/schemas/properties-billing_amount'
        billing_tax:
          allOf:
            - $ref: '#/components/schemas/properties-billing_tax'
        billing_total_amount:
          allOf:
            - $ref: '#/components/schemas/billing_total_amount'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/properties-payment_method_id'
        va_branch_code:
          allOf:
            - $ref: '#/components/schemas/va_branch_code'
        va_branch_name:
          allOf:
            - $ref: '#/components/schemas/va_branch_name'
        va_account_number:
          allOf:
            - $ref: '#/components/schemas/va_account_number'
        va_account_name:
          allOf:
            - $ref: '#/components/schemas/va_account_name'
        virtual_account_id:
          allOf:
            - $ref: '#/components/schemas/virtual_account_id'
        account_assignment_date:
          allOf:
            - $ref: '#/components/schemas/account_assignment_date'
        transaction_date:
          allOf:
            - $ref: '#/components/schemas/transaction_date'
        value_date:
          allOf:
            - $ref: '#/components/schemas/value_date'
        remitter_account_name:
          allOf:
            - $ref: '#/components/schemas/remitter_account_name'
        remitter_bank_name:
          allOf:
            - $ref: '#/components/schemas/remitter_bank_name'
        remitter_branch_name:
          allOf:
            - $ref: '#/components/schemas/remitter_branch_name'
        overpayment_flag:
          allOf:
            - $ref: '#/components/schemas/overpayment_flag'
        cancel_overpayment_flag:
          allOf:
            - $ref: '#/components/schemas/cancel_overpayment_flag'
        expire_overpayment_flag:
          allOf:
            - $ref: '#/components/schemas/expire_overpayment_flag'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 3
        payment_term_day:
          allOf:
            - $ref: '#/components/schemas/properties-payment_term_day'
        payment_term:
          allOf:
            - $ref: '#/components/schemas/payment_term'
        reference_order_id:
          allOf:
            - $ref: '#/components/schemas/reference_order_id'
        use_exact_deposit_amount:
          allOf:
            - $ref: '#/components/schemas/properties-use_exact_deposit_amount'
    PaymentBulkDetail.VirtualAccount.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/PaymentBulkDetail.VirtualAccount'
          description: |
            一括決済詳細リスト\
            \
            決済1件につき1オブジェクトが格納され、オブジェクト内には決済情報が格納されます。
    PaymentBulkDetail.Amazonpay:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkDetailStatus'
          description: |
            決済ステータス

            - `CHECKED`: チェック済み<br /><span class="smallText">データのチェックが完了し、決済処理の実行を待っています。</span>
            - `SUCCEEDED`: 決済成功<br /><span class="smallText">この決済の処理においてエラーが発生せず請求が完了しました。</span>
            - `FAILED`: 決済失敗<br /><span class="smallText">この決済の処理において1件以上のエラーが発生しました。</span>
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        job_code:
          type: string
          enum:
            - CAPTURE
          example: CAPTURE
          description: |
            取引種別

            - `CAPTURE`：売上確定
        amount:
          allOf:
            - $ref: '#/components/schemas/properties-amount'
        tax:
          allOf:
            - $ref: '#/components/schemas/properties-tax'
        total_amount:
          allOf:
            - $ref: '#/components/schemas/total_amount'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/payment_method_id'
          description: |
            決済手段ID\
            この決済で使用する決済手段のIDです。取込ファイルで指定しなかった場合は、顧客のデフォルトの決済手段が使用されます。
        amazonpay_charge_permission_id:
          allOf:
            - $ref: '#/components/schemas/amazonpay_charge_permission_id'
        amazonpay_charge_id:
          allOf:
            - $ref: '#/components/schemas/amazonpay_charge_id'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: 加盟店自由項目 3
        note_to_buyer:
          allOf:
            - $ref: '#/components/schemas/note_to_buyer'
          description: |
            説明文            購入者のAmazon Pay画面および注文履歴に表示される説明文です。            <span class="smallText">※ 最大1024バイト。</span>
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
    PaymentBulkDetail.Amazonpay.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/PaymentBulkDetail.Amazonpay'
          description: |
            一括決済詳細リスト\
            \
            決済1件につき1オブジェクトが格納され、オブジェクト内には決済情報が格納されます。
    PaymentBulkDetail.ListRetrieving.Response:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/_ListResponse'
            - properties:
                error_code:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/error_code'
                  description: |
                    この一括決済処理において発生したエラーのうち、一番最新のエラーのエラーコードです。\
                    [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
            - $ref: '#/components/schemas/PaymentBulkDetail.list'
            - $ref: '#/components/schemas/PaymentBulkErrorDetail.list'
          title: カード決済
        - allOf:
            - $ref: '#/components/schemas/_ListResponse'
            - properties:
                error_code:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/error_code'
                  description: |
                    この一括決済処理において発生したエラーのうち、一番最新のエラーのエラーコードです。\
                    [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
            - $ref: '#/components/schemas/PaymentBulkDetail.VirtualAccount.list'
            - $ref: '#/components/schemas/PaymentBulkErrorDetail.list'
          title: 銀行振込（バーチャル口座）
        - allOf:
            - $ref: '#/components/schemas/_ListResponse'
            - properties:
                error_code:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/error_code'
                  description: |
                    この一括決済処理において発生したエラーのうち、一番最新のエラーのエラーコードです。\
                    [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
            - $ref: '#/components/schemas/PaymentBulkDetail.Amazonpay.list'
            - $ref: '#/components/schemas/PaymentBulkErrorDetail.list'
          title: Amazon Pay
    PaymentBulk.Deleting.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
          description: 削除された一括決済のID
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
    Invoice.ListRetrieving.QueryParams:
      type: object
      properties:
        status:
          type: string
          description: |
            インボイス請求書のステータス  
               
            カンマ(,)区切りで複数指定も可能です。  
               
            - `DRAFT`: 下書き
            - `AWAITING_CUSTOMER_PAYMENT`: 支払い待ち
            - `PAID`: 支払い完了
            - `CANCELED`: キャンセル済
        keyword:
          type: string
          minLength: 1
          maxLength: 150
          description: |
            キーワード  
              
            指定した場合、請求書作成時に指定した client_field_1, client_field_2, client_field_3 のいずれかにおいて指定したワードが部分一致する請求データのみを取得します。
        due_date_from:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            支払期日範囲（開始）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、支払期日が指定日以降である請求データのみを取得します。
        due_date_to:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            支払期日範囲（終了）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、支払期日が指定日以前の請求データのみを取得します。
        issue_date_from:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            発行日範囲（開始）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、発行日が指定日以降である請求データのみを取得します。
        issue_date_to:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            発行日の範囲指定（終了）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、発行日が指定日以前の請求データのみを取得します。
        total_amount_max:
          type: number
          minLength: 1
          maxLength: 14
          description: |
            合計金額範囲（上限）  
              
            指定した場合、合計金額が指定金額以下の請求データのみを取得します。
        total_amount_min:
          type: number
          minLength: 1
          maxLength: 14
          description: |
            合計金額範囲（下限）  
              
            指定した場合、合計金額が指定金額以上の請求データのみを取得します。
        created_from:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            作成日範囲（開始）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、作成日が指定日以降である請求データのみを取得します。
        created_to:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            作成日範囲（終了）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、作成日が指定日以前の請求データのみを取得します。
        customer_id:
          type: string
          minLength: 1
          maxLength: 60
          description: |
            顧客ID  
              
            指定した場合、顧客IDが完全一致する請求データのみを取得します。
        customer_name:
          type: string
          minLength: 1
          maxLength: 384
          description: |
            顧客名（請求先宛名）  
              
            指定した場合、顧客名が部分一致する請求データのみを取得します。
        invoice_number:
          type: string
          minLength: 1
          maxLength: 30
          description: |
            請求番号  
              
            指定した場合、請求番号が一致する請求データのみを取得します。
        lines_date_from:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            取引日付範囲（開始）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、「取引の日付」として入力した取引日が指定日以降の請求データのみを取得します。
        lines_date_to:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            取引日範囲（終了）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、「取引の日付」として入力した取引日が指定日以前の請求データのみを取得します。
        transaction_date_from:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            支払完了日範囲（開始）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、支払い完了日が指定日以降の請求データのみを取得します。
        transaction_date_to:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            支払完了日範囲（終了）  
            形式： `yyyy/MM/dd`  
              
            指定した場合、支払い完了日が指定日以前の請求データのみを取得します。
        is_uncollectible:
          type: boolean
          description: |
            回収困難マーク

            - `true`: 回収困難マーク済の請求データのみを取得
            - `false`: 回収困難マークの無い請求データのみを取得
            - `null`: いずれも取得
        is_backfill:
          type: boolean
          description: |
            インボイス_領収書後付け発行フラグ

            - `true`: 後付けで発行された請求データのみを取得
            - `false`: 後付けで発行されていない請求データのみを取得
            - `null`: いずれも取得
    Invoice.ListItem:
      type: object
      description: インボイス情報 一覧項目
      properties:
        id:
          type: string
          description: |
            インボイスID
          minLength: 1
          maxLength: 30
        status:
          type: string
          description: |
            インボイス請求書のステータス

            - `DRAFT`: 下書き
            - `AWAITING_CUSTOMER_PAYMENT`: 支払い待ち
            - `PAID`: 支払い完了
            - `CANCELED`: キャンセル済
          minLength: 1
          maxLength: 25
        bill_pdf_url:
          type: string
          description: |
            [非推奨] インボイス請求書PDFダウンロードURL\
            ※ 2024年10月現在、請求書を表示するWebページのURLがレスポンスされます。このページへはインボイス 請求ページからアクセスできます。
          minLength: 1
          maxLength: 256
        receipt_pdf_url:
          type: string
          description: |
            [非推奨] インボイス領収書PDFダウンロードURL\
            ※ 2024年10月現在、領収書を表示するWebページのURLがレスポンスされます。このページへは支払い完了後にインボイス 請求ページからアクセスできます。
          minLength: 1
          maxLength: 256
        invoice_number:
          type: string
          description: |
            請求番号
          minLength: 1
          maxLength: 30
        bill_id:
          type: string
          description: |
            請求ID
          minLength: 1
          maxLength: 30
        invoice_backfill:
          type: object
          description: |
            後付け請求情報\
            既存決済に対して後付けでインボイス（領収書）を紐付けた場合に設定されます。
          properties:
            order_id:
              type: string
              nullable: true
              minLength: 1
              maxLength: 30
              description: |
                紐付け対象決済のオーダーID
            access_id:
              type: string
              nullable: true
              minLength: 24
              maxLength: 24
              description: |
                紐付け対象決済の取引ID
            paid_date:
              type: string
              nullable: true
              minLength: 10
              maxLength: 10
              description: |
                紐付け対象決済の支払日\
                形式： `yyyy/MM/dd`
        customer_id:
          type: string
          description: |
            顧客（請求先）ID
          minLength: 1
          maxLength: 60
        customer_name:
          type: string
          description: |
            顧客（請求先）宛名
          minLength: 1
          maxLength: 384
        overwrite_customer_name:
          type: string
          description: |
            上書き顧客（請求先）宛名
          minLength: 1
          maxLength: 384
        issue_date:
          type: string
          description: |
            発行年月日
            形式： `yyyy/MM/dd`
          minLength: 1
          maxLength: 10
        total_amount:
          type: number
          description: |
            合計金額
          minimum: 0
          maximum: 99999999999999
        billing_total_amount:
          type: number
          description: |
            請求金額合計
          minimum: 0
          maximum: 99999999999999
        pay_types:
          type: array
          items:
            type: string
          description: |
            利用可能な決済種別リスト

            - `"Virtualaccount"`: 銀行振込（バーチャル口座）決済
            - `"Card"`: カード決済
            - `"Directdebit"`: 口座振替決済
        due_date:
          type: string
          maxLength: 10
          description: |
            支払期日
            yyyy/MM/dd形式
        client_field_1:
          type: string
          maxLength: 100
          description: 加盟店自由項目1
        client_field_2:
          type: string
          maxLength: 100
          description: 加盟店自由項目2
        client_field_3:
          type: string
          maxLength: 100
          description: 加盟店自由項目3
        is_uncollectible:
          type: boolean
          description: |
            回収困難フラグ
        is_paid_externally:
          type: boolean
          description: |
            fincode外支払フラグ
        transaction_date:
          type: string
          description: 支払完了日 形式：`yyyy/MM/dd HH:mm:ss.SSS`
        created:
          type: string
          description: 作成日時 形式： `yyyy/MM/dd HH:mm:ss.SSS`
        updated:
          type: string
          description: 更新日時 形式： `yyyy/MM/dd HH:mm:ss.SSS`
    Invoice.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/Invoice.ListItem'
    Invoice.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/Invoice.list'
    tax_included_amount:
      type: number
      description: |
        税込金額  
    input_type:
      type: string
      enum:
        - amount
      description: |
        取引金額の入力方式
        - null：単価入力時(デフォルト)
        - `amount`：金額(税込)入力時
    directdebit-properties-payment_method_id:
      type: string
      minLength: 1
      maxLength: 25
      description: 決済手段ID
    properties-target_date:
      type: string
      description: |
        振替指定日
        形式：`YYYY/MM/DD`
    properties-remarks:
      type: string
      description: ご利用明細表示内容
    directdebit_failure_mail_send_flag:
      type: string
      enum:
        - '0'
        - '1'
      description: |
        口座振替失敗メール送信フラグ

        口座振替失敗時に請求元に対し通知メールを送るか決定するフラグ

        - `0`：メールを送信しない（デフォルト）
        - `1`：メールを送信する
    Invoice.Creating.Request:
      type: object
      properties:
        id:
          type: string
          maxLength: 30
          description: |
            インボイスID  
              
            ショップ内で一意な値を設定してください。  
            未指定の場合自動生成します。
        bill_mail_send_flag:
          type: string
          description: |
            請求書メール送信フラグ  
              
            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する  
        receipt_mail_send_flag:
          type: string
          description: |
            領収書メール送信フラグ  
              
            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する  
        underpayment_mail_send_flag:
          type: string
          description: |
            差額請求メール送信フラグ  
              
            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する  
        invoice_number:
          type: string
          minLength: 1
          maxLength: 30
          description: |
            請求番号  
            指定しないまま請求書を開始した場合、自動採番されます。
        customer_id:
          type: string
          maxLength: 60
          description: 顧客（請求先）ID
        customer_honorific:
          type: string
          maxLength: 20
          description: 顧客（請求先）敬称
        customer_overwrite:
          type: object
          description: |
            上書き顧客（請求先）情報\
            `customer_id`で指定した顧客の情報のうち、上書きを行う場合に指定します。\
            顧客情報の上書きはこのインボイス情報においてのみ適用されます。
          properties:
            name:
              type: string
              maxLength: 384
              description: 上書き顧客（請求先）宛名
            email:
              type: string
              maxLength: 254
              description: 上書き顧客（請求先）メールアドレス
            addr_country:
              type: string
              maxLength: 3
              description: 上書き顧客（請求先）住所の国コード
            addr_state:
              type: string
              maxLength: 3
              description: 上書き顧客（請求先） 住所の都道府県コード
            addr_city:
              type: string
              maxLength: 50
              description: 上書き顧客（請求先） 住所の市区町村
            addr_line_1:
              type: string
              maxLength: 50
              description: 上書き顧客（請求先） 住所の町名・番地
            addr_line_2:
              type: string
              maxLength: 50
              description: 上書き顧客（請求先） 住所の建物名・部屋番号
            addr_line_3:
              type: string
              maxLength: 50
              description: 上書き顧客（請求先）住所 その他
            addr_post_code:
              type: string
              maxLength: 16
              description: 上書き顧客（請求先） 住所の郵便番号
        issuer_overwrite:
          type: object
          description: |
            発行元事業者情報  
            指定しなかった場合、本番環境申請の際にご提出いただいた情報を利用します。  
          properties:
            addr_country:
              type: string
              maxLength: 3
              description: 発行元事業者住所の国コード
            addr_state:
              type: string
              maxLength: 3
              description: 発行元事業者住所の都道府県コード
            addr_city:
              type: string
              maxLength: 50
              description: 発行元事業者住所の市区町村
            addr_line_1:
              type: string
              maxLength: 100
              description: 発行元事業者住所の町名・番地
            addr_line_2:
              type: string
              maxLength: 100
              description: 発行元事業者住所の建物名・部屋番号
            addr_line_3:
              type: string
              maxLength: 50
              description: 発行元事業者住所 その他
            addr_post_code:
              type: string
              maxLength: 8
              description: 発行元事業者住所の郵便番号
            email:
              type: string
              maxLength: 254
              description: 発行元事業者のメールアドレス
            phone_number:
              type: string
              maxLength: 15
              description: 発行元事業者の電話番号
        is_tax_included:
          type: boolean
          description: |
            内税表記有無  
              
            - `true`: 内税表記  
            - `false`: 外税表記  
        due_date:
          type: string
          maxLength: 10
          description: |
            支払期日  
            yyyy/MM/dd形式  
        memo:
          type: string
          description: 備考
        lines:
          type: array
          description: 取引内容
          items:
            type: object
            properties:
              date:
                type: string
                minLength: 10
                maxLength: 10
                description: |
                  日付  
                  yyyy/MM/dd  
              name:
                type: string
                minLength: 1
                maxLength: 200
                description: 品目
              unit_price:
                type: number
                minLength: 1
                maxLength: 11
                description: |
                  単価  
              quantity:
                type: number
                minimum: 0
                maximum: 2147483647
                description: |
                  数量  
              tax_rate:
                type: number
                minLength: 1
                maxLength: 3
                description: 適用税率（%）
              tax_included_amount:
                allOf:
                  - $ref: '#/components/schemas/tax_included_amount'
        pay_types:
          type: array
          items:
            type: string
          description: |
            ショップで利用可能な決済種別のリスト  
            利用可能にする決済種別全てを指定してください。  
              
            - `Virtualaccount`: 銀行振込（バーチャル口座）決済
            - `Card`: カード決済
            - `Directdebit`: 口座振替決済
        input_type:
          allOf:
            - $ref: '#/components/schemas/input_type'
        card:
          type: object
          description: カード決済情報
          properties:
            job_code:
              type: string
              minLength: 1
              maxLength: 7
              default: AUTH
              description: |
                処理区分  
                以下のいずれかを指定してください。  

                - `AUTH`: 仮売上  
                - `CAPTURE`: 即時売上  
            tds_type:
              type: string
              minLength: 1
              maxLength: 1
              description: |
                3DS利用種別  
                3DSを使用して決済を行うかを設定します。  
                - `0`: 行わない（デフォルト）  
                - `2`: 行う（3DS2.0を利用）  
            tds2_type:
              type: string
              minLength: 1
              maxLength: 1
              description: |
                3DS2非対応時設定  
                仕向先カード会社が3DS2.0に未対応な場合の、後続処理を設定します。  
                - `1`: 3DS1.0での認証を実施  
                - `2`: エラーとして処理終了（デフォルト）  
                - `3`: 通常オーソリを実施
            tds2_tenant_name:
              type: string
              minLength: 1
              maxLength: 25
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                3Dセキュア表示店舗名  
            tds2_ch_acc_change:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                3DSリクエスター アカウント最終更新日  
                yyyyMMdd形式  
            tds2_ch_acc_date:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                3DSリクエスター アカウント開設日  
                yyyyMMdd形式  
            tds2_ch_acc_pw_change:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                3DSリクエスター アカウントパスワード変更日  
                yyyyMMdd形式  
            tds2_nb_purchase_account:
              type: string
              minLength: 1
              maxLength: 4
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                過去6ヶ月間の購入回数  
            tds2_payment_acc_age:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード登録日  
                yyyyMMdd形式  
            tds2_provision_attempts_day:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                過去24時間のカード追加の試行回数  
            tds2_ship_address_usage:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の最初の使用日  
                yyyyMMdd形式  
            tds2_ship_name_ind:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客名と出荷先名の一致/不一致情報  
                  
                - `01`: カード顧客名と配送先名が一致  
                - `02`: カード顧客名と配送先名が不一致  
            tds2_suspicious_acc_activity:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                アカウントの不審行為情報  
                カード顧客で、不審な行動（過去の不正行為を含む）を加盟店様が発見したかどうかを設定  
                  
                - `01`: 不審な行動は見られなかった  
                - `02`: 不審な行動が見られた  
            tds2_txn_activity_day:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                過去24時間の取引回数  
            tds2_txn_activity_year:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                前年の取引回数  
            tds2_three_ds_req_auth_data:
              type: string
              minLength: 1
              maxLength: 2048
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                ログイン証跡  
                ログイン証跡を設定した場合  
                ログイン方法/ログイン日時の設定が必要 
                01 = 認証なし（ゲストとしてログイン）  
                02 = 加盟店様自身の認証情報  
                03 = SSO(シングルサインオン)  
                04 = イシュアーの認証情報  
                05 = サードパーティ認証  
                06 = FIDO認証  
            tds2_three_ds_req_auth_timestamp:
              type: string
              minLength: 12
              maxLength: 12
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                ログイン日時  
                ログイン日時を設定した場合  
                ログイン証跡/ログイン方法の設定が必要  
                YYYYMMDDHHMM形式  
            tds2_addr_match:
              type: string
              minLength: 1
              maxLength: 1
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                請求先住所と配送先住所の一致/不一致情報  
                カード顧客の配送先住所とカード顧客の請求先住所の一致/不一致の設定が必要  
                Y=一致  
                N=不一致  
            tds2_bill_addr_city:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の都市  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_bill_addr_country:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の国コード  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_bill_addr_line_1:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の区域部分の１行目  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_bill_addr_line_2:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の区域部分の２行目  
            tds2_bill_addr_line_3:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の区域部分の３行目  
            tds2_bill_addr_post_code:
              type: string
              minLength: 1
              maxLength: 16
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の郵便番号  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_bill_addr_state:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の州または都道府県コード  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_email:
              type: string
              minLength: 1
              maxLength: 254
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客のメールアドレス  
            tds2_home_phone_cc:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                自宅電話の国コード（+を含まない）  
                自宅電話の国コードを設定した場合  
                自宅電話番号の設定が必要  
            tds2_home_phone_no:
              type: string
              minLength: 1
              maxLength: 15
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                自宅電話番号  
                自宅電話番号を設定した場合  
                自宅電話の国コードの設定が必要  
                ハイフン（-）なし、数字のみ  
            tds2_mobile_phone_cc:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                携帯電話の国コード（+を含まない）  
                携帯電話の国コードを設定した場合  
                携帯電話番号の設定が必要  
            tds2_mobile_phone_no:
              type: string
              minLength: 1
              maxLength: 15
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                携帯電話番号  
                携帯電話番号の国コードを設定した場合  
                ハイフン（-）なし、数字のみ  
            tds2_work_phone_cc:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                職場電話の国コード（+を含まない）  
                職場電話の国コードを設定した場合  
                職場電話番号の設定が必要  
            tds2_work_phone_no:
              type: string
              minLength: 1
              maxLength: 15
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                職場電話番号  
                職場電話番号を設定した場合  
                ハイフン（-）なし、数字のみ  
            tds2_ship_addr_city:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の都市  
            tds2_ship_addr_country:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の国コード  
            tds2_ship_addr_line_1:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の区域部分の１行目  
            tds2_ship_addr_line_2:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の区域部分の２行目  
            tds2_ship_addr_line_3:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の区域部分の３行目  
            tds2_ship_addr_post_code:
              type: string
              minLength: 1
              maxLength: 16
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の郵便番号  
            tds2_ship_addr_state:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の州または都道府県コード  
            tds2_delivery_email_address:
              type: string
              minLength: 1
              maxLength: 254
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                納品先電子メールアドレス  
            tds2_delivery_timeframe:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                商品納品時間枠  
                01 = 電子デリバリー  
                02 = 当日出荷  
                03 = 翌日出荷  
                04 = 2日目以降の出荷  
            tds2_gift_card_amount:
              type: string
              minLength: 1
              maxLength: 15
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                プリペイドカードまたはギフトカードの総購入金額  
            tds2_gift_card_count:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                購入されたプリペイドカードまたはギフトカード / コードの総数  
                0埋め2桁の数字  
            tds2_gift_card_curr:
              type: string
              minLength: 3
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                通貨コード  
                ※以下のコードは対象外  
                955, 956, 957, 958, 959, 960, 961, 962,  
                963, 964, 999  
            tds2_pre_order_date:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                商品の発売予定日  
                YYYYMMDD形式  
            tds2_pre_order_purchase_ind:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                商品の販売時期情報  
                01 = 発売済み
                02 = 先行予約商品  
            tds2_reorder_items_ind:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                商品の注文情報  
                01 = 初回注文  
                02 = 再注文  
            tds2_ship_ind:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                取引の出荷方法  
                01 = カード顧客の請求先住所に配送する  
                02 = 加盟店様が保持している別の、確認済み住所に配送する  
                03 = カード顧客の請求先住所と異なる住所に配送する  
                04 = 店舗へ配送 / 近所の店舗での受け取り（店舗の住所は配送先住所で指定する）  
                05 = デジタル商品（オンラインサービス、電子ギフトカードおよび償還コードを含む）  
                06 = 配送なし（旅行およびイベントのチケット）  
                07 = その他（ゲーム、配送されないデジタルサービス、電子メディアの購読料など）  
            tds2_recurring_expiry:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                継続課金の期限  
                YYYYMMDD形式  
            tds2_recurring_frequency:
              type: string
              minLength: 1
              maxLength: 4
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                継続課金の課金最小間隔日数
        virtual_account:
          type: object
          description: 銀行振込（バーチャル口座）情報
          properties:
            reference_invoice_id:
              type: string
              minLength: 1
              maxLength: 30
              description: |
                バーチャル口座 再利用 インボイスID\
                \
                あるインボイス情報が持つバーチャル口座を再利用する場合、そのインボイス情報のIDを参照先として指定します。\
                バーチャル口座の再利用が可能なインボイスの条件は以下の通りです。

                 - 参照するインボイスのステータスが `PAID` であること
                 - 参照するインボイスのステータスが `PAID` に遷移してから90日以内であること
            use_exact_deposit_amount:
              type: boolean
              enum:
                - true
                - false
              description: |
                入金可能額設定利用フラグ\
                この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを示すフラグです。
                設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

                - `true`: 入金可能額を設定する
                - `false`: 入金可能額を設定しない（デフォルト）
        directdebit:
          type: object
          description: |
            口座振替情報
          properties:
            payment_method_id:
              allOf:
                - $ref: '#/components/schemas/directdebit-properties-payment_method_id'
            target_date:
              allOf:
                - $ref: '#/components/schemas/properties-target_date'
            remarks:
              allOf:
                - $ref: '#/components/schemas/properties-remarks'
            directdebit_failure_mail_send_flag:
              allOf:
                - $ref: '#/components/schemas/directdebit_failure_mail_send_flag'
        client_field_1:
          type: string
          minLength: 1
          maxLength: 100
          description: 加盟店自由項目1
        client_field_2:
          type: string
          minLength: 1
          maxLength: 100
          description: 加盟店自由項目2
        client_field_3:
          type: string
          minLength: 1
          maxLength: 100
          description: 加盟店自由項目3
        invoice_backfill:
          type: object
          description: |
            領収書後付け発行情報\
            指定した場合、インボイス発行時に既存決済を紐づけます。\
            指定する場合は3項目すべての指定が必要です。\
            指定できる決済種別は `Card` / `Virtualaccount` / `Directdebit` のみで、複数の決済手段を同時に指定することはできません。\
          properties:
            order_id:
              type: string
              maxLength: 30
              description: 既存決済のオーダーID
            access_id:
              type: string
              minLength: 24
              maxLength: 24
              description: 既存決済の取引ID
            paid_date:
              type: string
              maxLength: 10
              description: |
                既存決済の支払日\
                形式： `yyyy/MM/dd`
    Invoice:
      type: object
      properties:
        id:
          type: string
          description: |
            インボイスID
          minLength: 1
          maxLength: 30
        status:
          type: string
          description: |
            インボイス請求書のステータス  
              
            - `DRAFT`: 下書き
            - `AWAITING_CUSTOMER_PAYMENT`: 支払い待ち
            - `PAID`: 支払い完了
            - `CANCELED`: キャンセル済
          minLength: 1
          maxLength: 25
        invoice_url:
          type: string
          description: |
            インボイス 請求ページURL
          minLength: 1
          maxLength: 256
        bill_mail_send_flag:
          type: string
          description: |
            請求書メール送信フラグ (0: メールを送信しない 1: メールを送信する)
          enum:
            - '0'
            - '1'
        bill_pdf_url:
          type: string
          description: |
            [非推奨] インボイス請求書PDFダウンロードURL\
            ※ 2024年10月現在、請求書を表示するWebページのURLがレスポンスされます。このページへはインボイス 請求ページからアクセスできます。
          minLength: 1
          maxLength: 256
        receipt_mail_send_flag:
          type: string
          description: |
            領収書メール送信フラグ (0: メールを送信しない 1: メールを送信する)
          enum:
            - '0'
            - '1'
        underpayment_mail_send_flag:
          type: string
          description: |
            差額請求メール送信フラグ (0: メールを送信しない 1: メールを送信する)
          enum:
            - '0'
            - '1'
        receipt_pdf_url:
          type: string
          description: |
            [非推奨] インボイス領収書PDFダウンロードURL\
            ※ 2024年10月現在、領収書を表示するWebページのURLがレスポンスされます。このページへは支払い完了後にインボイス 請求ページからアクセスできます。
          minLength: 1
          maxLength: 256
        invoice_number:
          type: string
          description: |
            請求番号
          minLength: 1
          maxLength: 30
        customer_id:
          type: string
          description: |
            顧客（請求先）ID
          minLength: 1
          maxLength: 60
        customer_honorific:
          type: string
          description: |
            顧客（請求先）敬称
          minLength: 1
          maxLength: 20
        customer:
          type: object
          description: |
            顧客（請求先）情報
          properties:
            name:
              type: string
              minLength: 1
              maxLength: 384
              description: |
                顧客（請求先）宛名
            email:
              type: string
              minLength: 1
              maxLength: 254
              description: |
                顧客（請求先）メールアドレス
            addr_country:
              type: string
              description: |
                顧客（請求先）住所の国コード  
              minLength: 1
              maxLength: 3
            addr_state:
              type: string
              description: |
                顧客（請求先）住所の都道府県コード  
              minLength: 1
              maxLength: 3
            addr_city:
              type: string
              description: |
                顧客（請求先）住所の市区町村  
              minLength: 1
              maxLength: 50
            addr_line_1:
              type: string
              description: |
                顧客（請求先）住所の町名・番地  
              minLength: 1
              maxLength: 50
            addr_line_2:
              type: string
              description: |
                顧客（請求先）住所の建物名・部屋番号  
              minLength: 1
              maxLength: 50
            addr_line_3:
              type: string
              description: |
                顧客（請求先）住所 その他  
              minLength: 1
              maxLength: 50
            addr_post_code:
              type: string
              description: |
                顧客（請求先）住所の郵便番号  
              minLength: 1
              maxLength: 16
        customer_overwrite:
          type: object
          description: |
            上書き顧客（請求先）情報  
          properties:
            name:
              type: string
              description: |
                上書き顧客（請求先）宛名  
              minLength: 1
              maxLength: 384
            email:
              type: string
              description: |
                上書き顧客（請求先）メールアドレス  
              minLength: 1
              maxLength: 254
            addr_country:
              type: string
              description: |
                上書き顧客（請求先）住所の国コード  
              minLength: 1
              maxLength: 3
            addr_state:
              type: string
              description: |
                上書き顧客（請求先）住所の都道府県コード  
              minLength: 1
              maxLength: 3
            addr_city:
              type: string
              description: |
                上書き顧客（請求先）住所の市区町村  
              minLength: 1
              maxLength: 50
            addr_line_1:
              type: string
              description: |
                上書き顧客（請求先）住所の町名・番地  
              minLength: 1
              maxLength: 50
            addr_line_2:
              type: string
              description: |
                上書き顧客（請求先）住所の建物名・部屋番号  
              minLength: 1
              maxLength: 50
            addr_line_3:
              type: string
              description: |
                上書き顧客（請求先）住所 その他  
              minLength: 1
              maxLength: 50
            addr_post_code:
              type: string
              description: |
                上書き顧客（請求先）住所の郵便番号  
              minLength: 1
              maxLength: 16
        issuer:
          type: object
          description: |
            発行元事業者情報  
          properties:
            name:
              type: string
              description: |
                発行元事業者名  
              minLength: 1
              maxLength: 150
            invoice_registration_number:
              type: string
              description: |
                適格請求書発行事業者登録番号  
              minLength: 1
              maxLength: 14
            addr_state:
              type: string
              description: |
                発行元事業者住所の都道府県コード  
              minLength: 1
              maxLength: 3
            addr_city:
              type: string
              description: |
                発行元事業者住所の市区町村  
              minLength: 1
              maxLength: 50
            addr_line_1:
              type: string
              description: |
                発行元事業者住所の町名・番地  
              minLength: 1
              maxLength: 100
            addr_line_2:
              type: string
              description: |
                発行元事業者住所の建物名・部屋番号  
              minLength: 1
              maxLength: 100
            addr_line_3:
              type: string
              description: |
                発行元事業者住所 その他  
              minLength: 1
              maxLength: 50
            addr_post_code:
              type: string
              description: |
                発行元事業者住所の郵便番号  
              minLength: 1
              maxLength: 8
            email:
              type: string
              description: |
                発行元事業者のメールアドレス  
              minLength: 3
              maxLength: 254
            phone_number:
              type: string
              description: |
                発行元事業者の電話番号  
              minLength: 1
              maxLength: 15
        issuer_overwrite:
          type: object
          description: |
            上書き発行元事業者情報  
          properties:
            addr_state:
              type: string
              description: |
                発行元事業者住所の都道府県コード  
              minLength: 1
              maxLength: 3
            addr_city:
              type: string
              description: |
                発行元事業者住所の市区町村  
              minLength: 1
              maxLength: 50
            addr_line_1:
              type: string
              description: |
                発行元事業者住所の町名・番地  
              minLength: 1
              maxLength: 100
            addr_line_2:
              type: string
              description: |
                発行元事業者住所の建物名・部屋番号  
              minLength: 1
              maxLength: 100
            addr_line_3:
              type: string
              description: |
                発行元事業者住所 その他  
              minLength: 1
              maxLength: 50
            addr_post_code:
              type: string
              description: |
                発行元事業者住所の郵便番号  
              minLength: 1
              maxLength: 8
            email:
              type: string
              description: |
                発行元事業者のメールアドレス  
              minLength: 3
              maxLength: 254
            phone_number:
              type: string
              description: |
                発行元事業者の電話番号  
              minLength: 1
              maxLength: 15
        issue_date:
          type: string
          description: |
            発行年月日  
            形式： `yyyy/MM/dd`  
          minLength: 1
          maxLength: 10
        lines:
          type: array
          description: |
            取引内容レコード  
          items:
            type: object
            properties:
              date:
                type: string
                description: |
                  日付  
                  形式： `yyyy/MM/dd`  
                minLength: 1
                maxLength: 10
              name:
                type: string
                description: |
                  品目  
                minLength: 1
                maxLength: 200
              unit_price:
                type: number
                description: |
                  単価  
                minimum: 0
                maximum: 99999999999
              quantity:
                type: integer
                description: |
                  数量  
                minimum: 1
                maximum: 2147483647
              tax_rate:
                type: number
                description: |
                  適用税率（%）  
              tax_included_amount:
                type: number
                description: |
                  税込金額  
        total_amount:
          type: number
          description: |
            合計金額  
          minimum: 0
          maximum: 99999999999999
        billing_total_amount:
          type: number
          description: |
            請求金額合計  
          minimum: 0
          maximum: 99999999999999
        pay_types:
          type: array
          items:
            type: string
          description: |
            利用可能な決済種別リスト  
              
            - `"Virtualaccount"`: 銀行振込（バーチャル口座）決済
            - `"Card"`: カード決済
            - `"Directdebit"`: 口座振替決済
        input_type:
          type: string
          enum:
            - amount
          description: |
            取引金額の入力方式
            - null：単価入力時(デフォルト)
            - `amount`：金額(税込)入力時
        card:
          type: object
          description: |
            カード決済情報
          properties:
            job_code:
              type: string
              description: |
                処理区分  
              minLength: 1
              maxLength: 7
            tds_type:
              type: string
              description: |
                3DS利用種別  
              minLength: 1
              maxLength: 1
            tds2_type:
              type: string
              description: |
                3DS2非対応時設定  
              minLength: 1
              maxLength: 1
            td_tenant_name:
              type: string
              description: |
                3Dセキュア表示店舗名  
              minLength: 1
              maxLength: 25
            tds2_ch_acc_change:
              type: string
              description: |
                3DSリクエスター アカウント最終更新日  
                yyyyMMdd形式  
              minLength: 8
              maxLength: 8
            tds2_ch_acc_date:
              type: string
              description: |
                3DSリクエスター アカウント開設日  
                yyyyMMdd形式  
              minLength: 8
              maxLength: 8
            tds2_ch_acc_pw_change:
              type: string
              description: |
                3DSリクエスター アカウントパスワード変更日  
                yyyyMMdd形式  
              minLength: 8
              maxLength: 8
            tds2_nb_purchase_account:
              type: string
              description: |
                過去6ヶ月間の購入回数  
              minLength: 1
              maxLength: 4
            tds2_payment_acc_age:
              type: string
              description: |
                カード登録日  
                yyyyMMdd形式  
              minLength: 8
              maxLength: 8
            tds2_provision_attempts_day:
              type: string
              description: |
                過去24時間のカード追加の試行回数  
              minLength: 1
              maxLength: 3
            tds2_ship_address_usage:
              type: string
              description: |
                出荷先住所の最初の使用日  
                yyyyMMdd形式  
              minLength: 8
              maxLength: 8
            tds2_ship_name_ind:
              type: string
              description: |
                カード顧客名と出荷先名の一致/不一致情報  
                01 = カード顧客名と配送先名が一致  
                02 = カード顧客名と配送先名が不一致  
              minLength: 2
              maxLength: 2
            tds2_suspicious_acc_activity:
              type: string
              description: |
                アカウントの不審行為情報  
                01 = 不審な行動は見られなかった  
                02 = 不審な行動が見られた  
              minLength: 2
              maxLength: 2
            tds2_txn_activity_day:
              type: string
              description: |
                過去24時間の取引回数  
              minLength: 1
              maxLength: 3
            tds2_txn_activity_year:
              type: string
              description: |
                前年の取引回数  
              minLength: 1
              maxLength: 3
            tds2_three_ds_req_auth_data:
              type: string
              description: |
                ログイン証跡  
                ログイン方法/ログイン日時の設定が必要  
              minLength: 1
              maxLength: 2048
            tds2_three_ds_req_auth_method:
              type: string
              description: |
                ログイン方法  
                01 = 認証なし（ゲストとしてログイン）  
                02 = 加盟店様自身の認証情報  
                03 = SSO(シングルサインオン)  
                04 = イシュアーの認証情報  
                05 = サードパーティ認証  
                06 = FIDO認証  
              minLength: 2
              maxLength: 2
            tds2_three_ds_req_auth_timestamp:
              type: string
              description: |
                ログイン日時  
                YYYYMMDDHHMM形式  
              minLength: 12
              maxLength: 12
            tds2_addr_match:
              type: string
              description: |
                請求先住所と配送先住所の一致/不一致情報  
                  
                - `Y`: 一致  
                - `N`: 不一致  
              minLength: 1
              maxLength: 1
            tds2_bill_addr_city:
              type: string
              description: |
                カード顧客の請求先住所の都市  
              minLength: 1
              maxLength: 50
            tds2_bill_addr_country:
              type: string
              description: |
                カード顧客の請求先住所の国コード  
              minLength: 1
              maxLength: 3
            tds2_bill_addr_line_1:
              type: string
              description: |
                カード顧客の請求先住所の区域部分の１行目  
              minLength: 1
              maxLength: 50
            tds2_bill_addr_line_2:
              type: string
              description: |
                カード顧客の請求先住所の区域部分の２行目  
              minLength: 1
              maxLength: 50
            tds2_bill_addr_line_3:
              type: string
              description: |
                カード顧客の請求先住所の区域部分の３行目  
              minLength: 1
              maxLength: 50
            tds2_bill_addr_post_code:
              type: string
              description: |
                カード顧客の請求先住所の郵便番号  
              minLength: 1
              maxLength: 16
            tds2_bill_addr_state:
              type: string
              description: |
                カード顧客の請求先住所の州または都道府県コード  
              minLength: 1
              maxLength: 3
            tds2_email:
              type: string
              description: |
                カード顧客のメールアドレス  
              minLength: 1
              maxLength: 254
            tds2_home_phone_cc:
              type: string
              description: |
                自宅電話の国コード（+を含まない）  
              minLength: 1
              maxLength: 3
            tds2_home_phone_no:
              type: string
              description: |
                自宅電話番号  
                ハイフン（-）なし、数字のみ  
              minLength: 1
              maxLength: 15
            tds2_mobile_phone_cc:
              type: string
              description: |
                携帯電話の国コード（+を含まない）  
              minLength: 1
              maxLength: 3
            tds2_mobile_phone_no:
              type: string
              description: |
                携帯電話番号  
                ハイフン（-）なし、数字のみ  
              minLength: 1
              maxLength: 15
            tds2_work_phone_cc:
              type: string
              description: |
                職場電話の国コード（+を含まない）  
              minLength: 1
              maxLength: 3
            tds2_work_phone_no:
              type: string
              description: |
                職場電話番号  
                ハイフン（-）なし、数字のみ  
              minLength: 1
              maxLength: 15
            tds2_ship_addr_city:
              type: string
              description: |
                出荷先住所の都市  
              minLength: 1
              maxLength: 50
            tds2_ship_addr_country:
              type: string
              description: |
                出荷先住所の国コード  
              minLength: 1
              maxLength: 3
            tds2_ship_addr_line_1:
              type: string
              description: |
                出荷先住所の区域部分の１行目  
              minLength: 1
              maxLength: 50
            tds2_ship_addr_line_2:
              type: string
              description: |
                出荷先住所の区域部分の２行目  
              minLength: 1
              maxLength: 50
            tds2_ship_addr_line_3:
              type: string
              description: |
                出荷先住所の区域部分の３行目  
              minLength: 1
              maxLength: 50
            tds2_ship_addr_post_code:
              type: string
              description: |
                出荷先住所の郵便番号  
              minLength: 1
              maxLength: 16
            tds2_ship_addr_state:
              type: string
              description: |
                出荷先住所の州または都道府県コード  
              minLength: 1
              maxLength: 3
            tds2_delivery_email_address:
              type: string
              description: |
                出荷先住所のメールアドレス  
              minLength: 1
              maxLength: 254
            tds2_delivery_timeframe:
              type: string
              description: |
                商品納品時間枠  
                  
                - `01`: 電子デリバリー
                - `02`: 当日出荷
                - `03`: 翌日出荷
                - `04`: 2日目以降の出荷
              minLength: 2
              maxLength: 2
            tds2_gift_card_amount:
              type: string
              description: |
                プリペイドカードまたはギフトカードの総購入金額  
              minLength: 1
              maxLength: 15
            tds2_gift_card_count:
              type: string
              description: |
                購入されたプリペイドカードまたはギフトカード / コードの総数  
              minLength: 2
              maxLength: 2
            tds2_gift_card_curr:
              type: string
              description: |
                通貨コード  
              minLength: 3
              maxLength: 3
            tds2_pre_order_date:
              type: string
              description: |
                商品の発売予定日  
                YYYYMMDD形式  
              minLength: 8
              maxLength: 8
            tds2_pre_order_purchase_ind:
              type: string
              description: |
                商品の販売時期情報  
                  
                - `01`: 発売済み商品
                - `02`: 先行予約商品
              minLength: 2
              maxLength: 2
            tds2_reorder_items_ind:
              type: string
              description: |
                商品の注文情報  
                  
                - `01`: 初回注文  
                - `02`: 再注文
              minLength: 2
              maxLength: 2
            tds2_ship_ind:
              type: string
              description: |
                取引の出荷方法  
                  
                - `01`: カード顧客の請求先住所に配送する  
                - `02`: 加盟店様が保持している別の、確認済み住所に配送する  
                - `03`: カード顧客の請求先住所と異なる住所に配送する  
                - `04`: 店舗へ配送 / 近所の店舗での受け取り（店舗の住所は配送先住所で指定する）  
                - `05`: デジタル商品（オンラインサービス、電子ギフトカードおよび償還コードを含む）  
                - `06`: 配送なし（旅行およびイベントのチケット）  
                - `07`: その他（ゲーム、配送されないデジタルサービス、電子メディアの購読料など）  
              minLength: 2
              maxLength: 2
            tds2_recurring_expiry:
              type: string
              description: |
                継続課金の期限  
                YYYYMMDD形式  
              minLength: 8
              maxLength: 8
            tds2_recurring_frequency:
              type: string
              description: |
                継続課金の課金最小間隔日数  
              minLength: 1
              maxLength: 4
        virtual_account:
          type: object
          description: |
            銀行振込（バーチャル口座）情報  
          properties:
            reference_invoice_id:
              type: string
              description: |
                バーチャル口座 再利用 インボイスID  
              minLength: 0
              maxLength: 30
            use_exact_deposit_amount:
              type: boolean
              enum:
                - true
                - false
              description: |
                入金可能額設定利用フラグ\
                この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを示すフラグです。
                設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

                - `true`: 入金可能額を設定する
                - `false`: 入金可能額を設定しない（デフォルト）
        embedded_virtual_account:
          type: object
          description: |
            このインボイス情報に対して発行されたバーチャル口座情報\
            このバーチャル口座に対して振込を行うことでインボイスによる請求に対して支払いできます。
          properties:
            virtual_account_id:
              type: string
              description: |
                バーチャル口座ID  
              minLength: 1
              maxLength: 25
            branch_name:
              type: string
              description: |
                支店名  
              minLength: 1
              maxLength: 15
            branch_code:
              type: string
              description: |
                支店コード  
              minLength: 1
              maxLength: 3
            account_number:
              type: string
              description: |
                口座番号  
              minLength: 7
              maxLength: 7
            account_name:
              type: string
              description: |
                口座名義  
              minLength: 1
              maxLength: 40
        is_tax_included:
          type: boolean
          description: |
            内税表記有無  
              
            - `true`: 内税表記  
            - `false`: 外税表記  
        due_date:
          type: string
          maxLength: 10
          description: |
            支払期日  
            yyyy/MM/dd形式
        memo:
          type: string
          description: 備考
        client_field_1:
          type: string
          maxLength: 100
          description: 加盟店自由項目1
        client_field_2:
          type: string
          maxLength: 100
          description: 加盟店自由項目2
        client_field_3:
          type: string
          maxLength: 100
          description: 加盟店自由項目3
        is_uncollectible:
          type: boolean
          description: |
            回収困難フラグ  
        is_paid_externally:
          type: boolean
          description: |
            fincode外支払フラグ  
        transaction_date:
          type: string
          description: 支払完了日
        bill_id:
          type: string
          description: |
            請求ID
          minLength: 1
          maxLength: 30
        directdebit:
          type: object
          description: |
            口座振替情報
          properties:
            payment_method_id:
              type: string
              minLength: 1
              maxLength: 25
              description: 決済手段ID
            target_date:
              type: string
              description: |
                振替指定日
                形式：`YYYY/MM/DD`
            remarks:
              type: string
              description: ご利用明細表示内容
            settlement_route:
              type: string
              description: |
                振替サービス
                - `1`: 口座振替（5・6・23・27日）
                - `2`: 口座振替（1・5・20・26日）
            directdebit_failure_mail_send_flag:
              type: string
              enum:
                - '0'
                - '1'
              description: |
                口座振替失敗メール送信フラグ

                口座振替失敗時に請求元に対し通知メールを送るか決定するフラグ

                - `0`：メールを送信しない（デフォルト）
                - `1`：メールを送信する
        embedded_directdebit:
          type: object
          description: |
            このインボイス情報に対する口座振替の口座情報 この口座から引き落とし完了することでインボイスによる請求に対して支払いできます。
          properties:
            bank_name:
              type: string
              description: 金融機関名
            bank_code:
              type: string
              description: 金融機関コード
            branch_name:
              type: string
              description: 支店名
            branch_code:
              type: string
              description: 支店コード
            account_type:
              type: string
              description: 預金種別
            account_number:
              type: string
              description: 口座番号
            account_name_kana:
              type: string
              description: 口座名義人名（カナ）
        invoice_backfill:
          type: object
          description: |
            後付け請求情報\
            既存決済に対して後付けでインボイス（領収書）を紐付けた場合に設定されます。
          properties:
            order_id:
              type: string
              nullable: true
              minLength: 1
              maxLength: 30
              description: |
                紐付け対象決済のオーダーID
            access_id:
              type: string
              nullable: true
              minLength: 24
              maxLength: 24
              description: |
                紐付け対象決済の取引ID
            paid_date:
              type: string
              nullable: true
              minLength: 10
              maxLength: 10
              description: |
                紐付け対象決済の支払日\
                形式： `yyyy/MM/dd`
        created:
          type: string
          description: 作成日時
        updated:
          type: string
          description: 更新日時
    Invoice.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/Invoice'
    Invoice.CompanyStamp:
      type: object
      properties:
        company_stamp_data:
          type: string
          description: 社印データをBase64エンコードした文字列
    InvoiceDetail.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Invoice'
        - $ref: '#/components/schemas/Invoice.CompanyStamp'
    InvoiceDetail.Updating.Request:
      type: object
      properties:
        is_uncollectible:
          type: boolean
          description: 回収困難フラグ
        bill_mail_send_flag:
          type: string
          description: |
            請求書メール送信フラグ  
              
            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する
        receipt_mail_send_flag:
          type: string
          description: |
            領収書メール送信フラグ  
              
            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する
        underpayment_mail_send_flag:
          type: string
          description: |
            差額請求メール送信フラグ  
              
            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する
        invoice_number:
          type: string
          minLength: 1
          maxLength: 30
          description: |
            請求番号  
            指定しないまま請求書を開始した場合、自動採番されます。
        customer_id:
          type: string
          maxLength: 60
          description: 顧客（請求先）ID
        customer_honorific:
          type: string
          maxLength: 20
          description: 顧客（請求先）敬称
        customer_overwrite:
          type: object
          description: |
            上書き顧客（請求先）情報\
            `customer_id`で指定した顧客の情報のうち、上書きを行う場合に指定します。\
            顧客情報の上書きはこのインボイス情報においてのみ適用されます。
          properties:
            name:
              type: string
              maxLength: 384
              description: 上書き顧客（請求先）宛名
            email:
              type: string
              maxLength: 254
              description: 上書き顧客（請求先）メールアドレス
            addr_country:
              type: string
              maxLength: 3
              description: 上書き顧客（請求先）住所の国コード
            addr_state:
              type: string
              maxLength: 3
              description: 上書き顧客（請求先） 住所の都道府県コード
            addr_city:
              type: string
              maxLength: 50
              description: 上書き顧客（請求先） 住所の市区町村
            addr_line_1:
              type: string
              maxLength: 50
              description: 上書き顧客（請求先） 住所の町名・番地
            addr_line_2:
              type: string
              maxLength: 50
              description: 上書き顧客（請求先） 住所の建物名・部屋番号
            addr_line_3:
              type: string
              maxLength: 50
              description: 上書き顧客（請求先）住所 その他
            addr_post_code:
              type: string
              maxLength: 16
              description: 上書き顧客（請求先） 住所の郵便番号
        issuer_overwrite:
          type: object
          description: |
            発行元事業者情報  
            指定しなかった場合、本番環境申請の際にご提出いただいた情報を利用します。
          properties:
            addr_country:
              type: string
              maxLength: 3
              description: 発行元事業者住所の国コード
            addr_state:
              type: string
              maxLength: 3
              description: 発行元事業者住所の都道府県コード
            addr_city:
              type: string
              maxLength: 50
              description: 発行元事業者住所の市区町村
            addr_line_1:
              type: string
              maxLength: 100
              description: 発行元事業者住所の町名・番地
            addr_line_2:
              type: string
              maxLength: 100
              description: 発行元事業者住所の建物名・部屋番号
            addr_line_3:
              type: string
              maxLength: 50
              description: 発行元事業者住所 その他
            addr_post_code:
              type: string
              maxLength: 8
              description: 発行元事業者住所の郵便番号
            email:
              type: string
              maxLength: 254
              description: 発行元事業者のメールアドレス
            phone_number:
              type: string
              maxLength: 15
              description: 発行元事業者の電話番号
        is_tax_included:
          type: boolean
          description: |
            内税表記有無  
              
            - `true`: 内税表記  
            - `false`: 外税表記  
        due_date:
          type: string
          maxLength: 10
          description: |
            支払期日  
            yyyy/MM/dd形式  
        memo:
          type: string
          description: 備考
        lines:
          type: array
          description: 取引内容
          items:
            type: object
            properties:
              date:
                type: string
                minLength: 10
                maxLength: 10
                description: |
                  日付  
                  yyyy/MM/dd
              name:
                type: string
                minLength: 1
                maxLength: 200
                description: 品目
              unit_price:
                type: number
                minLength: 1
                maxLength: 11
                description: |
                  単価
              quantity:
                type: number
                minimum: 0
                maximum: 2147483647
                description: |
                  数量
              tax_rate:
                type: number
                minLength: 1
                maxLength: 3
                description: 適用税率（%）
              tax_included_amount:
                allOf:
                  - $ref: '#/components/schemas/tax_included_amount'
        pay_types:
          type: array
          items:
            type: string
          description: |
            ショップで利用可能な決済種別のリスト  
            利用可能にする決済種別全てを指定してください。  
              
            - `Virtualaccount`: 銀行振込（バーチャル口座）決済
            - `Card`: カード決済
            - `Directdebit`: 口座振替決済
        input_type:
          allOf:
            - $ref: '#/components/schemas/input_type'
        card:
          type: object
          description: カード決済情報
          properties:
            job_code:
              type: string
              minLength: 1
              maxLength: 7
              default: AUTH
              description: |
                処理区分  
                以下のいずれかを指定してください。  

                - `AUTH`: 仮売上  
                - `CAPTURE`: 即時売上
            tds_type:
              type: string
              minLength: 1
              maxLength: 1
              description: |
                3DS利用種別  
                3DSを使用して決済を行うかを設定します。  
                - `0`: 行わない（デフォルト）  
                - `2`: 行う（3DS2.0を利用）
            tds2_type:
              type: string
              minLength: 1
              maxLength: 1
              description: |
                3DS2非対応時設定  
                仕向先カード会社が3DS2.0に未対応な場合の、後続処理を設定します。  
                - `1`: 3DS1.0での認証を実施  
                - `2`: エラーとして処理終了（デフォルト）  
                - `3`: 通常オーソリを実施
            tds2_tenant_name:
              type: string
              minLength: 1
              maxLength: 25
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                3Dセキュア表示店舗名
            tds2_ch_acc_change:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                3DSリクエスター アカウント最終更新日  
                yyyyMMdd形式
            tds2_ch_acc_date:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                3DSリクエスター アカウント開設日  
                yyyyMMdd形式
            tds2_ch_acc_pw_change:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                3DSリクエスター アカウントパスワード変更日  
                yyyyMMdd形式
            tds2_nb_purchase_account:
              type: string
              minLength: 1
              maxLength: 4
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                過去6ヶ月間の購入回数
            tds2_payment_acc_age:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード登録日  
                yyyyMMdd形式
            tds2_provision_attempts_day:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                過去24時間のカード追加の試行回数
            tds2_ship_address_usage:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の最初の使用日  
                yyyyMMdd形式
            tds2_ship_name_ind:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客名と出荷先名の一致/不一致情報  
                  
                - `01`: カード顧客名と配送先名が一致  
                - `02`: カード顧客名と配送先名が不一致
            tds2_suspicious_acc_activity:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                アカウントの不審行為情報  
                カード顧客で、不審な行動（過去の不正行為を含む）を加盟店様が発見したかどうかを設定  
                  
                - `01`: 不審な行動は見られなかった  
                - `02`: 不審な行動が見られた
            tds2_txn_activity_day:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                過去24時間の取引回数
            tds2_txn_activity_year:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                前年の取引回数
            tds2_three_ds_req_auth_data:
              type: string
              minLength: 1
              maxLength: 2048
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                ログイン証跡  
                ログイン証跡を設定した場合  
                ログイン方法/ログイン日時の設定が必要 
                01 = 認証なし（ゲストとしてログイン）  
                02 = 加盟店様自身の認証情報  
                03 = SSO(シングルサインオン)  
                04 = イシュアーの認証情報  
                05 = サードパーティ認証  
                06 = FIDO認証
            tds2_three_ds_req_auth_timestamp:
              type: string
              minLength: 12
              maxLength: 12
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                ログイン日時  
                ログイン日時を設定した場合  
                ログイン証跡/ログイン方法の設定が必要  
                YYYYMMDDHHMM形式
            tds2_addr_match:
              type: string
              minLength: 1
              maxLength: 1
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                請求先住所と配送先住所の一致/不一致情報  
                カード顧客の配送先住所とカード顧客の請求先住所の一致/不一致の設定が必要  
                Y=一致  
                N=不一致
            tds2_bill_addr_city:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の都市  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_bill_addr_country:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の国コード  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_bill_addr_line_1:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の区域部分の１行目  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_bill_addr_line_2:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の区域部分の２行目
            tds2_bill_addr_line_3:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の区域部分の３行目
            tds2_bill_addr_post_code:
              type: string
              minLength: 1
              maxLength: 16
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の郵便番号  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_bill_addr_state:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客の請求先住所の州または都道府県コード  
                ショップ側で顧客の住所情報を保持している場合、指定が必須となります。  
                ※住所情報を保持していない場合、指定は不要です。
            tds2_email:
              type: string
              minLength: 1
              maxLength: 254
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                カード顧客のメールアドレス
            tds2_home_phone_cc:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                自宅電話の国コード（+を含まない）  
                自宅電話の国コードを設定した場合  
                自宅電話番号の設定が必要
            tds2_home_phone_no:
              type: string
              minLength: 1
              maxLength: 15
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                自宅電話番号  
                自宅電話番号を設定した場合  
                自宅電話の国コードの設定が必要  
                ハイフン（-）なし、数字のみ
            tds2_mobile_phone_cc:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                携帯電話の国コード（+を含まない）  
                携帯電話の国コードを設定した場合  
                携帯電話番号の設定が必要
            tds2_mobile_phone_no:
              type: string
              minLength: 1
              maxLength: 15
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                携帯電話番号  
                携帯電話番号の国コードを設定した場合  
                ハイフン（-）なし、数字のみ
            tds2_work_phone_cc:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                職場電話の国コード（+を含まない）  
                職場電話の国コードを設定した場合  
                職場電話番号の設定が必要
            tds2_work_phone_no:
              type: string
              minLength: 1
              maxLength: 15
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                職場電話番号  
                職場電話番号を設定した場合  
                ハイフン（-）なし、数字のみ
            tds2_ship_addr_city:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の都市
            tds2_ship_addr_country:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の国コード
            tds2_ship_addr_line_1:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の区域部分の１行目
            tds2_ship_addr_line_2:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の区域部分の２行目
            tds2_ship_addr_line_3:
              type: string
              minLength: 1
              maxLength: 50
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の区域部分の３行目
            tds2_ship_addr_post_code:
              type: string
              minLength: 1
              maxLength: 16
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の郵便番号
            tds2_ship_addr_state:
              type: string
              minLength: 1
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                出荷先住所の州または都道府県コード
            tds2_delivery_email_address:
              type: string
              minLength: 1
              maxLength: 254
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                納品先電子メールアドレス
            tds2_delivery_timeframe:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                商品納品時間枠  
                01 = 電子デリバリー  
                02 = 当日出荷  
                03 = 翌日出荷  
                04 = 2日目以降の出荷
            tds2_gift_card_amount:
              type: string
              minLength: 1
              maxLength: 15
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                プリペイドカードまたはギフトカードの総購入金額
            tds2_gift_card_count:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                購入されたプリペイドカードまたはギフトカード / コードの総数  
                0埋め2桁の数字
            tds2_gift_card_curr:
              type: string
              minLength: 3
              maxLength: 3
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                通貨コード  
                ※以下のコードは対象外  
                955, 956, 957, 958, 959, 960, 961, 962,  
                963, 964, 999
            tds2_pre_order_date:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                商品の発売予定日  
                YYYYMMDD形式
            tds2_pre_order_purchase_ind:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                商品の販売時期情報  
                01 = 発売済み
                02 = 先行予約商品
            tds2_reorder_items_ind:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                商品の注文情報  
                01 = 初回注文  
                02 = 再注文
            tds2_ship_ind:
              type: string
              minLength: 2
              maxLength: 2
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                取引の出荷方法  
                01 = カード顧客の請求先住所に配送する  
                02 = 加盟店様が保持している別の、確認済み住所に配送する  
                03 = カード顧客の請求先住所と異なる住所に配送する  
                04 = 店舗へ配送 / 近所の店舗での受け取り（店舗の住所は配送先住所で指定する）  
                05 = デジタル商品（オンラインサービス、電子ギフトカードおよび償還コードを含む）  
                06 = 配送なし（旅行およびイベントのチケット）  
                07 = その他（ゲーム、配送されないデジタルサービス、電子メディアの購読料など）
            tds2_recurring_expiry:
              type: string
              minLength: 8
              maxLength: 8
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                継続課金の期限  
                YYYYMMDD形式
            tds2_recurring_frequency:
              type: string
              minLength: 1
              maxLength: 4
              description: |
                <span class="smallText color--blue-400">[3Dセキュア認証パラメータ]</span>  
                継続課金の課金最小間隔日数
        virtual_account:
          type: object
          description: 銀行振込（バーチャル口座）情報
          properties:
            reference_invoice_id:
              type: string
              minLength: 1
              maxLength: 30
              description: |
                バーチャル口座 再利用 インボイスID\
                \
                あるインボイス情報が持つバーチャル口座を再利用する場合、そのインボイス情報のIDを参照先として指定します。\
                バーチャル口座の再利用が可能なインボイスの条件は以下の通りです。

                 - 参照するインボイスのステータスが `PAID` であること
                 - 参照するインボイスのステータスが `PAID` に遷移してから90日以内であること
            use_exact_deposit_amount:
              type: boolean
              enum:
                - true
                - false
              description: |
                入金可能額設定利用フラグ\
                この決済で使用されるバーチャル口座に対して入金可能額を設定するかどうかを示すフラグです。
                設定した場合、購入者は請求金額以外の金額を振り込むことができなくなります。

                - `true`: 入金可能額を設定する
                - `false`: 入金可能額を設定しない（デフォルト）
        directdebit:
          type: object
          description: |
            口座振替情報
          properties:
            payment_method_id:
              allOf:
                - $ref: '#/components/schemas/directdebit-properties-payment_method_id'
            target_date:
              allOf:
                - $ref: '#/components/schemas/properties-target_date'
            remarks:
              allOf:
                - $ref: '#/components/schemas/properties-remarks'
            directdebit_failure_mail_send_flag:
              allOf:
                - $ref: '#/components/schemas/directdebit_failure_mail_send_flag'
        client_field_1:
          type: string
          minLength: 1
          maxLength: 100
          description: 加盟店自由項目1
        client_field_2:
          type: string
          minLength: 1
          maxLength: 100
          description: 加盟店自由項目2
        client_field_3:
          type: string
          minLength: 1
          maxLength: 100
          description: 加盟店自由項目3
        invoice_backfill:
          type: object
          description: |
            領収書後付け発行情報\
            指定した場合、インボイス発行時に既存決済を紐づけます。\
            指定する場合は3項目すべての指定が必要です。\
            指定できる決済種別は `Card` / `Virtualaccount` / `Directdebit` のみで、複数の決済手段を同時に指定することはできません。\
          properties:
            order_id:
              type: string
              maxLength: 30
              description: 既存決済のオーダーID
            access_id:
              type: string
              minLength: 24
              maxLength: 24
              description: 既存決済の取引ID
            paid_date:
              type: string
              maxLength: 10
              description: |
                既存決済の支払日\
                形式： `yyyy/MM/dd`
    InvoiceDetail.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/Invoice'
    InvoiceDetail.Deleting.Response:
      type: object
      properties:
        id:
          type: string
          description: |
            インボイスID
          minLength: 1
          maxLength: 30
        delete_flag:
          type: string
          description: |
            削除フラグ  
              
             - `1`: 成功
    InvoiceDetail.Opening.Request:
      type: object
      properties:
        bill_mail_send_flag:
          type: string
          minLength: 1
          maxLength: 1
          description: |
            請求書メール送信フラグ  
            登録や更新で設定している場合も、こちらの設定が優先されます。  

            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する  
        receipt_mail_send_flag:
          type: string
          minLength: 1
          maxLength: 1
          description: |
            領収書メール送信フラグ  
            登録や更新で設定している場合も、こちらの設定が優先されます。  

            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する  
        underpayment_mail_send_flag:
          type: string
          minLength: 1
          maxLength: 1
          description: |
            差額請求メール送信フラグ  
            登録や更新で設定している場合も、こちらの設定が優先されます。  

            - `0`: メールを送信しない（デフォルト）  
            - `1`: メールを送信する  
    InvoiceDetail.Opening.Response:
      allOf:
        - $ref: '#/components/schemas/Invoice'
        - $ref: '#/components/schemas/Invoice.CompanyStamp'
    InvoiceDetail.Canceling.Response:
      allOf:
        - $ref: '#/components/schemas/Invoice'
    InvoiceDetail.Marking.Response:
      allOf:
        - $ref: '#/components/schemas/Invoice'
    InvoiceDetail.Refresh.Response:
      allOf:
        - $ref: '#/components/schemas/Invoice'
    DepositStatusCode:
      type: integer
      enum:
        - 3001
        - 3002
        - 3003
        - 3004
        - 3005
        - 3006
        - 3007
        - 3008
        - 3009
        - 3010
        - 3011
        - 3012
        - 3013
      description: |
        入金ステータス

        - `3001`: 金額確定前<br /><span class="smallText">この集計期間中の売上入金に関してまだ集計中であり金額が確定していない状態。入金はされていません。</span>
        - `3002`: 金額確定済み<br /><span class="smallText">この集計期間中の売上入金の金額が確定した状態。入金はされていません。</span>
        - `3003`: 入金済み<br /><span class="smallText">この集計期間中のfincodeからの売上の入金が完了した状態。</span>
        - `3004`: 入金停止中<br /><span class="smallText">この集計期間中のfincodeからの売上の入金に際し何らかの懸念事項があり差し止めている状態。解消後fincodeはできるだけ早く入金を再試行します。</span>
        - `3005`: 入金エラー<br /><span class="smallText">この集計期間中のfincodeからの売上の入金に何らかの理由で失敗した状態。解消後fincodeはできるだけ早く入金を再試行します。</span>
        - `3006`: 請求中<br /><span class="smallText">集計期間中のキャンセル金額が売上金額を上回り、fincodeからショップへ請求している状態。</span>
        - `3007`: 請求エラー<br /><span class="smallText">集計期間中のキャンセル金額が売上金額を上回り、fincodeからショップへ請求が必要になったものの何らかのエラーにより失敗した状態。</span>
        - `3008`: 請求停止中<br /><span class="smallText">集計期間中のキャンセル金額が売上金額を上回り、fincodeからショップへ請求が必要になったものの何らかの理由により差し止めている状態。</span>
        - `3009`: 支払済み<br /><span class="smallText">集計期間中のキャンセル金額が売上金額を上回り発生したfincodeからショップへの請求に対する入金が確認できた状担。</span>
        - `3010`: 本人確認書類未確認<br /><span class="smallText">この集計期間中のfincodeからの売上の入金に際し本人確認書類の提出が確認できないため差し止めている状態。解消後fincodeはできるだけ早く入金を再試行します。</span>
        - `3011`: 精算済み<br /><span class="smallText">売上が0円のまま入金額が確定した状態。</span>
        - `3012`: 入金開始前<br /><span class="smallText">初回入金がまだ実施されていない状態。</span>
        - `3013`: 契約不成立<br /><span class="smallText">fincodeとの契約が不成立となった状態。</span>
    Account.ListRetrieving.QueryParams:
      type: object
      properties:
        processed:
          type: string
          nullable: true
          example: 2022/05
          description: |
            確定日（入金サイクルの締め日）を月単位で絞り込みます。\
            形式： `yyyy/MM`
        status:
          $ref: '#/components/schemas/DepositStatusCode'
          nullable: true
          description: |
            入金ステータス\
            カンマ区切りにすることで複数指定（OR検索）できます。

            - `3001`: 金額確定前
            - `3002`: 金額確定済み
            - `3003`: 入金済み
            - `3004`: 入金停止中
            - `3005`: 入金エラー
            - `3006`: 請求中
            - `3007`: 請求エラー
            - `3008`: 請求停止中
            - `3009`: 支払済み
            - `3010`: 本人確認書類未確認
            - `3011`: 精算済み
            - `3012`: 入金開始前
            - `3013`: 契約不成立
        scheduled_from:
          type: string
          format: date
          nullable: true
          example: 2022/05/01
          description: |
            入金予定日の範囲指定（開始日）を指定します。\
            この日付以降に入金が行われた売上入金情報を検索できます。\
            形式： `yyyy/MM/dd`
        scheduled_to:
          type: string
          format: date
          nullable: true
          example: 2022/05/31
          description: |
            入金予定日の範囲指定（終了日）を指定します。\
            この日付以前に入金が行われた売上入金情報を検索できます。\
            形式： `yyyy/MM/dd`
    Account_properties-id:
      type: string
      minLength: 32
      maxLength: 32
      example: sales_s_***********_******_*****
      description: |
        売上入金ID
    account_id:
      type: integer
      minLength: 7
      maxLength: 7
      example: 1234567
      description: |
        精算ID
    shop_id:
      type: string
      minLength: 13
      maxLength: 13
      example: s_***********
      description: |
        ショップID
    scheduled_deposit_date:
      type: string
      nullable: false
      example: 2022/05/16 23:59
      description: |
        売上入金 入金予定日\
        形式： `yyyy/MM/dd HH:MM`
    aggregate_term_start:
      type: string
      nullable: false
      example: 2022/05/16 23:59
      description: |
        売上入金 集計期間の開始日\
        形式： `yyyy/MM/dd HH:MM`
    aggregate_term_end:
      type: string
      nullable: false
      example: 2022/05/16 23:59
      description: |
        売上入金 集計期間の終了日\
        形式： `yyyy/MM/dd HH:MM`
    deposit_date:
      type: string
      nullable: true
      example: 2022/05/16 23:59
      description: |
        売上入金 入金実績日\
        形式： `yyyy/MM/dd HH:MM`
    payment_deadline:
      type: string
      nullable: true
      example: null
      description: |
        （請求が発生した場合）支払期限日\
        形式： `yyyy/MM/dd HH:MM`
    payment_completion_date:
      type: string
      nullable: true
      example: null
      description: |
        （請求が発生した場合）請求日\
        形式： `yyyy/MM/dd HH:MM`
    count:
      type: integer
      nullable: false
      example: 3
      description: |
        この売上入金に含まれる売上入金詳細の件数
    bank_transfer_fee:
      type: integer
      format: int64
      nullable: false
      example: 0
      description: |
        振込手数料
    Account_properties-total_amount:
      type: integer
      format: int64
      nullable: false
      example: 1000
      description: |
        この売上入金において精算の対象となった取引の総額。
    fee_amount:
      type: integer
      format: int64
      nullable: false
      example: 30
      description: |
        この売上入金において精算の対象となった取引にかかるfincodeへの手数料
    deposit_amount:
      type: integer
      format: int64
      nullable: false
      example: 568
      description: |
        売上入金 入金額

        ショップに入金される（入金が予定されている）売上金額です。\
        精算金額（`settlement_amount`）から振込手数料（`bank_transfer_fee`）を引いた金額に一致します。
    platform_fee_amount:
      type: integer
      format: int64
      nullable: false
      example: 0
      description: |
        この売上入金において精算の対象となった取引にかかるプラットフォーム利用料\
        ※ テナントのみ
    platform_fee_tax_amount:
      type: integer
      format: int64
      nullable: false
      example: 0
      description: |
        この売上入金において精算の対象となった取引にかかるプラットフォーム利用料の消費税\
        ※ テナントのみ
    AccountListItem:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Account_properties-id'
        account_id:
          allOf:
            - $ref: '#/components/schemas/account_id'
        shop_id:
          allOf:
            - $ref: '#/components/schemas/shop_id'
        scheduled_deposit_date:
          allOf:
            - $ref: '#/components/schemas/scheduled_deposit_date'
        aggregate_term_start:
          allOf:
            - $ref: '#/components/schemas/aggregate_term_start'
        aggregate_term_end:
          allOf:
            - $ref: '#/components/schemas/aggregate_term_end'
        deposit_date:
          allOf:
            - $ref: '#/components/schemas/deposit_date'
        payment_deadline:
          allOf:
            - $ref: '#/components/schemas/payment_deadline'
        payment_completion_date:
          allOf:
            - $ref: '#/components/schemas/payment_completion_date'
        status_code:
          allOf:
            - $ref: '#/components/schemas/DepositStatusCode'
        count:
          allOf:
            - $ref: '#/components/schemas/count'
        bank_transfer_fee:
          allOf:
            - $ref: '#/components/schemas/bank_transfer_fee'
        total_amount:
          allOf:
            - $ref: '#/components/schemas/Account_properties-total_amount'
        fee_amount:
          allOf:
            - $ref: '#/components/schemas/fee_amount'
        deposit_amount:
          allOf:
            - $ref: '#/components/schemas/deposit_amount'
        platform_fee_amount:
          allOf:
            - $ref: '#/components/schemas/platform_fee_amount'
        platform_fee_tax_amount:
          allOf:
            - $ref: '#/components/schemas/platform_fee_tax_amount'
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
    AccountListItem.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/AccountListItem'
    Account.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/AccountListItem.list'
    AccountId_schema:
      type: string
      example: sales_s_***********_******_*****
    DepositTargetBankAccountInfo:
      type: object
      properties:
        corporate:
          type: boolean
          example: true
          description: |
            法人口座か

            - `true`: 法人口座
            - `false`: 個人口座
        recipient_corporate_name:
          type: string
          minLength: 1
          maxLength: 150
          description: |
            入金先法人名
        recipient_represntative_last_name:
          type: string
          minLength: 1
          maxLength: 208
          description: |
            入金先代表者氏名 姓
        recipient_represntative_first_name:
          type: string
          minLength: 1
          maxLength: 208
          description: |
            入金先代表者氏名 名
        bank_code:
          type: string
          minLength: 1
          maxLength: 32
          description: |
            入金先 金融機関コード
        bank_name:
          type: string
          minLength: 1
          maxLength: 96
          description: |
            入金先 金融機関名
        bank_name_kana:
          type: string
          minLength: 1
          maxLength: 208
          description: |
            入金先 金融機関名 カナ
        branch_code:
          type: string
          minLength: 1
          maxLength: 32
          description: |
            入金先 支店コード
        branch_name:
          type: string
          minLength: 1
          maxLength: 208
          description: |
            入金先 支店名
        branch_name_kana:
          type: string
          minLength: 1
          maxLength: 208
          description: |
            入金先 支店名 カナ
        account_kind:
          type: string
          enum:
            - '0'
            - '1'
          description: |
            入金先 口座種別

            - `0`: 普通
            - `1`: 当座
        account_number:
          type: string
          minLength: 1
          maxLength: 208
          description: |
            入金先 口座番号
        account_name:
          type: string
          minLength: 1
          maxLength: 208
          description: |
            入金先 口座名義
    Account:
      type: object
      properties:
        id:
          type: string
          minLength: 32
          maxLength: 32
          example: sales_s_***********_******_*****
          description: |
            売上入金ID
        account_id:
          type: integer
          minLength: 7
          maxLength: 7
          example: 1234567
          description: |
            精算ID
        shop_id:
          type: string
          minLength: 13
          maxLength: 13
          example: s_***********
          description: |
            ショップID
        deposit_amount:
          type: integer
          format: int64
          nullable: false
          example: 568
          description: |
            売上入金 入金額

            ショップに入金される（入金が予定されている）売上金額です。\
            精算金額（`settlement_amount`）から振込手数料（`bank_transfer_fee`）を引いた金額に一致します。
        deposit_date:
          type: string
          nullable: true
          example: 2022/05/16 23:59
          description: |
            売上入金 入金実績日\
            形式： `yyyy/MM/dd HH:MM`
        scheduled_deposit_date:
          type: string
          nullable: false
          example: 2022/05/16 23:59
          description: |
            売上入金 入金予定日\
            形式： `yyyy/MM/dd HH:MM`
        aggregate_term_start:
          type: string
          nullable: false
          example: 2022/05/16 23:59
          description: |
            売上入金 集計期間の開始日\
            形式： `yyyy/MM/dd HH:MM`
        aggregate_term_end:
          type: string
          nullable: false
          example: 2022/05/16 23:59
          description: |
            売上入金 集計期間の終了日\
            形式： `yyyy/MM/dd HH:MM`
        payment_deadline:
          type: string
          nullable: true
          example: null
          description: |
            （請求が発生した場合）支払期限日\
            形式： `yyyy/MM/dd HH:MM`
        payment_completion_date:
          type: string
          nullable: true
          example: null
          description: |
            （請求が発生した場合）請求日\
            形式： `yyyy/MM/dd HH:MM`
        status_code:
          $ref: '#/components/schemas/DepositStatusCode'
        count:
          type: integer
          nullable: false
          example: 3
          description: |
            この売上入金に含まれる売上入金詳細の件数
        settlement_amount:
          type: integer
          format: int64
          nullable: false
          example: 538
          description: |
            この売上入金において精算の対象となった取引の総額。
        bank_transfer_fee:
          type: integer
          format: int64
          nullable: false
          example: 0
          description: |
            振込手数料
        total_amount:
          type: integer
          format: int64
          nullable: false
          example: 1000
          description: |
            この売上入金において精算の対象となった取引の総額。
        fee_amount:
          type: integer
          format: int64
          nullable: false
          example: 30
          description: |
            この売上入金において精算の対象となった取引にかかるfincodeへの手数料
        taxable_fee_amount:
          type: integer
          format: int64
          nullable: false
          example: 400
          description: "課税対象手数料\t\n"
        nontaxable_fee_amount:
          type: integer
          format: int64
          nullable: false
          example: 400
          description: |
            非課税手数料
        web_registration_fee_amount:
          type: integer
          format: int64
          nullable: false
          example: 400
          description: |
            この売上入金の精算期間中に発生した振替口座のWeb登録手数料\
            ※ 口座振替のみ
        paper_registration_fee_amount:
          type: integer
          format: int64
          nullable: false
          example: 400
          description: |
            この売上入金の精算期間中に発生した振替口座の依頼書登録手数料\
            ※ 口座振替のみ
        tax_amount:
          type: integer
          format: int64
          nullable: false
          example: 2
          description: |
            この売上入金において精算の対象となった取引にかかるfincodeへの手数料にかかる消費税
        platform_fee_amount:
          type: integer
          format: int64
          nullable: false
          example: 0
          description: |
            この売上入金において精算の対象となった取引にかかるプラットフォーム利用料\
            ※ テナントのみ
        platform_fee_tax_amount:
          type: integer
          format: int64
          nullable: false
          example: 0
          description: |
            この売上入金において精算の対象となった取引にかかるプラットフォーム利用料の消費税\
            ※ テナントのみ
        platform_web_registration_fee_amount:
          type: integer
          format: int64
          nullable: false
          example: 0
          description: |
            売上入金 精算期間中に発生した、プラットフォームが設定した振替口座のWeb登録手数料\
            ※ 口座振替 かつ テナントのみ
        platform_paper_registration_fee_amount:
          type: integer
          format: int64
          nullable: false
          example: 0
          description: |
            売上入金 精算期間中に発生した、プラットフォームが設定した振替口座の依頼書登録手数料\
            ※ 口座振替 かつ テナントのみ
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
        deposit_destination:
          allOf:
            - $ref: '#/components/schemas/DepositTargetBankAccountInfo'
          description: |
            売上入金 入金先口座情報
    Account.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Account'
    AccountDetailTradeType:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
      example: 1
      description: |
        取引種別\
        値によって、集計の際にこの売上入金明細の利用金額が加算されるか減算されるかが異なります。

        - `1`: 決済（加算）<br /><span class="smallText">この売上入金明細はある決済1件に対し発生したものであることを示します。</span>
        - `2`: 返金（減算）<br /><span class="smallText">この売上入金明細はある決済に対し発生したキャンセル1件に対し発生したものであることを示します。</span>
        - `3`: チャージバック（減算）<br /><span class="smallText">この売上入金明細はある決済に対し発生したチャージバック1件に対し発生したものであることを示します。</span>
        - `4`: 調整（加算）<br /><span class="smallText">この売上入金明細は何らかの理由で売上入金情報を調整するために発生したものであることを示します。減算のためマイナス値が返されることもあります。</span>
        - `5`: チャージバックの取消（加算）<br /><span class="smallText">この売上入金明細はある決済に対し発生したチャージバック1件が取り消されたとき発生したものであることを示します。</span>
        - `6`: 口座振替失敗時の手数料（減算）<br /><span class="smallText">この売上入金明細はある口座振替が失敗し、その決済手数料により発生したものであることを示します。</span>
        - `7`: 口座振替 振替用口座Web登録手数料（減算）<br /><span class="smallText">この売上入金明細は振替用口座のWeb登録に成功し、登録に係る手数料により発生したものであることを示します。</span>
        - `8`: 口座振替 振替用口座依頼書登録手数料（減算）<br /><span class="smallText">この売上入金明細は振替用口座の依頼書登録に成功し、登録に係る手数料により発生したものであることを示します。</span>
        - `10`: バーチャル口座 入金可能額設定手数料（減算）<br /><span class="smallText">この売上入金明細はバーチャル口座の入金可能額設定に成功し、設定に係る手数料により発生したものであることを示します。</span>
        - `11`: バーチャル口座 顧客型固定バーチャル口座登録手数料（減算）<br /><span class="smallText">この売上入金明細は顧客型固定バーチャル口座の登録に成功し、登録に係る手数料により発生したものであることを示します。</span>
        - `12`: バーチャル口座 一括決済未使用手数料（減算）<br /><span class="smallText">この売上入金明細はバーチャル口座の一括決済機能において、実際には使用されなかった口座に対して発生した手数料であることを示します。</span>
    AccountPaymentMethod:
      type: string
      enum:
        - VM
        - JA
        - KONBINI
        - PayPay
        - ApplepayVM
        - ApplepayJA
        - GooglepayVM
        - GooglepayJA
        - Directdebit
        - DirectdebitMizuho
        - Virtualaccount
      example: VM
      description: |
        この売上入金明細に対応する決済で利用された決済手段

        - `VM`: カード決済（VISA / Mastercard）
        - `JA`: カード決済（JCB / American Express / Diners Club / Discover）
        - `KONBINI`: コンビニ決済
        - `Paypay`: PayPay決済
        - `ApplepayVM`: Apple Pay決済（VISA / Mastercard）
        - `ApplepayJA`: Apple Pay決済（JCB / American Express / Discover）
        - `GooglepayVM`: Google Pay決済（VISA / Mastercard）
        - `GooglepayJA`: Google Pay決済（JCB / American Express / Diners Club）
        - `Directdebit`: 口座振替（5・6・23・27日）
        - `DirectdebitMizuho`: 口座振替（1・5・20・26日）
        - `Virtualaccount`: 銀行振込（バーチャル口座）
    AccountDetail:
      type: object
      properties:
        detail_id:
          type: integer
          example: 12345
          description: |
            売上入金詳細 ID
        shop_id:
          type: string
          example: s_***********
          description: |
            ショップID
        scheduled_deposit_date:
          type: string
          example: 2017/12/01 00:00
          description: |
            入金予定日  
            形式： `yyyy/MM/dd HH:MM`
        trade_type:
          $ref: '#/components/schemas/AccountDetailTradeType'
        payment_method:
          $ref: '#/components/schemas/AccountPaymentMethod'
        amount_correction_type:
          type: string
          nullable: true
          example: 課金訂正内容
          description: |
            課金訂正内容
        account_id:
          type: integer
          example: 1234567
          description: |
            精算ID
        order_id:
          type: string
          nullable: true
          example: o_**********************
          description: |
            オーダー（決済）ID
        access_id:
          type: string
          nullable: true
          example: a_**********************
          description: |
            取引ID
        deposit_amount:
          type: integer
          example: 963
          nullable: false
          description: |
            この取引による入金額（参考値）\
            ※実際の入金額は全ての売上入金詳細の入金額の合算した後に計算される消費税金額によるため、この値は参考値となります。
        amount:
          type: integer
          example: 1000
          nullable: false
          description: |
            利用金額
        tax:
          type: integer
          example: 0
          nullable: false
          description: |
            税送料
        fee_total:
          type: integer
          example: 36
          nullable: false
          description: |
            fincode決済手数料（税抜）
        fee_total_taxin:
          type: integer
          example: 37
          nullable: false
          description: |
            fincode決済手数料（税込）
        fee_profit_tax:
          type: integer
          example: 1
          nullable: false
          description: |
            fincode決済手数料にかかる消費税
        fee_profit:
          type: integer
          example: 11
          nullable: false
          description: |
            fincode決済手数料のうち、課税対象金額
        fee_cost:
          type: integer
          example: 25
          nullable: false
          description: |
            fincode決済手数料のうち、非課税対象金額
        fee_rate_total:
          type: number
          example: 3.6
          nullable: false
          description: |
            fincode決済手数料率
        fixed_fee:
          type: integer
          example: null
          nullable: true
          description: |
            fincode決済手数料 最低手数料
        apply_type:
          type: integer
          enum:
            - 0
            - 1
          example: 0
          nullable: false
          description: |
            fincode手数料率 適用区分

             - `0`: 料率。<br /><span class="smallText">この決済による売上に対し、fincode決済手数料率が適用されたことを示します。</span>
             - `1`: 最低手数料。<br /><span class="smallText">この決済による売上に対し、fincode決済最低手数料が適用されたことを示します。</span>
        web_registration_fee:
          type: integer
          example: 0
          nullable: false
          description: |
            fincode振替口座 Web登録手数料（税抜）\
            ※ 口座振替のみ
        web_registration_fee_taxin:
          type: integer
          example: 0
          nullable: false
          description: |
            fincode振替口座 Web登録手数料（税込）\
            ※ 口座振替のみ
        web_registration_fee_tax:
          type: integer
          example: 0
          nullable: false
          description: |
            fincode手数料 Web登録手数料消費税\
            ※ 口座振替のみ
        paper_registration_fee:
          type: integer
          example: 0
          nullable: false
          description: |
            fincode振替口座 依頼書登録手数料（税抜）\
            ※ 口座振替のみ
        paper_registration_fee_taxin:
          type: integer
          example: 0
          nullable: false
          description: |
            fincode振替口座 依頼書登録手数料（税込）\
            ※ 口座振替のみ
        paper_registration_fee_tax:
          type: integer
          example: 0
          nullable: false
          description: |
            fincode手数料 依頼書登録手数料消費税\
            ※ 口座振替のみ
        platform_fee:
          type: integer
          example: 0
          nullable: true
          description: |
            プラットフォーム利用料（税抜）\
            ※ テナントのみ
        platform_fee_taxin:
          type: integer
          example: 0
          nullable: true
          description: |
            プラットフォーム利用料（税込）\
            ※ テナントのみ
        platform_fee_rate:
          type: number
          example: 0
          nullable: true
          description: |
            プラットフォーム利用料率\
            ※ テナントのみ
        fixed_fee_for_platform_fee:
          type: integer
          example: 0
          nullable: true
          description: |
            プラットフォーム利用料率 最低手数料\
            ※ テナントのみ
        apply_type_for_platform_fee:
          type: integer
          enum:
            - 0
            - 1
          example: 0
          nullable: true
          description: |
            プラットフォーム利用料率 適用区分

            - `0`: 料率。<br /><span class="smallText">この決済による売上に対し、プラットフォーム利用料率が適用されたことを示します。</span>
            - `1`: 最低手数料。<br /><span class="smallText">この決済による売上に対し、プラットフォームが設定した最低利用料が適用されたことを示します。</span>

            ※ テナントのみ
        platform_web_registration_fee:
          type: integer
          example: 0
          nullable: false
          description: |
            プラットフォームWeb登録利用料（税抜）\
            ※ 口座振替 かつ テナントのみ
        platform_web_registration_fee_taxin:
          type: integer
          example: 0
          nullable: false
          description: |
            プラットフォームWeb登録利用料（税込）\
            ※ 口座振替 かつ テナントのみ
        platform_web_registration_fee_tax:
          type: integer
          example: 0
          nullable: false
          description: |
            プラットフォームWeb登録利用料消費税\
            ※ 口座振替 かつ テナントのみ
        platform_paper_registration_fee:
          type: integer
          example: 0
          nullable: false
          description: |
            プラットフォーム依頼書登録利用料（税抜）\
            ※ 口座振替 かつ テナントのみ
        platform_paper_registration_fee_taxin:
          type: integer
          example: 0
          nullable: false
          description: |
            プラットフォーム依頼書登録利用料（税込）\
            ※ 口座振替 かつ テナントのみ
        platform_paper_registration_fee_tax:
          type: integer
          example: 0
          nullable: false
          description: |
            プラットフォーム依頼書登録利用料消費税\
            ※ 口座振替 かつ テナントのみ
        processed_date:
          type: string
          example: 2022/05/16 23:59
          nullable: false
          description: |
            取引の確定処理を行った日時 \
            形式： `yyyy/MM/dd HH:MM`
        aggregate_term_start:
          type: string
          example: 2022/05/16 23:59
          nullable: false
          description: |
            集計期間の開始日\
            形式： `yyyy/MM/dd HH:MM`
        aggregate_term_end:
          type: string
          example: 2022/05/16 23:59
          nullable: false
          description: |
            集計期間の終了日\
            形式： `yyyy/MM/dd HH:MM`
        client_field_1:
          type: string
          nullable: true
          example: 加盟店自由項目 1
          description: |
            加盟店自由項目 1
        client_field_2:
          type: string
          nullable: true
          example: 加盟店自由項目 2
          description: |
            加盟店自由項目 2
        client_field_3:
          type: string
          nullable: true
          example: 加盟店自由項目 3
          description: |
            加盟店自由項目 3
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
    AccountDetail.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/AccountDetail'
    AccountDetail.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/AccountDetail.list'
    PlatformAccount.ListRetrieving.QueryParams:
      type: object
      properties:
        processed:
          type: string
          nullable: true
          example: 2022/05
          description: |
            確定日（入金サイクルの締め日）を月単位で絞り込みます。\
            形式： `yyyy/MM`
        status:
          $ref: '#/components/schemas/DepositStatusCode'
          nullable: true
          description: |
            入金ステータス\
            カンマ区切りにすることで複数指定（OR検索）できます。

            - `3001`: 金額確定前
            - `3002`: 金額確定済み
            - `3003`: 入金済み
            - `3004`: 入金停止中
            - `3005`: 入金エラー
            - `3006`: 請求中
            - `3007`: 請求エラー
            - `3008`: 請求停止中
            - `3009`: 支払済み
            - `3010`: 本人確認書類未確認
            - `3011`: 精算済み
            - `3012`: 入金開始前
            - `3013`: 契約不成立
        scheduled_from:
          type: string
          format: date
          nullable: true
          example: 2022/05/01
          description: |
            入金予定日の範囲指定（開始日）を指定します。\
            この日付以降に入金が行われた売上入金情報を検索できます。\
            形式： `yyyy/MM/dd`
        scheduled_to:
          type: string
          format: date
          nullable: true
          example: 2022/05/31
          description: |
            入金予定日の範囲指定（終了日）を指定します。\
            この日付以前に入金が行われた売上入金情報を検索できます。\
            形式： `yyyy/MM/dd`
    PlatformAccount_properties-id:
      type: string
      minLength: 1
      maxLength: 20
      example: sales_s_***********_******_*****
      description: |
        プラットフォーム利用料収入ID
    properties-account_id:
      type: integer
      minLength: 6
      maxLength: 6
      example: 123456
      description: |
        精算ID
    properties-deposit_amount:
      type: integer
      nullable: true
      example: 568
      description: |
        プラットフォーム利用料収入 入金額\
        \
        プラットフォームショップに入金される（入金が予定されている）プラットフォーム利用料による売上金の額です。\
        精算金額（`settlement_amount`）から振込手数料（`bank_transfer_fee`）を引いた金額に一致します。
    properties-deposit_date:
      type: string
      nullable: true
      example: 2022/05/16 23:59
      description: |
        プラットフォーム利用料収入 入金実績日\
        形式： `yyyy/MM/dd HH:MM`
    properties-scheduled_deposit_date:
      type: string
      nullable: true
      example: 2022/05/16 23:59
      description: |
        プラットフォーム利用料収入 入金予定日\
        形式： `yyyy/MM/dd HH:MM`
    properties-aggregate_term_start:
      type: string
      nullable: true
      example: 2022/05/16 23:59
      description: |
        プラットフォーム利用料収入 集計期間 開始日\
        形式： `yyyy/MM/dd HH:MM`
    properties-aggregate_term_end:
      type: string
      nullable: true
      example: 2022/05/16 23:59
      description: |
        プラットフォーム利用料収入 集計期間 終了日\
        形式： `yyyy/MM/dd HH:MM`
    properties-count:
      type: integer
      nullable: true
      example: 3
      description: |
        このプラットフォーム利用料収入に含まれる決済の件数
    settlement_amount:
      type: integer
      nullable: true
      example: 568
      description: |
        精算金額
    properties-bank_transfer_fee:
      type: integer
      nullable: true
      example: 0
      description: |
        振込手数料
    PlatformAccount_properties-total_amount:
      type: integer
      nullable: true
      example: 1000
      description: |
        このプラットフォーム利用料入金において精算の対象となった取引の総額。
    properties-fee_amount:
      type: integer
      nullable: true
      example: 30
      description: |
        このプラットフォーム利用料入金において精算の対象となった取引にかかるfincodeへの手数料
    properties-platform_fee_amount:
      type: integer
      nullable: true
      example: 0
      description: |
        このプラットフォーム利用料入金において精算の対象となった取引にかかるプラットフォーム利用料
    tax_amount:
      type: integer
      nullable: true
      example: 2
      description: |
        決済手数料 消費税額
    verified:
      type: boolean
      example: true
      deprecated: true
      description: |
        検証確認フラグ
    PlatformAccountListItem:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/PlatformAccount_properties-id'
        account_id:
          allOf:
            - $ref: '#/components/schemas/properties-account_id'
        shop_id:
          allOf:
            - $ref: '#/components/schemas/shop_id'
        deposit_amount:
          allOf:
            - $ref: '#/components/schemas/properties-deposit_amount'
        deposit_date:
          allOf:
            - $ref: '#/components/schemas/properties-deposit_date'
        scheduled_deposit_date:
          allOf:
            - $ref: '#/components/schemas/properties-scheduled_deposit_date'
        aggregate_term_start:
          allOf:
            - $ref: '#/components/schemas/properties-aggregate_term_start'
        aggregate_term_end:
          allOf:
            - $ref: '#/components/schemas/properties-aggregate_term_end'
        payment_deadline:
          allOf:
            - $ref: '#/components/schemas/payment_deadline'
        payment_completion_date:
          allOf:
            - $ref: '#/components/schemas/payment_completion_date'
        status_code:
          $ref: '#/components/schemas/DepositStatusCode'
        count:
          allOf:
            - $ref: '#/components/schemas/properties-count'
        settlement_amount:
          allOf:
            - $ref: '#/components/schemas/settlement_amount'
        bank_transfer_fee:
          allOf:
            - $ref: '#/components/schemas/properties-bank_transfer_fee'
        total_amount:
          allOf:
            - $ref: '#/components/schemas/PlatformAccount_properties-total_amount'
        fee_amount:
          allOf:
            - $ref: '#/components/schemas/properties-fee_amount'
        platform_fee_amount:
          allOf:
            - $ref: '#/components/schemas/properties-platform_fee_amount'
        platform_fee_tax_amount:
          allOf:
            - $ref: '#/components/schemas/properties-platform_fee_amount'
        tax_amount:
          allOf:
            - $ref: '#/components/schemas/tax_amount'
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
        verified:
          allOf:
            - $ref: '#/components/schemas/verified'
    PlatformAccountListItem.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/PlatformAccountListItem'
          description: |
            プラットフォーム利用料による売上入金情報のリスト
    PlatformAccount.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/PlatformAccountListItem.list'
    PlatformAccountId_schema:
      type: string
      example: sales_s_***********_******_*****
    PlatformAccount:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 20
          example: sales_s_***********_******_*****
          description: |
            プラットフォーム利用料収入ID
        account_id:
          type: integer
          minLength: 6
          maxLength: 6
          example: 123456
          description: |
            精算ID
        shop_id:
          type: string
          minLength: 13
          maxLength: 13
          example: s_***********
          description: |
            ショップID
        deposit_amount:
          type: integer
          nullable: true
          example: 568
          description: |
            プラットフォーム利用料収入 入金額\
            \
            プラットフォームショップに入金される（入金が予定されている）プラットフォーム利用料による売上金の額です。\
            精算金額（`settlement_amount`）から振込手数料（`bank_transfer_fee`）を引いた金額に一致します。
        deposit_date:
          type: string
          nullable: true
          example: 2022/05/16 23:59
          description: |
            プラットフォーム利用料収入 入金実績日\
            形式： `yyyy/MM/dd HH:MM`
        scheduled_deposit_date:
          type: string
          nullable: true
          example: 2022/05/16 23:59
          description: |
            プラットフォーム利用料収入 入金予定日\
            形式： `yyyy/MM/dd HH:MM`
        aggregate_term_start:
          type: string
          nullable: true
          example: 2022/05/16 23:59
          description: |
            プラットフォーム利用料収入 集計期間 開始日\
            形式： `yyyy/MM/dd HH:MM`
        aggregate_term_end:
          type: string
          nullable: true
          example: 2022/05/16 23:59
          description: |
            プラットフォーム利用料収入 集計期間 終了日\
            形式： `yyyy/MM/dd HH:MM`
        payment_deadline:
          type: string
          nullable: true
          example: null
          description: |
            （請求が発生した場合）支払期限日\
            形式： `yyyy/MM/dd HH:MM`
        payment_completion_date:
          type: string
          nullable: true
          example: null
          description: |
            （請求が発生した場合）請求日\
            形式： `yyyy/MM/dd HH:MM`
        status_code:
          $ref: '#/components/schemas/DepositStatusCode'
        count:
          type: integer
          nullable: true
          example: 3
          description: |
            このプラットフォーム利用料収入に含まれる決済の件数
        settlement_amount:
          type: integer
          nullable: true
          example: 568
          description: |
            精算金額
        bank_transfer_fee:
          type: integer
          nullable: true
          example: 0
          description: |
            振込手数料
        total_amount:
          type: integer
          nullable: true
          example: 1000
          description: |
            このプラットフォーム利用料入金において精算の対象となった取引の総額。
        fee_amount:
          type: integer
          nullable: true
          example: 30
          description: |
            このプラットフォーム利用料入金において精算の対象となった取引にかかるfincodeへの手数料
        taxable_fee_amount:
          type: integer
          nullable: true
          example: 0
          description: |
            決済手数料 課税対象額
        nontaxable_fee_amount:
          type: integer
          nullable: true
          example: 0
          description: |
            決済手数料 非課税対象額
        tax_amount:
          type: integer
          nullable: true
          example: 2
          description: |
            決済手数料 消費税額
        web_registration_fee_amount:
          type: integer
          nullable: true
          example: 400
          description: |
            このプラットフォーム利用料入金の精算期間中に発生した振替口座のWeb登録手数料\
            ※ 口座振替のみ
        platform_fee_amount:
          type: integer
          nullable: true
          example: 0
          description: |
            このプラットフォーム利用料入金において精算の対象となった取引にかかるプラットフォーム利用料
        platform_fee_tax_amount:
          type: integer
          nullable: true
          example: 0
          description: |
            このプラットフォーム利用料入金において精算の対象となった取引にかかるプラットフォーム利用料の消費税
        platform_web_registration_fee_amount:
          type: integer
          nullable: true
          example: 0
          description: |
            このプラットフォーム利用料入金の精算期間中に発生した、プラットフォームが設定した振替口座のWeb登録手数料
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
        deposit_destination:
          allOf:
            - $ref: '#/components/schemas/DepositTargetBankAccountInfo'
          description: |
            プラットフォーム利用料収入 入金先口座情報
        verified:
          type: boolean
          example: true
          deprecated: true
          description: |
            検証確認フラグ
    PlatformAccount.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/PlatformAccount'
    PlatformAccountSummary.ListRetrieving.QueryParams:
      type: object
      properties:
        scheduled_from:
          type: string
          format: date
          nullable: true
          example: 2022/05/01
          description: |
            入金予定日の範囲指定（開始日）を指定します。\
            この日付以降に入金が行われた売上入金情報を検索できます。\
            形式： `yyyy/MM/dd`
        scheduled_to:
          type: string
          format: date
          nullable: true
          example: 2022/05/31
          description: |
            入金予定日の範囲指定（終了日）を指定します。\
            この日付以前に入金が行われた売上入金情報を検索できます。\
            形式： `yyyy/MM/dd`
    shop_name:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: My Shop
      description: |
        ショップ名
    taxable_fee_amount:
      type: integer
      nullable: true
      example: 0
      description: |
        決済手数料 課税対象額
    nontaxable_fee_amount:
      type: integer
      nullable: true
      example: 0
      description: |
        決済手数料 非課税対象額
    web_registration_fee_amount:
      type: integer
      nullable: true
      example: 400
      description: |
        このプラットフォーム利用料入金の精算期間中に発生した振替口座のWeb登録手数料\
        ※ 口座振替のみ
    platform_web_registration_fee_amount:
      type: integer
      nullable: true
      example: 0
      description: |
        このプラットフォーム利用料入金の精算期間中に発生した、プラットフォームが設定した振替口座のWeb登録手数料
    properties-platform_fee_tax_amount:
      type: integer
      nullable: true
      example: 0
      description: |
        このプラットフォーム利用料入金において精算の対象となった取引にかかるプラットフォーム利用料の消費税
    PlatformAccountSummary:
      type: object
      properties:
        summary_id:
          type: integer
          minLength: 8
          maxLength: 8
          example: 12345678
          description: |
            プラットフォーム利用料収入サマリーID
        account_id:
          allOf:
            - $ref: '#/components/schemas/properties-account_id'
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
          description: |
            ショップID（プラットフォーム）
        tenant_shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
          description: |
            ショップID（テナント）\
            \
            この利用料収入サマリーはこのIDを持つテナントショップに関して作成されたものであることを示します。
        tenant_shop_name:
          allOf:
            - $ref: '#/components/schemas/shop_name'
          description: |
            ショップ名（テナント）
        deposit_amount:
          allOf:
            - $ref: '#/components/schemas/properties-deposit_amount'
        aggregate_term_start:
          allOf:
            - $ref: '#/components/schemas/properties-aggregate_term_start'
        aggregate_term_end:
          allOf:
            - $ref: '#/components/schemas/properties-aggregate_term_end'
        count:
          allOf:
            - $ref: '#/components/schemas/properties-count'
        total_amount:
          allOf:
            - $ref: '#/components/schemas/PlatformAccount_properties-total_amount'
        fee_amount:
          allOf:
            - $ref: '#/components/schemas/properties-fee_amount'
        taxable_fee_amount:
          allOf:
            - $ref: '#/components/schemas/taxable_fee_amount'
        nontaxable_fee_amount:
          allOf:
            - $ref: '#/components/schemas/nontaxable_fee_amount'
        tax_amount:
          allOf:
            - $ref: '#/components/schemas/tax_amount'
        web_registration_fee_amount:
          allOf:
            - $ref: '#/components/schemas/web_registration_fee_amount'
        platform_web_registration_fee_amount:
          allOf:
            - $ref: '#/components/schemas/platform_web_registration_fee_amount'
        platform_fee_amount:
          allOf:
            - $ref: '#/components/schemas/properties-platform_fee_amount'
        platform_fee_tax_amount:
          allOf:
            - $ref: '#/components/schemas/properties-platform_fee_tax_amount'
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
        tenant_account_process_id_list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Account_properties-id'
          description: |
            テナントショップにおける、このサマリーの集計対象となった売上入金IDのリスト
    PlatformAccountSummary.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/PlatformAccountSummary'
          description: |
            プラットフォーム利用料収入のサマリー情報のリスト
    PlatformAccountSummary.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/PlatformAccountSummary.list'
    ShopChargeBack.ListRetrieving.QueryParams:
      type: object
      properties:
        limit:
          type: number
          description: |
            取得件数  
        page:
          type: number
          description: |
            ページ  
        count_only:
          type: boolean
          description: |
            総件数のみフラグ  
        sort:
          type: string
          description: |
            ソート  

            - `id`: チャージバック受付ID
            - `opened_to_shop_date`: 連絡日
        order_id:
          type: string
          minLength: 1
          maxLength: 30
          description: |
            オーダーID  
        amount:
          type: number
          minimum: 1
          maximum: 9999999999
          description: |
            決済金額  
        request:
          type: string
          description: "依頼内容  \n複数指定可能  \nカンマ区切りで複数の申出内容を指定可能です。  \n\n- `1`: 配送保留\t\n- `2`: 配送停止\t\n- `11`: 利用覚えなし\t\n- `12`: サービス未提供\t\n- `13`: サービス不履行\t\n- `14`: 商品未着\t\n- `15`: 商品相違\t\n- `16`: 金額相違\t\n- `17`: 商品瑕疵\t\n- `18`: キャンセル漏れ\t\n- `19`: 解約方法確認\t\n- `20`: 代行解約希望\t\n- `21`: 問合先確認\t\n- `22`: 取引内容確認\t\n"
        status_code:
          type: string
          description: |
            チャージバックステータス  
            カンマ区切りで複数のステータスを指定可能です。  

            - `4005`: 要対応
            - `4006, 4007, 4011`: 回答済み
            - `4009`: 売上返還確定（`canceled` が `true` の場合は確定後取消）
        category:
          type: string
          description: |
            カテゴリ  
            カンマ区切りで複数のカテゴリを指定可能です。  

            - `0`: 不正利用懸念
            - `1`: 調査依頼
            - `2`: 不正利用確定
        canceled:
          type: boolean
          description: |
            チャージバック取消  
            ※この検索条件はstatus_codeに4009（売上返還確定）を指定した場合のみ有効です。
            それ以外のステータスが指定されている場合、本パラメータは無視されます。

            - `null`: 取消・取消以外の両方を取得
            - `true`: 取消のみ  
            - `false`: 取消以外  
        process_date_since:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            作成日　検索期間始端  
            yyyy/MM/dd形式  
        process_date_until:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            作成日　検索期間終端  
            yyyy/MM/dd形式  
        opened_to_shop_date_since:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            連絡日　検索期間始端  
            yyyy/MM/dd形式  
        opened_to_shop_date_until:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            連絡日　検索期間終端  
            yyyy/MM/dd形式  
    ShopChargeBackListItem:
      type: object
      properties:
        id:
          type: number
          description: |
            ID  
        shop_id:
          type: string
          minLength: 13
          maxLength: 13
          description: |
            ショップID  
        order_id:
          type: string
          minLength: 1
          maxLength: 27
          description: |
            オーダーID  
        amount:
          type: number
          minimum: 1
          maximum: 9999999999
          description: |
            金額  
        trade_registration_date:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            取引登録日時  
            yyyy/MM/dd HH:mm形式  
        category:
          type: number
          minimum: 0
          maximum: 2
          description: |
            カテゴリ  

            - `0`: 不正利用懸念
            - `1`: 調査依頼
            - `2`: 不正利用確定
        status_code:
          type: number
          minimum: 4005
          maximum: 4011
          description: "ステータス  \n\n- `4005`: 要対応\n- `4006`: 回答済み\t\n- `4007`: 回答済み\t\n- `4009`: 売上返還確定（`canceled` が `true` の場合は確定後取消）\n- `4011`: 回答済み\t\n"
        request:
          type: number
          description: "申出内容  \n\n- `1`: 配送保留\t\n- `2`: 配送停止\t\n- `11`: 利用覚えなし\t\n- `12`: サービス未提供\t\n- `13`: サービス不履行\t\n- `14`: 商品未着\t\n- `15`: 商品相違\t\n- `16`: 金額相違\t\n- `17`: 商品瑕疵\t\n- `18`: キャンセル漏れ\t\n- `19`: 解約方法確認\t\n- `20`: 代行解約希望\t\n- `21`: 問合先確認\t\n- `22`: 取引内容確認\t\n"
        process_date:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            注文日  
        opened_to_shop_date:
          type: string
          minLength: 15
          maxLength: 15
          description: |
            連絡日  
            yyyy/MM/dd HH:mm形式  
        canceled:
          type: string
          minLength: 4
          maxLength: 5
          description: |
            キャンセルフラグ  

            - `true`: チャージバックのキャンセル
            - `false`: 通常のチャージバック
        canceled_date:
          type: string
          minLength: 10
          maxLength: 10
          description: |
            キャンセル日  
            yyyy/MM/dd HH:mm形式  
    ShopChargeBackListItem.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/ShopChargeBackListItem'
    ShopChargeBack.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/_ListResponse'
        - $ref: '#/components/schemas/ShopChargeBackListItem.list'
    ShopChargeBack.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/ShopChargeBackListItem'
    ShopChargeBack.Reply.Request:
      type: object
      properties:
        contact_tel:
          type: string
          nullable: true
          description: |
            連絡先電話番号
        business_hours:
          type: string
          nullable: true
          description: |
            営業時間
        delivered:
          type: boolean
          nullable: true
          description: |
            商品を発送・提供済みか
        delivery_provider:
          type: string
          nullable: true
          description: |
            配送業者
        receipt_number:
          type: string
          nullable: true
          description: |
            送り状番号
        orderer_name:
          type: string
          nullable: true
          description: |
            注文者氏名
        orderer_address:
          type: string
          nullable: true
          description: |
            注文者住所
        orderer_tel:
          type: string
          nullable: true
          description: |
            注文者電話番号
        orderer_mail:
          type: string
          nullable: true
          description: |
            注文者メールアドレス
        receiver_name:
          type: string
          nullable: true
          description: |
            受取者氏名
        receiver_address:
          type: string
          nullable: true
          description: |
            受取者住所
        receiver_tel:
          type: string
          nullable: true
          description: |
            受取者電話番号
        provides_product:
          type: boolean
          nullable: true
          description: |
            商品・サービスを提供したか
        product_detail:
          type: string
          nullable: true
          description: |
            商品・サービスの詳細
        memo:
          type: string
          nullable: true
          description: |
            メモ
    ExaminationFileType:
      type: string
      enum:
        - DRIVER_LICENSE_FRONT
        - DRIVER_LICENSE_BACK
        - SEAL_REGISTRATION_FRONT
        - RESIDENT_CARD_FRONT
        - RESIDENT_CARD_BACK
        - SPECIAL_PERMANENT_RESIDENT_FRONT
        - SPECIAL_PERMANENT_RESIDENT_BACK
        - CERTIFICATE_OF_RESIDENCE_FRONT
        - MY_NUMBER_CARD_FRONT
        - PRODUCT_IMAGE_1
        - PRODUCT_IMAGE_2
        - PRODUCT_IMAGE_3
        - APP_IMAGE_TOP
        - APP_IMAGE_ICON
        - SALES_LICENSE_1
        - SALES_LICENSE_2
        - SALES_LICENSE_3
      example: DRIVER_LICENSE_FRONT
      description: |
        審査ファイルタイプ\
        \
        fincode審査チームに提出する画像ファイル等の種別を指定します。

        - `DRIVER_LICENSE_FRONT`: 本人確認書類; 運転免許証（表）<br /><span class="smallText">本人確認書類として運転免許証を提出する場合に指定します。裏面も提出する必要があります。</span>
        - `DRIVER_LICENSE_BACK`: 本人確認書類; 運転免許証（裏）<br /><span class="smallText">本人確認書類として運転免許証を提出する場合に指定します。表面も提出する必要があります。</span>
        - `SEAL_REGISTRATION_FRONT`: 本人確認書類; 印鑑証明書（表）<br /><span class="smallText">本人確認書類として印鑑証明書を提出する場合に指定します。</span>
        - `RESIDENT_CARD_FRONT`: 本人確認書類; 在留カード（表）<br /><span class="smallText">本人確認書類として在留カードを提出する場合に指定します。裏面も提出する必要があります。</span>
        - `RESIDENT_CARD_BACK`: 本人確認書類; 在留カード（裏）<br /><span class="smallText">本人確認書類として在留カードを提出する場合に指定します。表面も提出する必要があります。</span>
        - `SPECIAL_PERMANENT_RESIDENT_FRONT`: 本人確認書類; 特別永住者証明書（表）<br /><span class="smallText">本人確認書類として特別永住者証明書を提出する場合に指定します。裏面も提出する必要があります。</span>
        - `SPECIAL_PERMANENT_RESIDENT_BACK`: 本人確認書類; 特別永住者証明書（裏）<br /><span class="smallText">本人確認書類として特別永住者証明書を提出する場合に指定します。表面も提出する必要があります。</span>
        - `CERTIFICATE_OF_RESIDENCE_FRONT`: 本人確認書類; 住民票（表）<br /><span class="smallText">本人確認書類として住民票を提出する場合に指定します。</span>
        - `MY_NUMBER_CARD_FRONT`: 本人確認書類; マイナンバーカード（表）<br /><span class="smallText">本人確認書類としてマイナンバーカードを提出する場合に指定します。</span>
        - `PRODUCT_IMAGE_1`: 商材審査; 物販商材1 画像<br /><span class="smallText">物販商材の情報を提出する場合に指定します。`product_content_info.content1_*`に対応する画像を添付してください。</span>
        - `PRODUCT_IMAGE_2`: 商材審査; 物販商材2 画像<br /><span class="smallText">物販商材の情報を提出する場合に指定します。`product_content_info.content2_*`に対応する画像を添付してください。</span>
        - `PRODUCT_IMAGE_3`: 商材審査; 物販商材3 画像<br /><span class="smallText">物販商材の情報を提出する場合に指定します。`product_content_info.content3_*`に対応する画像を添付してください。</span>
        - `APP_IMAGE_TOP`: アプリ審査; アプリトップ画像<br /><span class="smallText">fincodeをスマートフォン上のネイティブアプリで使用し、かつfincodeによる審査時点でWebサイトが存在しない場合に指定します。アプリのトップ画面のスクリーンショットの画像を添付してください。</span>
        - `APP_IMAGE_ICON`: アプリ審査; アプリアイコン<br /><span class="smallText">fincodeをスマートフォン上のネイティブアプリで使用し、かつfincodeによる審査時点でWebサイトが存在しない場合に指定します。アプリのアイコン画像を添付してください。</span>
        - `SALES_LICENSE_1`: 販売免許等; 販売免許等1<br />
            <span class="smallText">
            ショップで取り扱う商品・サービスによっては、下記の許可証の提出が必要となります。免許・許可証の名義は契約名義と一致している必要があります。
                <ul>
                    <li>酒類: 酒類小売業販売許可証</li>
                    <li>古物: 古物商許可証</li>
                    <li>コンタクトレンズ: 高度管理医療機器販売業許可証</li>
                    <li>象牙: 経済産業省の許可証</li>
                    <li>決済業者から免許証および許可証を求められた場合は提出を依頼することがあります。</li>
                </ul>
            </span>
        - `SALES_LICENSE_2`: 販売免許等; 販売免許等2<br /><span class="smallText">許可証が複数ファイルに渡る場合、2ファイル目を提出する場合に指定します。</span>
        - `SALES_LICENSE_3`: 販売免許等; 販売免許等3<br /><span class="smallText">許可証が複数ファイルに渡る場合、3ファイル目を提出する場合に指定します。</span>
    data:
      description: |
        審査ファイルデータ\
        \
        画像ファイルをマルチパートアップロードするときはこの`data`フィールドに画像データを設定します。
    ExaminationFile.Uploading.Request:
      type: object
      required:
        - type
        - data
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/ExaminationFileType'
        data:
          allOf:
            - $ref: '#/components/schemas/data'
    ExaminationFileUpload:
      type: object
      properties:
        examination_files:
          type: array
          items:
            type: object
            properties:
              shop_id:
                allOf:
                  - $ref: '#/components/schemas/Shop_properties-id'
                description: |
                  ショップID（テナント）\
                  \
                  このIDのテナントショップに関して画像ファイルを受け付けたことを示します。
              type:
                allOf:
                  - $ref: '#/components/schemas/ExaminationFileType'
                description: |
                  審査ファイルタイプ
              filename:
                type: string
                description: |
                  審査ファイル名\
                  \
                  拡張子を含むアップロードされたファイルの名称
              filesize:
                type: number
                description: |
                  審査ファイルサイズ\
                  \
                  アップロードされたファイルのサイズ（バイト）
      x-req-properties:
        data:
          description: |
            審査ファイルデータ\
            \
            画像ファイルをマルチパートアップロードするときはこの`data`フィールドに画像データを設定します。
    ExaminationFile.Uploading.Response:
      allOf:
        - $ref: '#/components/schemas/ExaminationFileUpload'
    PlatformShop.ListRetrieving.QueryParams:
      type: object
      properties:
        id:
          type: string
          nullable: true
          minLength: 13
          maxLength: 13
          example: s_***********
          default: null
          description: |
            ショップID
        shop_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 20
          example: My Shop
          default: null
          description: |
            ショップ名
        shop_mail_address:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
          example: platform-shop@example.com
          default: null
          description: |
            ショップメールアドレス
        created_from:
          type: string
          nullable: true
          example: 2022/05/16
          default: null
          description: |
            作成日の範囲指定 開始日\
            この日付以降に作成されたショップを検索できます。\
            形式：`yyyy/MM/dd`
        created_to:
          type: string
          nullable: true
          example: 2022/05/16
          default: null
          description: |
            作成日の範囲指定 終了日\
            この日付以前に作成されたショップを検索できます。\
            形式：`yyyy/MM/dd`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `id`: ショップID
            - `shop_name`: ショップ名
            - `created`: 作成日時
            - `updated`: 更新日時
    ShopType:
      type: string
      enum:
        - null
        - platform
        - tenant
      example: platform
      description: |
        ショップタイプ。

        - `(null)`: スタンダードショップ
        - `platform`: プラットフォームショップ
        - `tenant`: テナントショップ
    ExaminationMasterId:
      type: string
      enum:
        - vm
        - jad
        - applepay_vm
        - applepay_jad
        - googlepay_vm
        - googlepay_jad
        - konbini
        - paypay
        - directdebit
        - directdebit_mizuho
        - virtualaccount
        - card_updater
      example: vm
      description: |
        審査種別マスタID。\
        プラットフォーム料率の適用対象とする決済手段の種別を表します。

        - `vm`: カード決済（VISA / Mastercard）
        - `jad`: カード決済（JCB / American Express / Diners Club / Discover）
        - `applepay_vm`: Apple Pay（VISA / Mastercard）
        - `applepay_jad`: Apple Pay（JCB / American Express / Diners Club / Discover）
        - `googlepay_vm`: Google Pay（VISA / Mastercard）
        - `googlepay_jad`: Google Pay(JCB / American Express / Diners Club / Discover）
        - `konbini`: コンビニ決済
        - `paypay`: PayPay
        - `directdebit`: 口座振替（5・6・23・27日）
        - `directdebit_mizuho`: 口座振替（1・5・20・26日）
        - `virtualaccount`: 銀行振込（バーチャル口座）
        - `card_updater`: 洗替
    PlatformRateConfig:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/ExaminationMasterId'
        platform_rate:
          type: number
          format: double
          nullable: true
          example: 5
          description: |
            （標準）プラットフォーム利用料率。\
            個別のプラットフォーム利用料率が設定されていないテナントが`id`で指定した決済手段で決済を行うと、このプラットフォーム利用料率が適用されます。\
            \
            特定のテナントに個別のプラットフォーム利用料を適用するには テナントショップ 更新API を使用します。
        fixed_fee:
          type: integer
          format: int32
          nullable: true
          example: 120
          description: |
            （標準）プラットフォーム利用料 最低料金。\
            テナントが`examination_master_id`で指定した決済手段で決済を行った際、`platform_rate`による利用料がこの最低料金を下回ると、この最低料金が適用されます。
        web_registration_fee:
          type: number
          format: double
          nullable: true
          example: 480
          description: |
            （標準）プラットフォーム利用料 Web登録手数料。\
            テナントにおいて、口座振替における振替用口座登録（Web登録）に成功した際に適用されるWeb登録手数料です。\
            ※ 口座振替のみ
        paypay_content_category_type:
          type: integer
          enum:
            - 1
            - 2
          nullable: true
          example: 1
          description: |
            PayPay審査により決定されるPayPay商材カテゴリー。

            - `1`: 物販／サービスショップ
            - `2`: デジタルコンテンツショップ

            ※ PayPayのみ
      x-req-properties:
        platform_rate:
          type: string
          nullable: true
          example: '5.0'
          description: |
            （標準）プラットフォーム利用料率。\
            個別のプラットフォーム利用料率が設定されていないテナントが`id`で指定した決済手段で決済を行うと、このプラットフォーム利用料率が適用されます。\
            \
            特定のテナントに個別のプラットフォーム利用料を適用するには テナントショップ 更新API を使用します。
        fixed_fee:
          type: string
          example: '120'
          nullable: true
          description: |
            （標準）プラットフォーム利用料 最低料金。\
            テナントが`examination_master_id`で指定した決済手段で決済を行った際、`platform_rate`による利用料がこの最低料金を下回ると、この最低料金が適用されます。
        web_registration_fee:
          type: string
          nullable: true
          example: '480'
          description: |
            （標準）プラットフォーム利用料 Web登録手数料。\
            テナントにおいて、口座振替における振替用口座登録（Web登録）に成功した際に適用されるWeb登録手数料です。\
            ※ 口座振替のみ
        paypay_content_category_type:
          type: string
          enum:
            - '1'
            - '2'
          nullable: true
          description: |
            PayPay審査により決定されるPayPay商材カテゴリー。

            - `1`: 物販／サービスショップ
            - `2`: デジタルコンテンツショップ

            ※ PayPayのみ
    Shop:
      type: object
      properties:
        id:
          type: string
          minLength: 13
          maxLength: 13
          example: s_***********
          description: |
            ショップID
        shop_name:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: My Shop
          description: |
            ショップ名
        shop_name_kana:
          type: string
          minLength: 1
          maxLength: 40
          nullable: true
          example: マイショップ
          description: |
            ショップ名（カナ）
        shop_type:
          allOf:
            - $ref: '#/components/schemas/ShopType'
        platform_id:
          type: string
          minLength: 13
          maxLength: 13
          example: p_***********
          description: |
            プラットフォームID
        platform_name:
          type: string
          minLength: 1
          maxLength: 50
          example: My Platform
          nullable: true
          description: |
            プラットフォーム名
        shared_customer_flag:
          type: string
          minLength: 1
          maxLength: 1
          enum:
            - '0'
            - '1'
          example: '0'
          nullable: true
          description: |
            顧客情報共有フラグ

            - `0`: 顧客情報を共有しない<br /><span class="smallText">顧客情報は各テナントごとに管理され、各テナントは自ショップに登録された顧客に対してのみ決済を行えます。</span>
            - `1`: 顧客情報を共有する<br /><span class="smallText">顧客情報はプラットフォーム全体で共有され、いずれのテナントもいずれの顧客に対し決済を行えます。</span>
        customer_group_id:
          type: string
          minLength: 13
          maxLength: 13
          example: cg_***********
          nullable: true
          description: |
            顧客情報共有グループID\
            fincodeは同じ顧客情報共有グループIDを持つショップ間で顧客情報を共有します。
        platform_rate_list:
          type: array
          items:
            $ref: '#/components/schemas/PlatformRateConfig'
          description: |
            決済手段ごとに存在するプラットフォーム手数料設定のリスト
        send_mail_address:
          type: string
          minLength: 1
          maxLength: 255
          nullable: true
          example: send@example.com
          description: |
            通知先メールアドレス
        shop_mail_address:
          type: string
          minLength: 1
          maxLength: 255
          nullable: true
          example: shop@example.com
          description: |
            ショップメールアドレス
        log_keep_days:
          type: integer
          minimum: 0
          maximum: 9999
          nullable: true
          example: null
          description: |
            ログ保存日数
        api_version:
          type: string
          minLength: 1
          maxLength: 8
          nullable: true
          example: '20211001'
          description: |
            APIバージョン
        api_key_display_flag:
          type: string
          minLength: 1
          maxLength: 1
          nullable: true
          enum:
            - '0'
            - '1'
          example: '0'
          description: |
            管理画面におけるAPIキー表示フラグ。

            - `0`: 表示しない
            - `1`: 表示する
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
    Shop.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/Shop'
    PlatformShop.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Shop.list'
    PlatformShop.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Shop'
    platform_rate:
      type: string
      nullable: true
      example: '5.0'
      description: |
        （標準）プラットフォーム利用料率。\
        個別のプラットフォーム利用料率が設定されていないテナントが`id`で指定した決済手段で決済を行うと、このプラットフォーム利用料率が適用されます。\
        \
        特定のテナントに個別のプラットフォーム利用料を適用するには テナントショップ 更新API を使用します。
    fixed_fee:
      type: string
      example: '120'
      nullable: true
      description: |
        （標準）プラットフォーム利用料 最低料金。\
        テナントが`examination_master_id`で指定した決済手段で決済を行った際、`platform_rate`による利用料がこの最低料金を下回ると、この最低料金が適用されます。
    web_registration_fee:
      type: string
      nullable: true
      example: '480'
      description: |
        （標準）プラットフォーム利用料 Web登録手数料。\
        テナントにおいて、口座振替における振替用口座登録（Web登録）に成功した際に適用されるWeb登録手数料です。\
        ※ 口座振替のみ
    PlatformShop.Updating.Request:
      type: object
      properties:
        examination_master_id:
          allOf:
            - $ref: '#/components/schemas/ExaminationMasterId'
        platform_rate:
          type: string
          example: '5.0'
          allOf:
            - $ref: '#/components/schemas/platform_rate'
        fixed_fee:
          allOf:
            - $ref: '#/components/schemas/fixed_fee'
        web_registration_fee:
          allOf:
            - $ref: '#/components/schemas/web_registration_fee'
      required:
        - examination_master_id
    PlatformShop.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/Shop'
    TenantShop.ListRetrieving.QueryParams:
      type: object
      properties:
        id:
          type: string
          nullable: true
          minLength: 13
          maxLength: 13
          example: s_***********
          default: null
          description: |
            ショップID
        shop_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 20
          example: My Shop
          default: null
          description: |
            ショップ名
        shop_mail_address:
          type: string
          nullable: true
          minLength: 1
          maxLength: 255
          example: platform-shop@example.com
          default: null
          description: |
            ショップメールアドレス
        created_from:
          type: string
          nullable: true
          example: 2022/05/16
          default: null
          description: |
            作成日の範囲指定 開始日\
            この日付以降に作成されたショップを検索できます。\
            形式：`yyyy/MM/dd`
        created_to:
          type: string
          nullable: true
          example: 2022/05/16
          default: null
          description: |
            作成日の範囲指定 終了日\
            この日付以前に作成されたショップを検索できます。\
            形式：`yyyy/MM/dd`
        sort:
          allOf:
            - $ref: '#/components/schemas/sort'
          nullable: true
          description: |
            ソートする項目と順序を指定します。\
            例： `?sort=updated␣desc,created␣asc`\
            \
            ソート可能な項目

            - `id`: ショップID
            - `shop_name`: ショップ名
            - `created`: 作成日時
            - `updated`: 更新日時
    TenantInvoiceRegistration.Response:
      type: object
      properties:
        registration_number:
          type: string
          nullable: true
          maxLength: 14
          example: T1234567890123
          description: |
            適格請求書発行事業者登録番号（T番号）。\
            `T`に続く数字13桁。未登録の場合は `null`。
        is_displayed:
          type: boolean
          nullable: true
          example: true
          description: |
            適格請求書発行事業者登録番号の表示設定（マスタ）。\
            `false` の場合、登録番号が登録されていても各画面・帳票には表示されません。未登録の場合は `null`。
        is_displayed_for_invoice:
          type: boolean
          nullable: true
          example: true
          description: |
            インボイス（請求書）における適格請求書発行事業者登録番号の表示設定。\
            `is_displayed` が `true` の場合に有効。未登録の場合は `null`。
        is_displayed_for_tenant_account_detail:
          type: boolean
          nullable: true
          example: true
          description: |
            テナント売上明細における適格請求書発行事業者登録番号の表示設定。\
            `is_displayed` が `true` の場合に有効。未登録の場合は `null`。
    TenantShop.ListRetrieving.Response:
      type: object
      properties:
        list:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Shop'
              - $ref: '#/components/schemas/TenantInvoiceRegistration.Response'
    TenantShop.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Shop'
        - $ref: '#/components/schemas/TenantInvoiceRegistration.Response'
    paypay_content_category_type:
      type: string
      enum:
        - '1'
        - '2'
      nullable: true
      description: |
        PayPay審査により決定されるPayPay商材カテゴリー。

        - `1`: 物販／サービスショップ
        - `2`: デジタルコンテンツショップ

        ※ PayPayのみ
    api_key_display_flag:
      type: string
      minLength: 1
      maxLength: 1
      nullable: true
      enum:
        - '0'
        - '1'
      example: '0'
      description: |
        管理画面におけるAPIキー表示フラグ。

        - `0`: 表示しない
        - `1`: 表示する
    TenantShop.Updating.Request:
      type: object
      properties:
        examination_master_id:
          allOf:
            - $ref: '#/components/schemas/ExaminationMasterId'
        platform_rate:
          allOf:
            - $ref: '#/components/schemas/platform_rate'
          description: |
            （個別）プラットフォーム利用料率。\
            このテナントが`id`で指定した決済手段で決済を行うと、このプラットフォーム利用料率が適用されます。
        fixed_fee:
          allOf:
            - $ref: '#/components/schemas/fixed_fee'
          description: |
            （個別）プラットフォーム利用料 最低料金。\
            このテナントが`examination_master_id`で指定した決済手段で決済を行った際、`platform_rate`による利用料がこの最低料金を下回ると、この最低料金が適用されます。
        web_registration_fee:
          allOf:
            - $ref: '#/components/schemas/web_registration_fee'
          description: |
            （個別）プラットフォーム利用料 Web登録手数料。\
            このテナントに紐づく顧客が口座振替における振替用口座登録（Web登録）に成功した際に適用されるWeb登録手数料です。
        paypay_content_category_type:
          allOf:
            - $ref: '#/components/schemas/paypay_content_category_type'
          description: |
            PayPay審査により決定されるPayPay商材カテゴリー。\
            PayPayのプラットフォーム利用料（`platform_rate`）はこの`paypay_content_category_type`ごとに設定します。

            - `1`: 物販／サービスショップ
            - `2`: デジタルコンテンツショップ

            ※ PayPayのみ
        api_key_display_flag:
          allOf:
            - $ref: '#/components/schemas/api_key_display_flag'
          description: |
            APIキー表示フラグ\
            `1`を指定するとテナントショップの管理画面上にAPIキーが表示されるようになります。

            - `0`: 表示しない
            - `1`: 表示する
        registration_number:
          type: string
          nullable: true
          maxLength: 14
          pattern: ^T[0-9]{13}$
          example: T1234567890123
          description: |
            適格請求書発行事業者登録番号（T番号）。\
            `T`に続けて数字13桁を指定してください。
        is_displayed:
          type: boolean
          example: true
          description: |
            適格請求書発行事業者登録番号の表示設定（マスタ）。\
            登録番号を各画面・帳票に表示するかどうかを切り替えます。`false`を指定すると登録番号が登録されていても表示されません。\
            boolean 以外の値を指定した場合は未指定として扱われます（既存値を維持）。

            - `false`: 表示しない
            - `true`: 表示する
        is_displayed_for_invoice:
          type: boolean
          example: true
          description: |
            インボイス（請求書）における適格請求書発行事業者登録番号の表示設定。\
            `is_displayed` を `true` にした場合のみ `true` を指定できます。\
            boolean 以外の値を指定した場合は未指定として扱われます（既存値を維持）。

            - `false`: 表示しない
            - `true`: 表示する
        is_displayed_for_tenant_account_detail:
          type: boolean
          example: true
          description: |
            テナント売上明細における適格請求書発行事業者登録番号の表示設定。\
            `is_displayed` を `true` にした場合のみ `true` を指定できます。\
            boolean 以外の値を指定した場合は未指定として扱われます（既存値を維持）。

            - `false`: 表示しない
            - `true`: 表示する
    TenantShop.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/Shop'
        - $ref: '#/components/schemas/TenantInvoiceRegistration.Response'
    x-req-properties-email:
      type: string
      minLength: 1
      maxLength: 254
      example: new-fincode-user@example.com
      description: |
        メールアドレス\
        \
        fincodeに新規作成するユーザーのメールアドレス。\
        すでに登録されているメールアドレスを指定するとエラーとなります。（エラーコード：`E0087012014`）\
        \
        形式： RFC 5322
    password:
      type: string
      minLength: 12
      maxLength: 254
      example: password1234
      description: |
        パスワード\
        \
        fincodeに新規作成するユーザーのパスワード。\
        パスワードは以下の条件を満たす必要があります。

        - 半角英数のみ
        - 12文字以上
        - 英数ともに使用
        - 大文字小文字ともに使用
    POST.TenantEntries_x-req-properties-name:
      type: string
      minLength: 1
      maxLength: 384
      example: Epsilon Taro
      description: |
        ユーザー名\
        \
        fincodeに新規作成するユーザーの名前
    tenant_url_id:
      type: string
      minLength: 25
      maxLength: 25
      example: tu_**********************
      description: |
        テナント登録URL ID\
        \
        テナント登録URLのID。\
        [管理画面 > プラットフォームの運用と管理 > 構成](https://dashboard.test.fincode.jp/platform/setting)の『テナント登録用のURL』の`tenant_url_id`の値をこのパラメータに指定します。
    POST.TenantEntries.Request:
      type: object
      properties:
        email:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-email'
        password:
          allOf:
            - $ref: '#/components/schemas/password'
        name:
          allOf:
            - $ref: '#/components/schemas/POST.TenantEntries_x-req-properties-name'
        tenant_url_id:
          allOf:
            - $ref: '#/components/schemas/tenant_url_id'
      required:
        - email
        - password
        - name
        - tenant_url_id
    Role_properties-id:
      type: integer
      minLength: 1
      maxLength: 11
      example: 9
      description: |
        ロールID\
        \
        ユーザーの管理画面における権限を示すIDです。
    User:
      type: object
      properties:
        id:
          type: string
          minLength: 24
          maxLength: 24
          example: u_**********************
          description: |
            ユーザーID
        default_shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
          description: |
            デフォルトショップID\
            \
            このユーザーがログインした際、どのショップにログインするかを示すID
        role_id:
          allOf:
            - $ref: '#/components/schemas/Role_properties-id'
        name:
          type: string
          minLength: 1
          maxLength: 384
          example: Epsilon Taro
          description: |
            ユーザー名
        email:
          type: string
          minLength: 1
          maxLength: 384
          example: new-fincode-user@example.com
          description: |
            メールアドレス
        type:
          type: string
          enum:
            - '01'
          example: '01'
          description: |
            ユーザー種別

            - `01`: ショップユーザー
        two_factor_auth_status:
          type: string
          enum:
            - '00'
            - '01'
          example: '00'
          description: |
            二要素認証ステータス

            - `00`: 未設定\
            - `01`: 設定済み
        mail_auth_status:
          type: string
          enum:
            - '00'
            - '01'
          example: '00'
          description: |
            メールアドレス認証ステータス

            - `00`: 未設定\
            - `01`: 設定済み
        password_lock_status:
          type: string
          enum:
            - '00'
            - '01'
          example: '00'
          description: |
            パスワードロックステータス

            - `00`: ロックされていない\
            - `01`: ロック中
        last_login_date:
          type: string
          nullable: true
          example: null
          description: |
            最終ログイン日時\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        login_failure_date:
          type: string
          nullable: true
          example: null
          description: |
            ログイン失敗日時\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        login_failure_times:
          type: integer
          example: 0
          description: |
            ログイン失敗回数
        password_expire:
          type: string
          nullable: true
          example: 2022/05/16 12.34.56.789
          description: |
            パスワード有効期限\
            \
            形式：`yyyy/MM/dd HH:mm:ss.SSS`
        account_status:
          type: string
          enum:
            - '00'
            - '01'
          example: '00'
          description: |
            アカウントステータス

            - `00`: 有効
            - `01`: 無効
        invite_status:
          type: string
          enum:
            - '01'
            - '02'
          example: '02'
          description: |
            招待ステータス

            - `01`: 招待中
            - `02`: 参加済み
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
    POST.TenantEntries:
      type: object
      properties:
        user_data:
          allOf:
            - $ref: '#/components/schemas/User'
          description: |
            新規作成されたユーザー情報（このAPIによって新規作成されたテナントのショップIDを含む）
        access_token:
          type: string
          minLength: 112
          maxLength: 112
          example: a_****_**************
          description: |
            アクセストークン
        authorities:
          type: array
          items:
            type: object
            properties:
              auth_id:
                type: integer
                example: 18
                description: 権限ID
              endpoint:
                type: string
                example: /v1/payments
                description: エンドポイント
              method:
                type: string
                example: GET
                description: HTTPメソッド
          description: |
            ユーザーの権限情報\
            \
            このユーザーが実行可能なエンドポイントとHTTPメソッドの情報
      x-req-properties:
        email:
          type: string
          minLength: 1
          maxLength: 254
          example: new-fincode-user@example.com
          description: |
            メールアドレス\
            \
            fincodeに新規作成するユーザーのメールアドレス。\
            すでに登録されているメールアドレスを指定するとエラーとなります。（エラーコード：`E0087012014`）\
            \
            形式： RFC 5322
        password:
          type: string
          minLength: 12
          maxLength: 254
          example: password1234
          description: |
            パスワード\
            \
            fincodeに新規作成するユーザーのパスワード。\
            パスワードは以下の条件を満たす必要があります。

            - 半角英数のみ
            - 12文字以上
            - 英数ともに使用
            - 大文字小文字ともに使用
        name:
          type: string
          minLength: 1
          maxLength: 384
          example: Epsilon Taro
          description: |
            ユーザー名\
            \
            fincodeに新規作成するユーザーの名前
        tenant_url_id:
          type: string
          minLength: 25
          maxLength: 25
          example: tu_**********************
          description: |
            テナント登録URL ID\
            \
            テナント登録URLのID。\
            [管理画面 > プラットフォームの運用と管理 > 構成](https://dashboard.test.fincode.jp/platform/setting)の『テナント登録用のURL』の`tenant_url_id`の値をこのパラメータに指定します。
    POST.TenantEntries.Response:
      allOf:
        - $ref: '#/components/schemas/POST.TenantEntries'
    POST.JoinTenants_x-req-properties-email:
      type: string
      minLength: 1
      maxLength: 254
      example: new-fincode-user@example.com
      description: |
        メールアドレス\
        \
        プラットフォームショップのユーザーのメールアドレス。
    x-req-properties-password:
      type: string
      minLength: 12
      maxLength: 254
      example: password1234
      description: |
        パスワード\
        \
        プラットフォームショップのユーザーのパスワード。
    POST.JoinTenants.Request:
      type: object
      properties:
        email:
          allOf:
            - $ref: '#/components/schemas/POST.JoinTenants_x-req-properties-email'
        password:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-password'
        tenant_url_id:
          allOf:
            - $ref: '#/components/schemas/tenant_url_id'
      required:
        - email
        - password
        - tenant_url_id
    shop_name_kana:
      type: string
      minLength: 1
      maxLength: 40
      nullable: true
      example: マイショップ
      description: |
        ショップ名（カナ）
    platform_id:
      type: string
      minLength: 13
      maxLength: 13
      example: p_***********
      description: |
        プラットフォームID
    platform_name:
      type: string
      minLength: 1
      maxLength: 50
      example: My Platform
      nullable: true
      description: |
        プラットフォーム名
    shared_customer_flag:
      type: string
      minLength: 1
      maxLength: 1
      enum:
        - '0'
        - '1'
      example: '0'
      nullable: true
      description: |
        顧客情報共有フラグ

        - `0`: 顧客情報を共有しない<br /><span class="smallText">顧客情報は各テナントごとに管理され、各テナントは自ショップに登録された顧客に対してのみ決済を行えます。</span>
        - `1`: 顧客情報を共有する<br /><span class="smallText">顧客情報はプラットフォーム全体で共有され、いずれのテナントもいずれの顧客に対し決済を行えます。</span>
    properties-customer_group_id:
      type: string
      minLength: 13
      maxLength: 13
      example: cg_***********
      nullable: true
      description: |
        顧客情報共有グループID\
        fincodeは同じ顧客情報共有グループIDを持つショップ間で顧客情報を共有します。
    send_mail_address:
      type: string
      minLength: 1
      maxLength: 255
      nullable: true
      example: send@example.com
      description: |
        通知先メールアドレス
    shop_mail_address:
      type: string
      minLength: 1
      maxLength: 255
      nullable: true
      example: shop@example.com
      description: |
        ショップメールアドレス
    log_keep_days:
      type: integer
      minimum: 0
      maximum: 9999
      nullable: true
      example: null
      description: |
        ログ保存日数
    api_version:
      type: string
      minLength: 1
      maxLength: 8
      nullable: true
      example: '20211001'
      description: |
        APIバージョン
    POST.JoinTenants:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        shop_name:
          allOf:
            - $ref: '#/components/schemas/shop_name'
        shop_name_kana:
          allOf:
            - $ref: '#/components/schemas/shop_name_kana'
        shop_type:
          allOf:
            - $ref: '#/components/schemas/ShopType'
        platform_id:
          allOf:
            - $ref: '#/components/schemas/platform_id'
        platform_name:
          allOf:
            - $ref: '#/components/schemas/platform_name'
        shared_customer_flag:
          allOf:
            - $ref: '#/components/schemas/shared_customer_flag'
        customer_group_id:
          allOf:
            - $ref: '#/components/schemas/properties-customer_group_id'
        send_mail_address:
          allOf:
            - $ref: '#/components/schemas/send_mail_address'
        shop_mail_address:
          allOf:
            - $ref: '#/components/schemas/shop_mail_address'
        log_keep_days:
          allOf:
            - $ref: '#/components/schemas/log_keep_days'
        api_version:
          allOf:
            - $ref: '#/components/schemas/api_version'
        api_key_display_flag:
          allOf:
            - $ref: '#/components/schemas/api_key_display_flag'
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
      x-req-properties:
        email:
          type: string
          minLength: 1
          maxLength: 254
          example: new-fincode-user@example.com
          description: |
            メールアドレス\
            \
            プラットフォームショップのユーザーのメールアドレス。
        password:
          type: string
          minLength: 12
          maxLength: 254
          example: password1234
          description: |
            パスワード\
            \
            プラットフォームショップのユーザーのパスワード。
        tenant_url_id:
          type: string
          minLength: 25
          maxLength: 25
          example: tu_**********************
          description: |
            テナント登録URL ID\
            \
            テナント登録URLのID。\
            [管理画面 > プラットフォームの運用と管理 > 構成](https://dashboard.test.fincode.jp/platform/setting)の『テナント登録用のURL』の`tenant_url_id`の値をこのパラメータに指定します。
    POST.JoinTenants.Response:
      allOf:
        - $ref: '#/components/schemas/POST.JoinTenants'
    ContractStatus:
      type: string
      enum:
        - '101'
        - '102'
        - '103'
        - '105'
        - '106'
        - '107'
      description: |
        契約ステータス\
        \
        fincodeとそのショップの運営事業者の契約のステータスを表します。

        - `101`: 未契約<br /><span class="smallText">まだfincodeの本番環境申請の提出が完了していない状態です。</span>
        - `102`: 利用審査中<br /><span class="smallText">fincodeの本番環境申請の提出が完了し、利用審査中の状態です。</span>
        - `103`: 利用審査中（VISA/Mastercard利用可）<br /><span class="smallText">即時利用によりVISA/Mastercardブランドの決済受付が可能な状態です。審査は継続して行われます。</span>
        - `105`: 解約済
        - `106`: 契約不成立<br /><span class="smallText">審査の結果、fincodeの利用が不可となった状態です。</span>
        - `107`: 稼働中<br /><span class="smallText">fincodeの本番環境申請が完了し、クレジットカード決済の受付が可能な状態です。</span>
    CorporateInfo.V2:
      type: object
      properties:
        corporate_number:
          type: string
          minLength: 13
          maxLength: 13
          nullable: true
          example: '1234567890123'
          description: |
            法人番号
        corporate_name:
          type: string
          minLength: 1
          maxLength: 150
          example: サンプル株式会社
          description: |
            法人名
        corporate_name_kana:
          type: string
          minLength: 1
          maxLength: 150
          example: サンプルカブシキガイシャ
          description: |
            法人名（カナ）
        hp:
          type: string
          minLength: 1
          maxLength: 300
          nullable: true
          example: https://www.sample-corp.example.com
          description: |
            企業サイトURL
        capital:
          type: number
          nullable: true
          minLength: 1
          maxLength: 19
          example: 1000000
          description: |
            資本金
        established_at:
          type: string
          nullable: true
          minLength: 10
          maxLength: 10
          example: 2020/01/01
          description: |
            設立日
        yearly_sales:
          type: number
          nullable: true
          minLength: 1
          maxLength: 19
          example: 1000000
          description: |
            年商
        business_details:
          type: string
          nullable: true
          minLength: 1
          maxLength: 5000
          example: ○○の製造・販売を行っており、fincodeによるオンラインでの販売を予定。
          description: |
            事業内容
        company_postal_code:
          type: string
          nullable: true
          minLength: 8
          maxLength: 8
          example: 123-4567
          description: |
            会社住所 郵便番号\
            形式： 半角数字（ハイフンあり）
        company_prefecture:
          type: string
          nullable: true
          minLength: 3
          maxLength: 4
          example: 東京都
          description: |
            会社住所 都道府県\
            形式： 漢字
        company_prefecture_kana:
          type: string
          nullable: true
          minLength: 1
          maxLength: 6
          example: トウキョウト
          description: |
            会社住所 都道府県（カナ）\
            形式： 全角カタカナ
        company_address_municipality:
          type: string
          nullable: true
          minLength: 1
          maxLength: 50
          example: 渋谷区
          description: |
            会社住所 市区町村\
            形式： 漢字/ひらがな/カタカナ/半角英数
        company_address_municipality_kana:
          type: string
          nullable: true
          minLength: 1
          maxLength: 100
          example: シブヤク
          description: |
            会社住所 市区町村（カナ）\
            形式： 全角カタカナ
        company_address_section:
          type: string
          nullable: true
          minLength: 1
          maxLength: 50
          example: 道玄坂
          description: |
            会社住所 町域\
            形式： 漢字/ひらがな/カタカナ/半角英数
        company_address_section_kana:
          type: string
          nullable: true
          minLength: 1
          maxLength: 100
          example: ドウゲンザカ
          description: |
            会社住所 町域（カナ）\
            形式： 全角カタカナ
        company_address_chrome:
          type: string
          nullable: true
          minLength: 1
          maxLength: 100
          example: 1-2-3
          description: |
            会社住所 番地\
            形式： 漢字/ひらがな/カタカナ/半角英数
        company_address_chrome_kana:
          type: string
          nullable: true
          minLength: 1
          maxLength: 100
          example: イチニサン
          description: |
            会社住所 番地（カナ）\
            形式： 全角カタカナ
        company_address_building_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 100
          example: サンプルビル
          description: |
            会社住所 ビル名\
            形式： 漢字/ひらがな/カタカナ/半角英数
        company_address_building_name_kana:
          type: string
          nullable: true
          minLength: 1
          maxLength: 100
          example: サンプルビル
          description: |
            会社住所 ビル名（カナ）\
            形式： 全角カタカナ
        company_tel:
          type: string
          nullable: true
          minLength: 1
          maxLength: 15
          example: '0312345678'
          description: |
            会社情報 電話番号\
            形式： 半角数字（ハイフンなし）
      required:
        - corporate_number
        - corporate_name
        - corporate_name_kana
        - company_postal_code
        - company_prefecture
        - company_prefecture_kana
        - company_address_municipality
        - company_address_municipality_kana
        - company_address_section
        - company_address_section_kana
        - company_address_chrome
        - company_address_chrome_kana
        - company_tel
        - capital
        - established_at
        - yearly_sales
        - business_details
    ContractInfo.V2:
      type: object
      properties:
        representative_last_name:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: 山田
          description: |
            代表者 姓
            形式： 漢字/ひらがな/カタカナ/半角英字
        representative_last_name_kana:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: ヤマダ
          description: |
            代表者 姓（カナ）\
            形式： 全角カナ
        representative_first_name:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: 太郎
          description: |
            代表者 名\
            形式： 漢字/ひらがな/カタカナ/半角英字
        representative_first_name_kana:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: タロウ
          description: |
            代表者 名（カナ）\
            形式： 全角カナ
        representative_postal_code:
          type: string
          pattern: ^\d{3}-\d{4}$
          nullable: true
          minLength: 8
          maxLength: 8
          example: 150-0043
          description: |
            代表者 住所 郵便番号\
            形式：`xxx-xxxx`
        representative_prefecture:
          type: string
          minLength: 1
          maxLength: 4
          nullable: true
          example: 東京都
          description: |
            代表者 住所 都道府県\
            形式： 漢字
        representative_prefecture_kana:
          type: string
          minLength: 1
          maxLength: 6
          nullable: true
          example: トウキョウト
          description: |
            代表者 住所 都道府県（カナ）\
            形式： 全角カナ
        representative_address_municipality:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: 渋谷区
          description: |
            代表者 住所 市区町村\
            形式： 漢字/ひらがな/カタカナ/半角英数
        representative_address_municipality_kana:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          example: シブヤク
          description: |
            代表者 住所 市区町村（カナ）\
            形式： 全角カナ
        representative_address_section:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: 道玄坂
          description: |
            代表者 住所 町域\
            形式： 漢字/ひらがな/カタカナ/半角英数
        representative_address_section_kana:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          example: ドウゲンザカ
          description: |
            代表者 住所 町域（カナ）\
            形式： 全角カナ
        representative_address_chrome:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: 1-14-6
          description: |
            代表者 住所 番地\
            形式： 漢字/ひらがな/カタカナ/半角英数
        representative_address_chrome_kana:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          example: 1-14-6
          description: |
            代表者 住所 番地（カナ）
        representative_address_building_name:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          example: ヒューマックス渋谷ビル 7F
          description: |
            代表者 住所 建物名\
            形式： 漢字/ひらがな/カタカナ/半角英数
        representative_address_building_name_kana:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          example: ヒューマックスシブヤビル ナナカイ
          description: |
            代表者 住所 建物名（カナ）\
            形式： 全角カナ
        representative_tel:
          type: string
          minLength: 1
          maxLength: 15
          pattern: ^\d{1,15}$
          nullable: true
          example: '0364330000'
          description: |
            代表者 電話番号\
            形式： 半角数字（ハイフンなし、PHS番号不可）
        representative_birthday:
          type: string
          pattern: ^\d{4}/\d{2}/\d{2}$
          nullable: true
          example: 1980/01/01
          description: |
            代表者 生年月日\
            \
            形式：`yyyy/MM/dd`
        representative_gender:
          type: integer
          enum:
            - 0
            - 1
          nullable: true
          example: 0
          description: |
            代表者 性別

            - `0`: 男性
            - `1`: 女性
        staff1_last_name:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: 鈴木
          description: |
            担当者1 姓\
            形式： 漢字/ひらがな/カタカナ/半角英字\
            \
            fincodeは担当者1,2宛てに審査結果の通知や審査保留対応の連絡などを行います。
        staff1_last_name_kana:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: スズキ
          description: |
            担当者1 姓（カナ）\
            形式： 全角カナ
        staff1_first_name:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: 次郎
          description: |
            担当者1 名\
            形式： 漢字/ひらがな/カタカナ/半角英字
        staff1_first_name_kana:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: ジロウ
          description: |
            担当者1 名（カナ）\
            形式： 全角カナ
        staff1_company_name:
          type: string
          minLength: 1
          maxLength: 150
          nullable: true
          example: サンプル株式会社
          description: |
            担当者1 会社名\
            形式： 漢字/ひらがな/カタカナ/半角英数
        staff1_belongs:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: EC事業部
          description: |
            担当者1 部署名\
            形式： 漢字/ひらがな/カタカナ/半角英数
        staff1_tel:
          type: string
          minLength: 1
          maxLength: 15
          pattern: ^\d{1,15}$
          nullable: true
          example: '09000000000'
          description: |
            担当者1 電話番号\
            形式： 半角数字（ハイフンなし、PHS番号不可）
        staff1_mail:
          type: string
          minLength: 1
          maxLength: 254
          format: email
          nullable: true
          example: staff-1@example.com
          description: |
            担当者1 メールアドレス\
            形式： RFC 5322
        staff2_last_name:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: 佐藤
          description: |
            担当者2 姓\
            形式： 漢字/ひらがな/カタカナ/半角英字
        staff2_last_name_kana:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: サトウ
          description: |
            担当者2 姓（カナ）\
            形式： 全角カナ
        staff2_first_name:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: 三郎
          description: |
            担当者2 名\
            形式： 漢字/ひらがな/カタカナ/半角英字
        staff2_first_name_kana:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          example: サブロウ
          description: |
            担当者2 名（カナ）\
            形式： 全角カナ
        staff2_company_name:
          type: string
          minLength: 1
          maxLength: 150
          nullable: true
          example: サンプル株式会社
          description: |
            担当者2 会社名\
            形式： 漢字/ひらがな/カタカナ/半角英数
        staff2_belongs:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          example: 営業統括部
          description: |
            担当者2 部署名\
            形式： 漢字/ひらがな/カタカナ/半角英数
        staff2_tel:
          type: string
          minLength: 1
          maxLength: 15
          pattern: ^\d{1,15}$
          nullable: true
          example: '09000000000'
          description: |
            担当者2 電話番号\
            形式： 半角数字（ハイフンなし、PHS番号不可）
        staff2_mail:
          type: string
          minLength: 1
          maxLength: 254
          format: email
          nullable: true
          example: staff-2@example.com
          description: |
            担当者2 メールアドレス\
            形式： RFC 5322
        corporate:
          type: boolean
          nullable: true
          example: true
          description: |
            事業形態\
            \
            - `true`: 法人\
            - `false`: 個人事業主
        corporate_info:
          allOf:
            - $ref: '#/components/schemas/CorporateInfo.V2'
          nullable: true
          description: |
            法人情報
            \
            `corporate`が`true`のとき必須
      required:
        - representative_last_name
        - representative_last_name_kana
        - representative_first_name
        - representative_first_name_kana
        - representative_postal_code
        - representative_prefecture
        - representative_prefecture_kana
        - representative_address_municipality
        - representative_address_municipality_kana
        - representative_address_section
        - representative_address_section_kana
        - representative_address_chrome
        - representative_address_chrome_kana
        - representative_tel
        - representative_birthday
        - representative_gender
        - staff1_last_name
        - staff1_last_name_kana
        - staff1_first_name
        - staff1_first_name_kana
        - staff1_company_name
        - staff1_tel
        - staff1_mail
        - corporate
    ContentInfo.V2:
      type: object
      required:
        - content1_name
        - content1_description
        - content1_unit_price
      properties:
        content1_name:
          type: string
          minLength: 1
          maxLength: 200
          example: サンプル商材1
          description: |
            商材1 名称
        content1_description:
          type: string
          minLength: 1
          maxLength: 200
          example: サンプル商材1の説明
          description: |
            商材1 説明
        content1_unit_price:
          type: integer
          minLength: 1
          maxLength: 19
          example: 1000
          description: |
            商材1 単価
        content2_name:
          type: string
          minLength: 1
          maxLength: 200
          example: サンプル商材2
          description: |
            商材2 名称
        content2_description:
          type: string
          minLength: 1
          maxLength: 200
          example: サンプル商材2の説明
          description: |
            商材2 説明
        content2_unit_price:
          type: integer
          minLength: 1
          maxLength: 19
          example: 2000
          description: |
            商材2 単価
        content3_name:
          type: string
          minLength: 1
          maxLength: 200
          example: サンプル商材3
          description: |
            商材3 名称
        content3_description:
          type: string
          minLength: 1
          maxLength: 200
          example: サンプル商材3の説明
          description: |
            商材3 説明
        content3_unit_price:
          type: integer
          minLength: 1
          maxLength: 19
          example: 3000
          description: |
            商材3 単価
    ShopInfo.V2:
      type: object
      properties:
        shop_name:
          type: string
          minLength: 1
          maxLength: 100
          example: サンプルショップ東京
          description: |
            fincodeにおけるショップ名
        shop_name_kana:
          type: string
          minLength: 1
          maxLength: 100
          example: サンプルショップトウキョウ
          description: |
            fincodeにおけるショップ名（カナ）
        shop_name_en:
          type: string
          minLength: 1
          maxLength: 25
          example: Sample Shop Tokyo
          description: |
            fincodeにおけるショップ名（英語）
        support_mail:
          type: string
          nullable: true
          minLength: 1
          maxLength: 254
          example: support@example.com
          description: |
            購入者向けサポート窓口 メールアドレス\
            形式： RFC 5322
        support_tel:
          type: string
          nullable: true
          minLength: 1
          maxLength: 15
          example: 312345678
          description: |
            購入者向けサポート窓口 電話番号\
            形式： 電話番号（ハイフンなし）
        unit_price:
          type: number
          nullable: true
          minLength: 1
          maxLength: 23
          example: 1000
          description: |
            1回の決済における金額（単価）\
            \
            例： `1000`（1000円）
        deals_long_apply_content:
          type: boolean
          nullable: true
          example: true
          description: |
            fincode審査に時間がかかるコンテンツを取り扱うかどうかの表明

            - `true`: fincode審査に時間がかかるコンテンツを取り扱う
            - `false`: fincode審査に時間がかかるコンテンツを取り扱わない

            以下の商材を取り扱う場合は`true`を指定する必要があります。

            - 呉服
            - コンサルディングサービス
            - エステ、美容サロン、美容医療
            - スポーツ施設・フィットネスクラブ
            - カルチャースクール・通信講座
            - データ販売
            - 情報詳細（情報の内容自体が商品となるもの）
            - 占い
            - サプリメント・健康食品
            - 美容品・化粧品
            - カツラ
            - 旅行業に該当するサービス
            - タバコ・CBD
            - 寄付金
        deals_insecure_content:
          type: boolean
          nullable: true
          example: true
          description: |
            fincodeで取扱不可の商材を取り扱わないことの表明

            - `true`: 取扱不可の商材を取り扱う予定はない
            - `false`: 取扱不可の商材を取り扱う予定がある

            fincodeの禁止商材は以下の通りです。

            - 金融行為（クレジットカードショッピング枠の現金化等）
            - 仮想通貨取引、金券（印紙、切手等含む）、商品券、プリペイドカード、有価証券
            - 賭博、ギャンブル
            - RMT（リアルマネートレーディング）
            - ペット等の生き物全般（※標本・剥製も含む）
            - お布施
            - 危険ドラッグ、デザイナーズドラッグ
            - 処方箋なしで購入できる処方薬（ルミガン・ラディース・クラッシュビスタ・ケアプロスト等）
            - 第三者の著作権・肖像権・知的所有権等を侵害する恐れがあるもの
            - 公序良俗に反するもの（アダルト、出会い系サイトを含む）
            - 法律・法令の定めに違反するもの（銃刀法・麻薬取締法・ワシントン条約・薬事法）
        lost_trial:
          type: boolean
          nullable: true
          example: true
          description: |
            改正割賦販売法に基づく訴訟敗訴歴があるかどうかの表明

            - `true`: 改正割賦販売法に基づく訴訟敗訴歴がない
            - `false`: 改正割賦販売法に基づく訴訟敗訴歴がある
        use_of_fincode:
          type: object
          properties:
            used_on_web:
              type: boolean
              nullable: true
              example: true
              description: |
                Webサイト利用有無\
                \
                Webサイト/Webアプリでfincodeを使用するかどうか

                - `true`: Webサイト/Webアプリでfincodeを使用する
            used_on_app:
              type: boolean
              nullable: true
              example: true
              description: |
                ネイティブアプリ利用有無\
                \
                ネイティブアプリでfincodeを使用するかどうか

                - `true`: ネイティブアプリでfincodeを使用する
        site_published:
          type: boolean
          nullable: true
          example: true
          description: |
            Webサイトの公開状況\
            \
            fincode審査時点で決済機能を提供するWebサイトが閲覧可能かどうかを示します。\
            `usage_of_fincode.used_on_web`が`true`の場合、指定必須です。

            - `true`: fincode審査チームがサイトを閲覧可能
            - `false`: fincode審査チームがサイトを閲覧不可能
        site_info:
          type: object
          properties:
            url:
              type: string
              nullable: true
              minLength: 1
              maxLength: 300
              example: https://example.com
              description: |
                WebサイトURL\
                \
                fincode審査チームがサイトを閲覧するためのURL
            credential:
              type: string
              nullable: true
              minLength: 1
              maxLength: 100
              example: 'ID: example_user,Password: password'
              description: |
                ログイン情報\
                \
                fincode審査チームがサイトを閲覧するためのログイン情報
          required:
            - url
          description: |
            Webサイト情報\
            \
            fincode審査チームが審査上確認をする、fincodeによる決済を行うWebサイトの情報
        prepaid_point:
          type: boolean
          nullable: true
          example: true
          description: |
            プリペイドポイントの有無\
            \
            ショップがプリペイドポイントを導入しているかどうか
        prepaid_point_info:
          type: object
          properties:
            how_to_use:
              type: string
              nullable: true
              minLength: 1
              maxLength: 300
              example: ポイントは購入時に利用可能で、合計金額からポイントを差し引いて決済を行う。
              description: |
                ポイント利用方法\
                \
                プリペイドポイントの利用方法
            about_expiration:
              type: string
              nullable: true
              minLength: 1
              maxLength: 300
              example: ポイントは1年間有効。
              description: |
                ポイント有効期限について\
                \
                プリペイドポイントの有効期限について
        provides:
          type: object
          description: |
            商材情報
          properties:
            product:
              type: boolean
              nullable: true
              example: false
              description: |
                物販商材 提供有無\
                \
                ショップが物品販売を行うかどうか
            service:
              type: boolean
              nullable: true
              example: false
              description: |
                サービス商材 提供有無\
                \
                ショップがサービス提供を行うかどうか
            digital_contents:
              type: boolean
              nullable: true
              example: true
              description: |
                デジタルコンテンツ 提供有無\
                \
                ショップがデジタルコンテンツ販売を行うかどうか
        content_description:
          type: string
          nullable: true
          minLength: 1
          maxLength: 5000
          example: |
            本サービスは、ユーザーが自由にWeb記事を投稿・販売できるコンテンツを提供しています。
          description: |
            取扱商材の説明\
            \
            ショップの提供する商材についての説明
        product_content_info:
          allOf:
            - $ref: '#/components/schemas/ContentInfo.V2'
          description: '物販商材情報<br>webサイトが公開されていない場合、取扱商材の詳細情報が必要になります。<br><a style="color: rgb(212, 31, 28);">※ use_of_fincode.used_on_web または site_publishedが</a> `false` <a style="color: rgb(212, 31, 28);"><br>かつ provides.productが</a> `true` <a style="color: rgb(212, 31, 28);">のとき必須</a>'
        service_content_info:
          allOf:
            - $ref: '#/components/schemas/ContentInfo.V2'
          description: 'サービス商材情報<br>webサイトが公開されていない場合、取扱商材の詳細情報が必要になります。<br><a style="color: rgb(212, 31, 28);">※ use_of_fincode.used_on_web または site_publishedが</a> `false` <a style="color: rgb(212, 31, 28);"><br>かつ provides.serviceが</a> `true` <a style="color: rgb(212, 31, 28);">のとき必須</a>'
        digital_content_info:
          allOf:
            - $ref: '#/components/schemas/ContentInfo.V2'
          description: 'デジタルコンテンツ商材情報<br>webサイトが公開されていない場合、取扱商材の詳細情報が必要になります。<br><a style="color: rgb(212, 31, 28);">※ use_of_fincode.used_on_web または site_publishedが</a> `false` <a style="color: rgb(212, 31, 28);"><br>かつ provides.digital_contentsが</a> `true` <a style="color: rgb(212, 31, 28);">のとき必須</a>'
        additional_info:
          type: object
          nullable: true
          description: |
            追加提出情報\
            \
            審査開始時点でショップのWebサイトが公開されていない場合（`use_of_fincode.used_on_web`が`false`または`site_published`が`false`の場合）、追加で提供する情報です。\
            特定商取引法に基づく表示情報を基に値を設定してください。
          properties:
            shop_sales_manager_name:
              type: string
              nullable: true
              minLength: 1
              maxLength: 300
              example: イプシロン太郎
              description: |
                販売責任者氏名\
                \
                ショップの販売責任者の氏名
            shop_service_name:
              type: string
              nullable: true
              minLength: 1
              maxLength: 300
              example: サンプルショップ
              description: |
                屋号・サービス名\
                \
                ショップのサービスの名称
            shop_how_to_pay:
              type: string
              nullable: true
              minLength: 1
              maxLength: 1000
              example: クレジットカード、コンビニ決済
              description: |
                支払い方法\
                \
                ショップで利用可能な支払い方法
            shop_charge_description:
              type: string
              nullable: true
              minLength: 1
              maxLength: 5000
              example: |
                インターネット接続費用およびその他インターネット利用に必要な費用。モバイルデバイスをご利用の場合にはデータ通信料が発生する場合があります。
              description: |
                商品代金以外の料金の説明\
                \
                送料、手数料、消費税などの商品代金以外の料金についての説明
            shop_product_delivery_time:
              type: string
              nullable: true
              minLength: 1
              maxLength: 1000
              example: |
                サンプルショップのサービス提供開始日はユーザーアカウントで初めて認証手続を行った日となります。
              description: |
                商品の引き渡し時期\
                \
                商品の引き渡し時期についての説明
            shop_return_goods_handing_conditions:
              type: string
              nullable: true
              minLength: 1
              maxLength: 5000
              example: |
                1. サービス開始月中に解約した場合、サービスの月額利用料が全額発生します。
                2. デジタルコンテンツサービスの特性上、購入後の返品・キャンセルはお受付いたしかねます。
              description: |
                返品・交換に関する条件\
                \
                返品・交換に関する条件についての説明
          required:
            - shop_sales_manager_name
            - shop_servoce_name
            - shop_how_to_pay
            - shop_product_delivery_time
            - shop_return_goods_handing_conditions
      required:
        - shop_name
        - shop_name_kana
        - shop_name_en
        - support_mail
        - support_tel
        - deals_long_apply_content
        - deals_insecure_content
        - lost_trial
        - use_of_fincode
        - provides
        - content_description
    BankAccountInfo.V2.Response:
      type: object
      properties:
        bank_name:
          type: string
          minLength: 1
          maxLength: 20
          example: GMOあおぞらネット銀行
          description: |
            金融機関名
        bank_name_kana:
          type: string
          minLength: 1
          maxLength: 20
          example: ジーエムオーアオゾラネットギンコウ
          description: |
            金融機関名カナ
        bank_code:
          type: string
          minLength: 4
          maxLength: 4
          example: '0001'
          description: |
            金融機関コード
        branch_name:
          type: string
          minLength: 1
          maxLength: 20
          example: うみ支店
          description: |
            支店名
        branch_name_kana:
          type: string
          minLength: 1
          maxLength: 20
          example: ウミシテン
          description: |
            支店名カナ
        branch_code:
          type: string
          minLength: 3
          maxLength: 3
          example: '001'
          description: |
            支店コード
        account_kind:
          type: number
          enum:
            - 0
            - 1
          example: 0
          description: |
            口座種別

            - `0`: 普通
            - `1`: 当座
        account_number:
          type: string
          minLength: 1
          maxLength: 7
          example: '1234567'
          description: |
            口座番号
        account_name:
          type: string
          minLength: 1
          maxLength: 47
          example: サンプル株式会社
          description: |
            口座名義
      required:
        - bank_code
        - branch_code
        - account_kind
        - account_number
        - account_name
    DepositCycleMasterId:
      type: integer
      example: 1
      enum:
        - 1
        - 2
      description: |
        入金サイクルマスタID\
        入金サイクルについては[Docs > 精算管理 > クレジットカード決済の入金サイクル](https://docs.fincode.jp/business_management/deposit)を参照できます。

        - `1`: スタンダード（月1回, 月末締め翌月末入金）
        - `2`: スタンダード（月2回, 15日&月末締め15日後入金）
    DepositCycleInfo.V2:
      type: object
      properties:
        deposit_cycle_master_id:
          allOf:
            - $ref: '#/components/schemas/DepositCycleMasterId'
      required:
        - deposit_cycle_master_id
    ExaminationInfo.V2:
      type: object
      properties:
        status_code:
          allOf:
            - $ref: '#/components/schemas/ContractStatus'
        contract_info:
          allOf:
            - $ref: '#/components/schemas/ContractInfo.V2'
          description: |
            契約情報\
            \
            fincodeと契約をする事業者の情報
        shop_info:
          allOf:
            - $ref: '#/components/schemas/ShopInfo.V2'
          description: |
            ショップ情報\
            \
            fincodeにおけるショップの情報
        bank_account_info:
          allOf:
            - $ref: '#/components/schemas/BankAccountInfo.V2.Response'
          description: |
            銀行口座情報\
            \
            fincode上での売上入金を受け取るための銀行口座情報
        deposit_cycle_info:
          allOf:
            - $ref: '#/components/schemas/DepositCycleInfo.V2'
          description: |
            入金サイクル情報\
            \
            fincode上での売上入金の入金サイクルに関する情報
    ExaminationInfo.V2.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/ExaminationInfo.V2'
    BankAccountInfo.V2:
      type: object
      properties:
        bank_code:
          type: string
          minLength: 4
          maxLength: 4
          example: '0001'
          description: |
            金融機関コード
        branch_code:
          type: string
          minLength: 3
          maxLength: 3
          example: '001'
          description: |
            支店コード
        account_kind:
          type: number
          enum:
            - 0
            - 1
          example: 0
          description: |
            口座種別

            - `0`: 普通
            - `1`: 当座
        account_number:
          type: string
          minLength: 1
          maxLength: 7
          example: '1234567'
          description: |
            口座番号
        account_name:
          type: string
          minLength: 1
          maxLength: 47
          example: サンプル株式会社
          description: |
            口座名義
      required:
        - bank_code
        - branch_code
        - account_kind
        - account_number
        - account_name
    ExaminationInfo.V2.Updating.Request:
      type: object
      properties:
        contract_info:
          allOf:
            - $ref: '#/components/schemas/ContractInfo.V2'
          description: |
            契約情報\
            \
            fincodeと契約をする事業者の情報
        shop_info:
          allOf:
            - $ref: '#/components/schemas/ShopInfo.V2'
          description: |
            ショップ情報\
            \
            fincodeにおけるショップの情報
        bank_account_info:
          allOf:
            - $ref: '#/components/schemas/BankAccountInfo.V2'
          description: |
            銀行口座情報\
            \
            fincode上での売上入金を受け取るための銀行口座情報
        deposit_cycle_info:
          allOf:
            - $ref: '#/components/schemas/DepositCycleInfo.V2'
          description: |
            入金サイクル情報\
            \
            fincode上での売上入金の入金サイクルに関する情報
        merchant_category_code:
          type: string
          minLength: 4
          maxLength: 4
          example: null
          nullable: true
          description: |
            業種コード\
            \
            fincodeから指定するよう要求されている場合にのみ指定します。
    ExaminationInfo.V2.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/ExaminationInfo.V2'
    enable_immediate_use:
      type: boolean
      example: true
      description: |
        VISA/Mastercard即時利用をリクエストするかどうか

        - `true`： 即時利用をリクエストする
        - `false`： 即時利用をリクエストしない

        即時利用は以下の場合リクエストできません。

        - `本番環境申請情報.contract_info.site_published`が`true`でない（審査時点でWebサイトが用意されていない）
        - `本番環境申請情報.shop_info.deals_long_apply_content`が`true`である（審査に時間がかかる商材を取り扱うと表明している）
    POST.ContractsExaminations.Request:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        enable_immediate_use:
          allOf:
            - $ref: '#/components/schemas/enable_immediate_use'
        force_credit_check_skip:
          type: boolean
          description: |
            信用情報チェックを強制的にスキップする。

            - `true`: 審査管理画面から強制OKをする場合のみ
            - `false`: 本番環境申請時
        use_gmo_sign:
          type: boolean
          default: false
          description: |
            GMOサインの利用
      required:
        - shop_id
        - enable_immediate_use
        - force_credit_check_skip
        - use_gmo_sign
    POST.ContractsExaminations:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
          description: |
            ショップID（テナント）\
            \
            審査申請を行うテナントのショップID
        status_code:
          type: number
          enum:
            - 1
            - 2
            - 3
          example: 1
          description: |
            申請ステータス

            - `1`: OK<br /><span class="smallText">申請が完了しました。審査を行います。<br />`enable_immediate_use = true`の場合は即時利用が認められ、VISA/Mastercardブランドの決済受付が可能な状態です。</span>
            - `2`: NG<br /><span class="smallText">fincodeの利用が認められませんでした。</span>
            - `3`: 保留<br /><span class="smallText">即時利用が認められませんでした。申請は完了しており、審査は継続して行われます。</span>
      x-req-properties:
        enable_immediate_use:
          type: boolean
          example: true
          description: |
            VISA/Mastercard即時利用をリクエストするかどうか

            - `true`： 即時利用をリクエストする
            - `false`： 即時利用をリクエストしない

            即時利用は以下の場合リクエストできません。

            - `本番環境申請情報.contract_info.site_published`が`true`でない（審査時点でWebサイトが用意されていない）
            - `本番環境申請情報.shop_info.deals_long_apply_content`が`true`である（審査に時間がかかる商材を取り扱うと表明している）
    POST.ContractsExaminations.Response:
      allOf:
        - $ref: '#/components/schemas/POST.ContractsExaminations'
    PaymentProvider:
      type: string
      enum:
        - PAYSLE
        - PAYPAY
        - APPLE_PAY_UC
        - APPLE_PAY_JCB_AMEX
        - GOOGLE_PAY_UC
        - GOOGLE_PAY_TFC
        - GOOGLE_PAY_ORICO
        - GOOGLE_PAY_AFS
        - GOOGLE_PAY_MUN
        - GOOGLE_PAY_JCB_AMEX
        - GOOGLE_PAY_DINERS
        - DIRECT_DEBIT
        - DIRECT_DEBIT_MIZUHO
        - VIRTUAL_ACCOUNT
        - VIRTUAL_ACCOUNT_BULK
        - CARD_UPDATER
      description: |
        - `PAYSLE`: コンビニ決済
        - `PAYPAY`: PayPay
        - `APPLE_PAY_UC`: Apple Pay（VISA/Mastercard- UCカード）
        - `APPLE_PAY_JCB_AMEX`: Apple Pay（JCB/American Express）
        - `GOOGLE_PAY_UC`: Google Pay（VISA/Mastercard - UCカード）
        - `GOOGLE_PAY_TFC`: Google Pay（VISA/Mastercard - トヨタファイナンス）
        - `GOOGLE_PAY_ORICO`: Google Pay（VISA/Mastercard - オリエントコーポレーション）
        - `GOOGLE_PAY_AFS`: Google Pay（VISA/Mastercard - イオンフィナンシャルサービス）
        - `GOOGLE_PAY_MUN`: Google Pay（VISA/Mastercard - 三菱UFJニコス）
        - `GOOGLE_PAY_JCB_AMEX`: Google Pay（JCB/American Express）
        - `GOOGLE_PAY_DINERS`: Google Pay（Diners Club）
        - `DIRECT_DEBIT`: 口座振替（5・6・23・27日）
        - `DIRECT_DEBIT_MIZUHO`: 口座振替（1・5・20・26日）
        - `VIRTUAL_ACCOUNT`: 銀行振込（バーチャル口座）
        - `VIRTUAL_ACCOUNT_BULK`: 一括決済（バーチャル口座）
        - `CARD_UPDATER`: 洗替
    provider:
      type: array
      items:
        allOf:
          - $ref: '#/components/schemas/PaymentProvider'
      example:
        - PAYSLE
        - PAYPAY
        - APPLE_PAY_UC
        - APPLE_PAY_JCB_AMEX
        - GOOGLE_PAY_UC
        - GOOGLE_PAY_TFC
        - GOOGLE_PAY_ORICO
        - GOOGLE_PAY_AFS
        - GOOGLE_PAY_MUN
        - GOOGLE_PAY_JCB_AMEX
        - GOOGLE_PAY_DINERS
        - DIRECT_DEBIT
        - DIRECT_DEBIT_MIZUHO
        - VIRTUAL_ACCOUNT
        - VIRTUAL_ACCOUNT_BULK
        - CARD_UPDATER
      description: |
        追加対象決済手段\
        \
        追加で申請する決済手段をリストで指定します。

        - `PAYSLE`: コンビニ決済
        - `PAYPAY`: PayPay
        - `APPLE_PAY_UC`: Apple Pay（VISA/Mastercard- UCカード）
        - `APPLE_PAY_JCB_AMEX`: Apple Pay（JCB/American Express）
        - `GOOGLE_PAY_UC`: Google Pay（VISA/Mastercard - UCカード）
        - `GOOGLE_PAY_TFC`: Google Pay（VISA/Mastercard - トヨタファイナンス）
        - `GOOGLE_PAY_ORICO`: Google Pay（VISA/Mastercard - オリエントコーポレーション）
        - `GOOGLE_PAY_AFS`: Google Pay（VISA/Mastercard - イオンフィナンシャルサービス）
        - `GOOGLE_PAY_MUN`: Google Pay（VISA/Mastercard - 三菱UFJニコス）
        - `GOOGLE_PAY_JCB_AMEX`: Google Pay（JCB/American Express）
        - `GOOGLE_PAY_DINERS`: Google Pay（Diners Club）
        - `DIRECT_DEBIT`: 口座振替（5・6・23・27日）
        - `DIRECT_DEBIT_MIZUHO`: 口座振替（1・5・20・26日）
        - `VIRTUAL_ACCOUNT`: 銀行振込（バーチャル口座）
        - `VIRTUAL_ACCOUNT_BULK`: 一括決済（バーチャル口座）
        - `CARD_UPDATER`: 洗替
    POST.ProviderReserve.Request:
      type: object
      properties:
        provider:
          allOf:
            - $ref: '#/components/schemas/provider'
      required:
        - provider
    POST.ProviderReserve:
      type: object
      properties:
        reservation_list:
          type: array
          items:
            type: object
            properties:
              reservation_id:
                type: integer
                minLength: 1
                maxLength: 20
                example: 123456
                description: 追加申請ID
              shop_id:
                allOf:
                  - $ref: '#/components/schemas/Shop_properties-id'
              provider:
                allOf:
                  - $ref: '#/components/schemas/PaymentProvider'
          description: |
            決済手段追加 申請リスト\
            \
            申請中の決済手段のリストです。
      x-req-properties:
        provider:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/PaymentProvider'
          example:
            - PAYSLE
            - PAYPAY
            - APPLE_PAY_UC
            - APPLE_PAY_JCB_AMEX
            - GOOGLE_PAY_UC
            - GOOGLE_PAY_TFC
            - GOOGLE_PAY_ORICO
            - GOOGLE_PAY_AFS
            - GOOGLE_PAY_MUN
            - GOOGLE_PAY_JCB_AMEX
            - GOOGLE_PAY_DINERS
            - DIRECT_DEBIT
            - DIRECT_DEBIT_MIZUHO
            - VIRTUAL_ACCOUNT
            - VIRTUAL_ACCOUNT_BULK
            - CARD_UPDATER
          description: |
            追加対象決済手段\
            \
            追加で申請する決済手段をリストで指定します。

            - `PAYSLE`: コンビニ決済
            - `PAYPAY`: PayPay
            - `APPLE_PAY_UC`: Apple Pay（VISA/Mastercard- UCカード）
            - `APPLE_PAY_JCB_AMEX`: Apple Pay（JCB/American Express）
            - `GOOGLE_PAY_UC`: Google Pay（VISA/Mastercard - UCカード）
            - `GOOGLE_PAY_TFC`: Google Pay（VISA/Mastercard - トヨタファイナンス）
            - `GOOGLE_PAY_ORICO`: Google Pay（VISA/Mastercard - オリエントコーポレーション）
            - `GOOGLE_PAY_AFS`: Google Pay（VISA/Mastercard - イオンフィナンシャルサービス）
            - `GOOGLE_PAY_MUN`: Google Pay（VISA/Mastercard - 三菱UFJニコス）
            - `GOOGLE_PAY_JCB_AMEX`: Google Pay（JCB/American Express）
            - `GOOGLE_PAY_DINERS`: Google Pay（Diners Club）
            - `DIRECT_DEBIT`: 口座振替（5・6・23・27日）
            - `DIRECT_DEBIT_MIZUHO`: 口座振替（1・5・20・26日）
            - `VIRTUAL_ACCOUNT`: 銀行振込（バーチャル口座）
            - `VIRTUAL_ACCOUNT_BULK`: 一括決済（バーチャル口座）
            - `CARD_UPDATER`: 洗替
    POST.ProviderReserve.Response:
      allOf:
        - $ref: '#/components/schemas/POST.ProviderReserve'
    ContractExaminationMasterId:
      type: number
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 51
        - 52
        - 56
        - 57
        - 58
        - 59
        - 60
        - 61
        - 101
        - 201
        - 301
        - 302
        - 401
        - 403
        - 701
      example: 1
      description: |
        審査種別マスタID\
        この審査情報がどの決済手段の審査かを示す値です。

        - `1`：  カード決済（VISA / Mastercard, UCカード社）
        - `2`：  カード決済（JCB / American Express / Diners Club / Discover）
        - `3`：  カード決済（VISA / Mastercard, トヨタファイナンス社）
        - `4`：  カード決済（VISA / Mastercard, オリエントコーポレーション）
        - `5`：  カード決済（VISA / Mastercard, イオンフィナンシャルサービス）
        - `6`：  カード決済（VISA / Mastercard, 三菱UFJニコス）
        - `51`： Apple Pay（VISA / Mastercard, UCカード社）
        - `52`： Apple Pay（JCB / American Express）
        - `56`： Google Pay（VISA / Mastercard, UCカード社）
        - `57`： Google Pay（JCB / American Express / Diners Club）
        - `58`： Google Pay（VISA / Mastercard, トヨタファイナンス社）
        - `59`： Google Pay（VISA / Mastercard, オリエントコーポレーション）
        - `60`： Google Pay（VISA / Mastercard, イオンフィナンシャルサービス）
        - `61`： Google Pay（VISA / Mastercard, 三菱UFJニコス）
        - `101`： コンビニ決済
        - `201`： PayPay
        - `301`： 口座振替（5・6・23・27日）
        - `302`： 口座振替（1・5・20・26日）
        - `401`： 銀行振込（バーチャル口座）
        - `403`： 一括決済（バーチャル口座）
        - `701`： 洗替
    ExaminationStatus:
      type: string
      enum:
        - '1'
        - '2'
        - '3'
      description: |
        審査ステータス

        - `1`: 審査中<br /><span class="smallText">まだこの決済手段による決済を受け付けることはできません。</span>
        - `2`: 審査OK<br /><span class="smallText">この決済手段による決済を受け付けることができます。</span>
        - `3`: 審査NG<br /><span class="smallText">この決済手段による決済を受け付けることはできません。</span>
    Examination:
      type: object
      properties:
        examination_master_id:
          allOf:
            - $ref: '#/components/schemas/ContractExaminationMasterId'
        status_code:
          allOf:
            - $ref: '#/components/schemas/ExaminationStatus'
        member_code:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          description: |
            加盟店番号
        tds_available:
          type: boolean
          nullable: true
          description: |
            3Dセキュア認証利用可否

            - `true`: 利用可
            - `false`: 利用不可
        installments_payment_available:
          type: boolean
          nullable: true
          description: |
            分割払い利用可否

            - `true`: 利用可
            - `false`: 利用不可
        mcc_1:
          type: string
          nullable: true
          description: |
            MCC 1
        mcc_2:
          type: string
          nullable: true
          description: |
            MCC 2
        paypay_mid:
          type: string
          nullable: true
          description: |
            PayPay 加盟店番号
        paypay_store_id:
          type: string
          nullable: true
          description: |
            PayPay 店舗ID
        paysle_merchant_code:
          type: string
          nullable: true
          description: |
            PAYSLE 企業コード
        paysle_user_id:
          type: string
          nullable: true
          description: |
            PAYSLE ログイン企業ID
        paysle_user_password:
          type: string
          nullable: true
          description: |
            PAYSLE システム接続パスワード
        cut_over_at:
          type: string
          nullable: true
          description: |
            利用開始日\
            形式：`yyyy/MM/dd`
    corporate_number:
      type: string
      minLength: 13
      maxLength: 13
      nullable: true
      example: '1234567890123'
      description: |
        法人番号
    corporate_name:
      type: string
      minLength: 1
      maxLength: 150
      example: サンプル株式会社
      description: |
        法人名
    corporate_name_kana:
      type: string
      minLength: 1
      maxLength: 150
      example: サンプルカブシキガイシャ
      description: |
        法人名（カナ）
    hp:
      type: string
      minLength: 1
      maxLength: 300
      nullable: true
      example: https://www.sample-corp.example.com
      description: |
        企業サイトURL
    capital:
      type: number
      nullable: true
      minLength: 1
      maxLength: 19
      example: 1000000
      description: |
        資本金
    established_at:
      type: string
      nullable: true
      minLength: 10
      maxLength: 10
      example: 2020/01/01
      description: |
        設立日
    yearly_sales:
      type: number
      nullable: true
      minLength: 1
      maxLength: 19
      example: 1000000
      description: |
        年商
    business_details:
      type: string
      nullable: true
      minLength: 1
      maxLength: 5000
      example: ○○の製造・販売を行っており、fincodeによるオンラインでの販売を予定。
      description: |
        事業内容
    company_postal_code:
      type: string
      nullable: true
      minLength: 8
      maxLength: 8
      example: 123-4567
      description: |
        会社住所 郵便番号\
        形式： 半角数字（ハイフンあり）
    company_prefecture:
      type: string
      nullable: true
      minLength: 3
      maxLength: 4
      example: 東京都
      description: |
        会社住所 都道府県\
        形式： 漢字
    company_prefecture_kana:
      type: string
      nullable: true
      minLength: 1
      maxLength: 6
      example: トウキョウト
      description: |
        会社住所 都道府県（カナ）\
        形式： 全角カタカナ
    company_address_municipality:
      type: string
      nullable: true
      minLength: 1
      maxLength: 50
      example: 渋谷区
      description: |
        会社住所 市区町村\
        形式： 漢字/ひらがな/カタカナ/半角英数
    company_address_municipality_kana:
      type: string
      nullable: true
      minLength: 1
      maxLength: 100
      example: シブヤク
      description: |
        会社住所 市区町村（カナ）\
        形式： 全角カタカナ
    company_address_section:
      type: string
      nullable: true
      minLength: 1
      maxLength: 50
      example: 道玄坂
      description: |
        会社住所 町域\
        形式： 漢字/ひらがな/カタカナ/半角英数
    company_address_section_kana:
      type: string
      nullable: true
      minLength: 1
      maxLength: 100
      example: ドウゲンザカ
      description: |
        会社住所 町域（カナ）\
        形式： 全角カタカナ
    company_address_chrome:
      type: string
      nullable: true
      minLength: 1
      maxLength: 100
      example: 1-2-3
      description: |
        会社住所 番地\
        形式： 漢字/ひらがな/カタカナ/半角英数
    company_address_chrome_kana:
      type: string
      nullable: true
      minLength: 1
      maxLength: 100
      example: イチニサン
      description: |
        会社住所 番地（カナ）\
        形式： 全角カタカナ
    company_address_building_name:
      type: string
      nullable: true
      minLength: 1
      maxLength: 100
      example: サンプルビル
      description: |
        会社住所 ビル名\
        形式： 漢字/ひらがな/カタカナ/半角英数
    company_address_building_name_kana:
      type: string
      nullable: true
      minLength: 1
      maxLength: 100
      example: サンプルビル
      description: |
        会社住所 ビル名（カナ）\
        形式： 全角カタカナ
    company_tel:
      type: string
      nullable: true
      minLength: 1
      maxLength: 15
      example: '0312345678'
      description: |
        会社情報 電話番号\
        形式： 半角数字（ハイフンなし）
    representative_last_name:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: 山田
      description: |
        代表者 姓
        形式： 漢字/ひらがな/カタカナ/半角英字
    representative_last_name_kana:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: ヤマダ
      description: |
        代表者 姓（カナ）\
        形式： 全角カナ
    representative_first_name:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: 太郎
      description: |
        代表者 名\
        形式： 漢字/ひらがな/カタカナ/半角英字
    representative_first_name_kana:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: タロウ
      description: |
        代表者 名（カナ）\
        形式： 全角カナ
    representative_birthday:
      type: string
      pattern: ^\d{4}/\d{2}/\d{2}$
      nullable: true
      example: 1980/01/01
      description: |
        代表者 生年月日\
        \
        形式：`yyyy/MM/dd`
    representative_gender:
      type: integer
      enum:
        - 0
        - 1
      nullable: true
      example: 0
      description: |
        代表者 性別

        - `0`: 男性
        - `1`: 女性
    representative_postal_code:
      type: string
      pattern: ^\d{3}-\d{4}$
      nullable: true
      minLength: 8
      maxLength: 8
      example: 150-0043
      description: |
        代表者 住所 郵便番号\
        形式：`xxx-xxxx`
    representative_prefecture:
      type: string
      minLength: 1
      maxLength: 4
      nullable: true
      example: 東京都
      description: |
        代表者 住所 都道府県\
        形式： 漢字
    representative_prefecture_kana:
      type: string
      minLength: 1
      maxLength: 6
      nullable: true
      example: トウキョウト
      description: |
        代表者 住所 都道府県（カナ）\
        形式： 全角カナ
    representative_address_municipality:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: 渋谷区
      description: |
        代表者 住所 市区町村\
        形式： 漢字/ひらがな/カタカナ/半角英数
    representative_address_municipality_kana:
      type: string
      minLength: 1
      maxLength: 100
      nullable: true
      example: シブヤク
      description: |
        代表者 住所 市区町村（カナ）\
        形式： 全角カナ
    representative_address_section:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: 道玄坂
      description: |
        代表者 住所 町域\
        形式： 漢字/ひらがな/カタカナ/半角英数
    representative_address_section_kana:
      type: string
      minLength: 1
      maxLength: 100
      nullable: true
      example: ドウゲンザカ
      description: |
        代表者 住所 町域（カナ）\
        形式： 全角カナ
    representative_address_chrome:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: 1-14-6
      description: |
        代表者 住所 番地\
        形式： 漢字/ひらがな/カタカナ/半角英数
    representative_address_chrome_kana:
      type: string
      minLength: 1
      maxLength: 100
      nullable: true
      example: 1-14-6
      description: |
        代表者 住所 番地（カナ）
    representative_address_building_name:
      type: string
      minLength: 1
      maxLength: 100
      nullable: true
      example: ヒューマックス渋谷ビル 7F
      description: |
        代表者 住所 建物名\
        形式： 漢字/ひらがな/カタカナ/半角英数
    representative_address_building_name_kana:
      type: string
      minLength: 1
      maxLength: 100
      nullable: true
      example: ヒューマックスシブヤビル ナナカイ
      description: |
        代表者 住所 建物名（カナ）\
        形式： 全角カナ
    representative_tel:
      type: string
      minLength: 1
      maxLength: 15
      pattern: ^\d{1,15}$
      nullable: true
      example: '0364330000'
      description: |
        代表者 電話番号\
        形式： 半角数字（ハイフンなし、PHS番号不可）
    staff1_last_name:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: 鈴木
      description: |
        担当者1 姓\
        形式： 漢字/ひらがな/カタカナ/半角英字\
        \
        fincodeは担当者1,2宛てに審査結果の通知や審査保留対応の連絡などを行います。
    staff1_last_name_kana:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: スズキ
      description: |
        担当者1 姓（カナ）\
        形式： 全角カナ
    staff1_first_name:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: 次郎
      description: |
        担当者1 名\
        形式： 漢字/ひらがな/カタカナ/半角英字
    staff1_first_name_kana:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: ジロウ
      description: |
        担当者1 名（カナ）\
        形式： 全角カナ
    staff1_company_name:
      type: string
      minLength: 1
      maxLength: 150
      nullable: true
      example: サンプル株式会社
      description: |
        担当者1 会社名\
        形式： 漢字/ひらがな/カタカナ/半角英数
    staff1_belongs:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: EC事業部
      description: |
        担当者1 部署名\
        形式： 漢字/ひらがな/カタカナ/半角英数
    staff1_tel:
      type: string
      minLength: 1
      maxLength: 15
      pattern: ^\d{1,15}$
      nullable: true
      example: '09000000000'
      description: |
        担当者1 電話番号\
        形式： 半角数字（ハイフンなし、PHS番号不可）
    staff1_mail:
      type: string
      minLength: 1
      maxLength: 254
      format: email
      nullable: true
      example: staff-1@example.com
      description: |
        担当者1 メールアドレス\
        形式： RFC 5322
    staff2_last_name:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: 佐藤
      description: |
        担当者2 姓\
        形式： 漢字/ひらがな/カタカナ/半角英字
    staff2_last_name_kana:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: サトウ
      description: |
        担当者2 姓（カナ）\
        形式： 全角カナ
    staff2_first_name:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: 三郎
      description: |
        担当者2 名\
        形式： 漢字/ひらがな/カタカナ/半角英字
    staff2_first_name_kana:
      type: string
      minLength: 1
      maxLength: 20
      nullable: true
      example: サブロウ
      description: |
        担当者2 名（カナ）\
        形式： 全角カナ
    staff2_company_name:
      type: string
      minLength: 1
      maxLength: 150
      nullable: true
      example: サンプル株式会社
      description: |
        担当者2 会社名\
        形式： 漢字/ひらがな/カタカナ/半角英数
    staff2_belongs:
      type: string
      minLength: 1
      maxLength: 50
      nullable: true
      example: 営業統括部
      description: |
        担当者2 部署名\
        形式： 漢字/ひらがな/カタカナ/半角英数
    staff2_tel:
      type: string
      minLength: 1
      maxLength: 15
      pattern: ^\d{1,15}$
      nullable: true
      example: '09000000000'
      description: |
        担当者2 電話番号\
        形式： 半角数字（ハイフンなし、PHS番号不可）
    staff2_mail:
      type: string
      minLength: 1
      maxLength: 254
      format: email
      nullable: true
      example: staff-2@example.com
      description: |
        担当者2 メールアドレス\
        形式： RFC 5322
    used_on_app:
      type: boolean
      nullable: true
      example: true
      description: |
        ネイティブアプリ利用有無\
        \
        ネイティブアプリでfincodeを使用するかどうか

        - `true`: ネイティブアプリでfincodeを使用する
    used_on_web:
      type: boolean
      nullable: true
      example: true
      description: |
        Webサイト利用有無\
        \
        Webサイト/Webアプリでfincodeを使用するかどうか

        - `true`: Webサイト/Webアプリでfincodeを使用する
    url:
      type: string
      nullable: true
      minLength: 1
      maxLength: 300
      example: https://example.com
      description: |
        WebサイトURL\
        \
        fincode審査チームがサイトを閲覧するためのURL
    credential:
      type: string
      nullable: true
      minLength: 1
      maxLength: 100
      example: 'ID: example_user,Password: password'
      description: |
        ログイン情報\
        \
        fincode審査チームがサイトを閲覧するためのログイン情報
    properties-shop_name:
      type: string
      minLength: 1
      maxLength: 100
      example: サンプルショップ東京
      description: |
        fincodeにおけるショップ名
    properties-shop_name_kana:
      type: string
      minLength: 1
      maxLength: 100
      example: サンプルショップトウキョウ
      description: |
        fincodeにおけるショップ名（カナ）
    shop_name_en:
      type: string
      minLength: 1
      maxLength: 25
      example: Sample Shop Tokyo
      description: |
        fincodeにおけるショップ名（英語）
    shop_sales_manager_name:
      type: string
      nullable: true
      minLength: 1
      maxLength: 300
      example: イプシロン太郎
      description: |
        販売責任者氏名\
        \
        ショップの販売責任者の氏名
    additional_info-properties-shop_service_name:
      type: string
      nullable: true
      minLength: 1
      maxLength: 300
      example: サンプルショップ
      description: |
        屋号・サービス名\
        \
        ショップのサービスの名称
    shop_how_to_pay:
      type: string
      nullable: true
      minLength: 1
      maxLength: 1000
      example: クレジットカード、コンビニ決済
      description: |
        支払い方法\
        \
        ショップで利用可能な支払い方法
    shop_charge_description:
      type: string
      nullable: true
      minLength: 1
      maxLength: 5000
      example: |
        インターネット接続費用およびその他インターネット利用に必要な費用。モバイルデバイスをご利用の場合にはデータ通信料が発生する場合があります。
      description: |
        商品代金以外の料金の説明\
        \
        送料、手数料、消費税などの商品代金以外の料金についての説明
    shop_product_delivery_time:
      type: string
      nullable: true
      minLength: 1
      maxLength: 1000
      example: |
        サンプルショップのサービス提供開始日はユーザーアカウントで初めて認証手続を行った日となります。
      description: |
        商品の引き渡し時期\
        \
        商品の引き渡し時期についての説明
    shop_return_goods_handing_conditions:
      type: string
      nullable: true
      minLength: 1
      maxLength: 5000
      example: |
        1. サービス開始月中に解約した場合、サービスの月額利用料が全額発生します。
        2. デジタルコンテンツサービスの特性上、購入後の返品・キャンセルはお受付いたしかねます。
      description: |
        返品・交換に関する条件\
        \
        返品・交換に関する条件についての説明
    support_tel:
      type: string
      nullable: true
      minLength: 1
      maxLength: 15
      example: 312345678
      description: |
        購入者向けサポート窓口 電話番号\
        形式： 電話番号（ハイフンなし）
    support_mail:
      type: string
      nullable: true
      minLength: 1
      maxLength: 254
      example: support@example.com
      description: |
        購入者向けサポート窓口 メールアドレス\
        形式： RFC 5322
    product:
      type: boolean
      nullable: true
      example: false
      description: |
        物販商材 提供有無\
        \
        ショップが物品販売を行うかどうか
    service:
      type: boolean
      nullable: true
      example: false
      description: |
        サービス商材 提供有無\
        \
        ショップがサービス提供を行うかどうか
    digital_contents:
      type: boolean
      nullable: true
      example: true
      description: |
        デジタルコンテンツ 提供有無\
        \
        ショップがデジタルコンテンツ販売を行うかどうか
    prepaid_point:
      type: boolean
      nullable: true
      example: true
      description: |
        プリペイドポイントの有無\
        \
        ショップがプリペイドポイントを導入しているかどうか
    unit_price:
      type: number
      nullable: true
      minLength: 1
      maxLength: 23
      example: 1000
      description: |
        1回の決済における金額（単価）\
        \
        例： `1000`（1000円）
    content_description:
      type: string
      nullable: true
      minLength: 1
      maxLength: 5000
      example: |
        本サービスは、ユーザーが自由にWeb記事を投稿・販売できるコンテンツを提供しています。
      description: |
        取扱商材の説明\
        \
        ショップの提供する商材についての説明
    about_expiration:
      type: string
      nullable: true
      minLength: 1
      maxLength: 300
      example: ポイントは1年間有効。
      description: |
        ポイント有効期限について\
        \
        プリペイドポイントの有効期限について
    how_to_use:
      type: string
      nullable: true
      minLength: 1
      maxLength: 300
      example: ポイントは購入時に利用可能で、合計金額からポイントを差し引いて決済を行う。
      description: |
        ポイント利用方法\
        \
        プリペイドポイントの利用方法
    lost_trial:
      type: boolean
      nullable: true
      example: true
      description: |
        改正割賦販売法に基づく訴訟敗訴歴があるかどうかの表明

        - `true`: 改正割賦販売法に基づく訴訟敗訴歴がない
        - `false`: 改正割賦販売法に基づく訴訟敗訴歴がある
    deals_insecure_content:
      type: boolean
      nullable: true
      example: true
      description: |
        fincodeで取扱不可の商材を取り扱わないことの表明

        - `true`: 取扱不可の商材を取り扱う予定はない
        - `false`: 取扱不可の商材を取り扱う予定がある

        fincodeの禁止商材は以下の通りです。

        - 金融行為（クレジットカードショッピング枠の現金化等）
        - 仮想通貨取引、金券（印紙、切手等含む）、商品券、プリペイドカード、有価証券
        - 賭博、ギャンブル
        - RMT（リアルマネートレーディング）
        - ペット等の生き物全般（※標本・剥製も含む）
        - お布施
        - 危険ドラッグ、デザイナーズドラッグ
        - 処方箋なしで購入できる処方薬（ルミガン・ラディース・クラッシュビスタ・ケアプロスト等）
        - 第三者の著作権・肖像権・知的所有権等を侵害する恐れがあるもの
        - 公序良俗に反するもの（アダルト、出会い系サイトを含む）
        - 法律・法令の定めに違反するもの（銃刀法・麻薬取締法・ワシントン条約・薬事法）
    deals_long_apply_content:
      type: boolean
      nullable: true
      example: true
      description: |
        fincode審査に時間がかかるコンテンツを取り扱うかどうかの表明

        - `true`: fincode審査に時間がかかるコンテンツを取り扱う
        - `false`: fincode審査に時間がかかるコンテンツを取り扱わない

        以下の商材を取り扱う場合は`true`を指定する必要があります。

        - 呉服
        - コンサルディングサービス
        - エステ、美容サロン、美容医療
        - スポーツ施設・フィットネスクラブ
        - カルチャースクール・通信講座
        - データ販売
        - 情報詳細（情報の内容自体が商品となるもの）
        - 占い
        - サプリメント・健康食品
        - 美容品・化粧品
        - カツラ
        - 旅行業に該当するサービス
        - タバコ・CBD
        - 寄付金
    ContractDetail:
      type: object
      properties:
        corporate:
          type: boolean
          nullable: true
          example: true
          description: |
            事業形態

            - `true`: 法人
            - `false`: 個人事業主
        corporate_number:
          allOf:
            - $ref: '#/components/schemas/corporate_number'
          nullable: true
        corporate_name:
          allOf:
            - $ref: '#/components/schemas/corporate_name'
          nullable: true
        corporate_name_kana:
          allOf:
            - $ref: '#/components/schemas/corporate_name_kana'
          nullable: true
        hp:
          allOf:
            - $ref: '#/components/schemas/hp'
          nullable: true
        capital:
          allOf:
            - $ref: '#/components/schemas/capital'
          nullable: true
        established_at:
          allOf:
            - $ref: '#/components/schemas/established_at'
          nullable: true
        yearly_sales:
          allOf:
            - $ref: '#/components/schemas/yearly_sales'
          nullable: true
        business_details:
          allOf:
            - $ref: '#/components/schemas/business_details'
          nullable: true
        company_postal_code:
          allOf:
            - $ref: '#/components/schemas/company_postal_code'
          nullable: true
        company_prefecture:
          allOf:
            - $ref: '#/components/schemas/company_prefecture'
          nullable: true
        company_prefecture_kana:
          allOf:
            - $ref: '#/components/schemas/company_prefecture_kana'
          nullable: true
        company_address_municipality:
          allOf:
            - $ref: '#/components/schemas/company_address_municipality'
          nullable: true
        company_address_municipality_kana:
          allOf:
            - $ref: '#/components/schemas/company_address_municipality_kana'
          nullable: true
        company_address_section:
          allOf:
            - $ref: '#/components/schemas/company_address_section'
          nullable: true
        company_address_section_kana:
          allOf:
            - $ref: '#/components/schemas/company_address_section_kana'
          nullable: true
        company_address_chrome:
          allOf:
            - $ref: '#/components/schemas/company_address_chrome'
          nullable: true
        company_address_chrome_kana:
          allOf:
            - $ref: '#/components/schemas/company_address_chrome_kana'
          nullable: true
        company_address_building_name:
          allOf:
            - $ref: '#/components/schemas/company_address_building_name'
          nullable: true
        company_address_building_name_kana:
          allOf:
            - $ref: '#/components/schemas/company_address_building_name_kana'
          nullable: true
        company_tel:
          allOf:
            - $ref: '#/components/schemas/company_tel'
          nullable: true
        representative_last_name:
          allOf:
            - $ref: '#/components/schemas/representative_last_name'
          nullable: true
        representative_last_name_kana:
          allOf:
            - $ref: '#/components/schemas/representative_last_name_kana'
          nullable: true
        representative_first_name:
          allOf:
            - $ref: '#/components/schemas/representative_first_name'
          nullable: true
        representative_first_name_kana:
          allOf:
            - $ref: '#/components/schemas/representative_first_name_kana'
          nullable: true
        representative_birthday:
          allOf:
            - $ref: '#/components/schemas/representative_birthday'
          nullable: true
        representative_gender:
          allOf:
            - $ref: '#/components/schemas/representative_gender'
          nullable: true
        representative_postal_code:
          allOf:
            - $ref: '#/components/schemas/representative_postal_code'
          nullable: true
        representative_prefecture:
          allOf:
            - $ref: '#/components/schemas/representative_prefecture'
          nullable: true
        representative_prefecture_kana:
          allOf:
            - $ref: '#/components/schemas/representative_prefecture_kana'
          nullable: true
        representative_address_municipality:
          allOf:
            - $ref: '#/components/schemas/representative_address_municipality'
          nullable: true
        representative_address_municipality_kana:
          allOf:
            - $ref: '#/components/schemas/representative_address_municipality_kana'
          nullable: true
        representative_address_section:
          allOf:
            - $ref: '#/components/schemas/representative_address_section'
          nullable: true
        representative_address_section_kana:
          allOf:
            - $ref: '#/components/schemas/representative_address_section_kana'
          nullable: true
        representative_address_chrome:
          allOf:
            - $ref: '#/components/schemas/representative_address_chrome'
          nullable: true
        representative_address_chrome_kana:
          allOf:
            - $ref: '#/components/schemas/representative_address_chrome_kana'
          nullable: true
        representative_address_building_name:
          allOf:
            - $ref: '#/components/schemas/representative_address_building_name'
          nullable: true
        representative_address_building_name_kana:
          allOf:
            - $ref: '#/components/schemas/representative_address_building_name_kana'
          nullable: true
        representative_tel:
          allOf:
            - $ref: '#/components/schemas/representative_tel'
          nullable: true
        staff1_last_name:
          allOf:
            - $ref: '#/components/schemas/staff1_last_name'
          nullable: true
        staff1_last_name_kana:
          allOf:
            - $ref: '#/components/schemas/staff1_last_name_kana'
          nullable: true
        staff1_first_name:
          allOf:
            - $ref: '#/components/schemas/staff1_first_name'
          nullable: true
        staff1_first_name_kana:
          allOf:
            - $ref: '#/components/schemas/staff1_first_name_kana'
          nullable: true
        staff1_company_name:
          allOf:
            - $ref: '#/components/schemas/staff1_company_name'
          nullable: true
        staff1_belongs:
          allOf:
            - $ref: '#/components/schemas/staff1_belongs'
          nullable: true
        staff1_tel:
          allOf:
            - $ref: '#/components/schemas/staff1_tel'
          nullable: true
        staff1_mail:
          allOf:
            - $ref: '#/components/schemas/staff1_mail'
          nullable: true
        staff2_last_name:
          allOf:
            - $ref: '#/components/schemas/staff2_last_name'
          nullable: true
        staff2_last_name_kana:
          allOf:
            - $ref: '#/components/schemas/staff2_last_name_kana'
          nullable: true
        staff2_first_name:
          allOf:
            - $ref: '#/components/schemas/staff2_first_name'
          nullable: true
        staff2_first_name_kana:
          allOf:
            - $ref: '#/components/schemas/staff2_first_name_kana'
          nullable: true
        staff2_company_name:
          allOf:
            - $ref: '#/components/schemas/staff2_company_name'
          nullable: true
        staff2_belongs:
          allOf:
            - $ref: '#/components/schemas/staff2_belongs'
          nullable: true
        staff2_tel:
          allOf:
            - $ref: '#/components/schemas/staff2_tel'
          nullable: true
        staff2_mail:
          allOf:
            - $ref: '#/components/schemas/staff2_mail'
          nullable: true
        used_on_app:
          allOf:
            - $ref: '#/components/schemas/used_on_app'
          nullable: true
        used_on_web:
          allOf:
            - $ref: '#/components/schemas/used_on_web'
          nullable: true
        used_on_other:
          type: boolean
          nullable: true
          example: false
          description: |
            その他の箇所での利用有無\
            \
            Webアプリケーションやネイティブアプリ上でない箇所で利用があるかどうか

            - `true`: Webアプリ／ネイティブアプリでない箇所でfincodeを使用する
        site_existing:
          type: number
          enum:
            - 0
            - 1
            - 2
          description: |
            Webサイトの公開状況\
            \
            fincode審査時点で決済機能を提供するWebサイトが閲覧可能かどうかを示します。

            - `0`: fincode審査チームがサイトを閲覧可能
            - `1`: fincode審査チームがサイトを閲覧不可能（ただし準備中）
            - `2`: fincode審査チームがサイトを閲覧不可能
        url:
          allOf:
            - $ref: '#/components/schemas/url'
          nullable: true
        site_credential:
          allOf:
            - $ref: '#/components/schemas/credential'
          nullable: true
        shop_name:
          allOf:
            - $ref: '#/components/schemas/properties-shop_name'
          nullable: true
        shop_name_kana:
          allOf:
            - $ref: '#/components/schemas/properties-shop_name_kana'
          nullable: true
        shop_name_en:
          allOf:
            - $ref: '#/components/schemas/shop_name_en'
          nullable: true
        shop_distributor_name:
          type: string
          minLength: 1
          maxLength: 300
          nullable: true
          description: |
            販売者業者名
        shop_sales_manager_name:
          allOf:
            - $ref: '#/components/schemas/shop_sales_manager_name'
          nullable: true
        shop_service_name:
          allOf:
            - $ref: '#/components/schemas/additional_info-properties-shop_service_name'
          nullable: true
        shop_support_tel:
          type: string
          minLength: 1
          maxLength: 15
          nullable: true
          description: |
            問い合わせ先電話番号\
            \
            購入者が問い合わせる窓口となる電話番号
        shop_support_mail:
          type: string
          minLength: 1
          maxLength: 254
          nullable: true
          description: |
            問い合わせ先メールアドレス\
            \
            購入者が問い合わせる窓口となるメールアドレス
        shop_post_code:
          type: string
          minLength: 1
          maxLength: 8
          nullable: true
          description: |
            ショップ住所 郵便番号
        shop_prefecture:
          type: string
          minLength: 1
          maxLength: 4
          nullable: true
          description: |
            ショップ住所 都道府県
        shop_address_municipality:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            ショップ住所 市区町村
        shop_address_section:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            ショップ住所 町域
        shop_address_chrome:
          type: string
          minLength: 1
          maxLength: 50
          nullable: true
          description: |
            ショップ住所 番地
        shop_address_building_name:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          description: |
            ショップ住所 建物名等
        shop_address_building_name_kana:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          description: |
            ショップ住所 建物名等（カナ）
        shop_payment_method:
          allOf:
            - $ref: '#/components/schemas/shop_how_to_pay'
          nullable: true
        shop_charge_description:
          allOf:
            - $ref: '#/components/schemas/shop_charge_description'
          nullable: true
        shop_product_delievery_time:
          allOf:
            - $ref: '#/components/schemas/shop_product_delivery_time'
          nullable: true
        shop_return_goods_handing_conditions:
          allOf:
            - $ref: '#/components/schemas/shop_return_goods_handing_conditions'
          nullable: true
        platform_name:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          description: |
            プラットフォーム名
        support_tel:
          allOf:
            - $ref: '#/components/schemas/support_tel'
          nullable: true
        support_mail:
          allOf:
            - $ref: '#/components/schemas/support_mail'
          nullable: true
        provides_product:
          allOf:
            - $ref: '#/components/schemas/product'
          nullable: true
        provides_service:
          allOf:
            - $ref: '#/components/schemas/service'
          nullable: true
        provides_digital_content:
          allOf:
            - $ref: '#/components/schemas/digital_contents'
          nullable: true
        prepaid:
          allOf:
            - $ref: '#/components/schemas/prepaid_point'
          nullable: true
        unit_price:
          allOf:
            - $ref: '#/components/schemas/unit_price'
          nullable: true
        content_category_master_id:
          type: number
          minLength: 1
          maxLength: 10
          nullable: true
          description: |
            取扱商材カテゴリID
        content_description:
          allOf:
            - $ref: '#/components/schemas/content_description'
          nullable: true
        expiration_date_of_point:
          allOf:
            - $ref: '#/components/schemas/about_expiration'
          nullable: true
        usage_of_point:
          allOf:
            - $ref: '#/components/schemas/how_to_use'
          nullable: true
        lost_trial:
          allOf:
            - $ref: '#/components/schemas/lost_trial'
          nullable: true
        deals_insecure_content:
          allOf:
            - $ref: '#/components/schemas/deals_insecure_content'
          nullable: true
        deals_long_apply_content:
          allOf:
            - $ref: '#/components/schemas/deals_long_apply_content'
          nullable: true
    ShopPaymentMethod:
      type: number
      enum:
        - 0
        - 1
      description: |
        支払い方法\
        \
        キャンセル金額の超過などによりfincodeへの支払が発生した場合の支払い方法

        - `0`: クレジットカード
        - `1`: 銀行口座
    ContractBankAccountInfo:
      type: object
      properties:
        bank_name:
          type: string
          minLength: 1
          maxLength: 20
          description: |
            銀行名
        bank_name_kana:
          type: string
          minLength: 1
          maxLength: 100
          description: |
            銀行名（カナ）
        bank_code:
          type: string
          minLength: 4
          maxLength: 4
          description: |
            金融機関コード
        branch_code:
          type: string
          minLength: 3
          maxLength: 3
          description: |
            支店コード
        branch_name:
          type: string
          minLength: 1
          maxLength: 100
          description: |
            支店名
        branch_name_kana:
          type: string
          minLength: 1
          maxLength: 100
          description: |
            支店名（カナ）
        account_kind:
          type: number
          enum:
            - 0
            - 1
          description: |
            口座種別

            - `0`: 普通
            - `1`: 当座
        account_number:
          type: string
          minLength: 7
          maxLength: 7
          description: |
            口座番号
        account_name:
          type: string
          minLength: 1
          maxLength: 47
          description: |
            口座名義（カタカナ）
    CardDestination:
      type: object
      properties:
        contract_card_info_master_id:
          type: integer
          nullable: true
          minLength: 1
          maxLength: 10
          example: 123456789
          description: |
            カードマスタID
        examination_master_id:
          type: number
          nullable: true
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
          example: 1
          description: |
            審査種別マスタID  
            - `1`：  カード決済（VISA / Mastercard, UCカード社）
            - `2`：  カード決済（JCB / American Express / Diners Club / Discover）
            - `3`：  カード決済（VISA / Mastercard, トヨタファイナンス社）
            - `4`：  カード決済（VISA / Mastercard, オリエントコーポレーション）
            - `5`：  カード決済（VISA / Mastercard, イオンフィナンシャルサービス）
            - `6`：  カード決済（VISA / Mastercard, 三菱UFJニコス）
        destination:
          type: string
          nullable: true
          minLength: 1
          maxLength: 13
          description: |
            仕向け先
        destination_type:
          type: number
          nullable: true
          minLength: 1
          maxLength: 3
          description: |
            仕向け先種別
    CardPaymentSetting:
      type: object
      properties:
        vm_tds_available:
          type: boolean
          nullable: true
          example: true
          description: |
            （VISA／Mastercard）3Dセキュア認証が有効かどうか

            - `true`: 3Dセキュア認証が有効
            - `false`: 3Dセキュア認証が無効
        vm_tds_required:
          type: boolean
          nullable: true
          example: true
          description: |
            （VISA／Mastercard）3Dセキュア認証の利用が必須かどうか

            - `true`: 3Dセキュア認証の使用が必須
            - `false`: 3Dセキュア認証の使用が任意
        ja_tds_available:
          type: boolean
          nullable: true
          example: true
          description: |
            （JCB／AMEX）3Dセキュア認証が有効かどうか

            - `true`: 3Dセキュア認証が有効
            - `false`: 3Dセキュア認証が無効
        ja_tds_required:
          type: boolean
          nullable: true
          example: true
          description: |
            （JCB／AMEX）3Dセキュア認証の利用が必須かどうか

            - `true`: 3Dセキュア認証の使用が必須
            - `false`: 3Dセキュア認証の使用が任意
        install_payment_available:
          type: boolean
          nullable: true
          example: true
          description: |
            分割払い／リボ払いが利用可能かどうか

            - `true`: 利用可能
            - `false`: 利用不可
    RegistryCorporateInfo:
      type: object
      properties:
        company_name:
          type: string
          nullable: true
          description: |
            法人名
        company_name_kana:
          type: string
          nullable: true
          description: |
            法人名（カナ）
        company_kind:
          type: string
          nullable: true
          description: |
            法人種別（国税庁既定のコード定義に準拠）
        company_postal_code:
          type: string
          nullable: true
          description: |
            会社情報 郵便番号
        company_prefecture_code:
          type: string
          nullable: true
          description: |
            会社情報 都道府県コード
        company_city_code:
          type: string
          nullable: true
          description: |
            会社情報 市区町村コード
        company_prefecture:
          type: string
          nullable: true
          description: |
            会社情報 都道府県
        company_prefecture_kana:
          type: string
          nullable: true
          description: |
            会社情報 都道府県（カナ）
        company_city:
          type: string
          nullable: true
          description: |
            会社情報 市区町村
        company_city_kana:
          type: string
          nullable: true
          description: |
            会社情報 市区町村（カナ）
        company_street:
          type: string
          nullable: true
          description: |
            会社情報 町域・丁目・番地
        company_street_kana:
          type: string
          nullable: true
          description: |
            会社情報 町域・丁目・番地（カナ）
    Contract:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
          description: |
            ショップID（テナント）
        platform_id:
          allOf:
            - $ref: '#/components/schemas/platform_id'
        shop_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ShopType'
        status_code:
          allOf:
            - $ref: '#/components/schemas/ContractStatus'
        examination:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Examination'
          description: |
            審査情報\
            \
            決済事業者ごとの審査状況を配列に格納しています。\
            ある決済手段について審査が開始されていない場合、その決済手段に対応する`examination_master_id`をもつオブジェクトは配列中に存在しません。
        available_status_code:
          type: integer
          enum:
            - 201
            - 202
          example: 201
          description: |
            利用可能モード

            - 201: テスト環境のみ利用可能
            - 202: 本番環境利用可能
        create_date:
          type: string
          example: 2021/01/01
          description: |
            ショップを作成したユーザーの登録日

            形式：`yyyy/MM/dd`
        contracted_at:
          type: string
          nullable: true
          example: 2021/01/01
          description: |
            本番環境申請日

            形式：`yyyy/MM/dd`
        start_charging_at:
          type: string
          nullable: true
          example: 2021/01/01
          description: |
            初回登録完了日

            形式：`yyyy/MM/dd`
        expired_at:
          type: string
          nullable: true
          example: 2021/12/01
          description: |
            解約日

            形式：`yyyy/MM/dd`
        sales_deposit_status_code:
          type: integer
          enum:
            - 501
            - 502
          nullable: true
          description: |
            本人確認手続き ステータス

            入金開始に必要な本人確認手続きのステータスを表します。
            - `501`: 入金に必要な手続きが未完了
            - `502`: 入金可能
        sales_deposit_status_updated_date:
          type: string
          nullable: true
          example: 2021/01/21
          description: |
            売上入金 可否ステータス 更新日

            形式：`yyyy/MM/dd`
        denied_at:
          type: string
          nullable: true
          example: null
          description: |
            契約不成立日

            形式：`yyyy/MM/dd`
        suspended_billing:
          type: boolean
          nullable: true
          example: false
          description: |
            請求停止フラグ
        suspended_billing_date:
          type: string
          nullable: true
          example: null
          description: |
            請求停止フラグ 更新日

            形式：`yyyy/MM/dd`
        suspended_payment:
          type: boolean
          nullable: true
          example: false
          description: |
            入金停止フラグ
        suspended_payment_date:
          type: string
          nullable: true
          example: null
          description: |
            入金停止フラグ 更新日

            形式：`yyyy/MM/dd`
        suspended_service:
          type: boolean
          nullable: true
          example: false
          description: |
            サービス停止フラグ
        suspended_service_date:
          type: string
          nullable: true
          example: null
          description: |
            サービス停止フラグ 更新日

            形式：`yyyy/MM/dd`
        suspeded_immediate_use:
          type: boolean
          nullable: true
          example: false
          description: |
            即時利用停止フラグ
        suspended_immediate_use_date:
          type: string
          nullable: true
          example: null
          description: |
            即時利用停止フラグ 更新日

            形式：`yyyy/MM/dd`
        stop_cancelaltion_memo:
          type: string
          nullable: true
          minLength: 1
          maxLength: 5000
          example: null
          description: |
            停止・解約 備考
        obligations_notice:
          type: string
          nullable: true
          minLength: 1
          maxLength: 5000
          example: null
          description: |
            特記事項（債権債務）
        user_shop_name:
          type: string
          nullable: true
          minLength: 1
          maxLength: 50
          example: null
          description: |
            ショップ名（ユーザー用）
        register_mail:
          type: string
          nullable: true
          minLength: 1
          maxLength: 384
          example: null
          description: |
            登録メールアドレス
        platform_reprentative_shop:
          type: boolean
          nullable: true
          example: false
          description: |
            プラットフォームの代表ショップか

            - true: 代表ショップ
            - false: 代表ショップではない
        shared_customer_flag:
          allOf:
            - $ref: '#/components/schemas/shared_customer_flag'
        contract_detail:
          allOf:
            - $ref: '#/components/schemas/ContractDetail'
            - type: object
              properties:
                pay_by:
                  allOf:
                    - $ref: '#/components/schemas/ShopPaymentMethod'
          description: |
            契約情報
        contract_bank_account:
          allOf:
            - $ref: '#/components/schemas/ContractBankAccountInfo'
          description: |
            入金先口座
        contract_virtual_bank:
          allOf:
            - $ref: '#/components/schemas/ContractBankAccountInfo'
          description: |
            バーチャル口座情報\
            \
            このショップに関してfincodeへの支払いが売上入金額を上回った場合、この口座に所定の期日までに入金を行う必要があります。
        contract_card_destination:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/CardDestination'
          description: |
            カード決済 仕向け先のリスト
        credit_card_setting:
          allOf:
            - $ref: '#/components/schemas/CardPaymentSetting'
          description: |
            カード決済 設定\
            \
            3Dセキュアが有効かどうか・審査の結果、3Dセキュアの利用が必須となったかどうか・分割払い／リボ払い利用ができるかどうかなどの情報が含まれます。
        official_registered_corporate_info:
          allOf:
            - $ref: '#/components/schemas/RegistryCorporateInfo'
          description: |
            登記簿上の法人情報
    Contracts.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/Contract'
    corporate:
      type: boolean
      nullable: true
      example: true
      description: |
        事業形態

        - `true`: 法人
        - `false`: 個人事業主
    properties-corporate_number:
      allOf:
        - $ref: '#/components/schemas/corporate_number'
      nullable: true
    properties-corporate_name:
      allOf:
        - $ref: '#/components/schemas/corporate_name'
      nullable: true
    properties-corporate_name_kana:
      allOf:
        - $ref: '#/components/schemas/corporate_name_kana'
      nullable: true
    properties-hp:
      allOf:
        - $ref: '#/components/schemas/hp'
      nullable: true
    properties-capital:
      allOf:
        - $ref: '#/components/schemas/capital'
      nullable: true
    properties-established_at:
      allOf:
        - $ref: '#/components/schemas/established_at'
      nullable: true
    properties-yearly_sales:
      allOf:
        - $ref: '#/components/schemas/yearly_sales'
      nullable: true
    properties-business_details:
      allOf:
        - $ref: '#/components/schemas/business_details'
      nullable: true
    properties-company_postal_code:
      allOf:
        - $ref: '#/components/schemas/company_postal_code'
      nullable: true
    properties-company_prefecture:
      allOf:
        - $ref: '#/components/schemas/company_prefecture'
      nullable: true
    properties-company_prefecture_kana:
      allOf:
        - $ref: '#/components/schemas/company_prefecture_kana'
      nullable: true
    properties-company_address_municipality:
      allOf:
        - $ref: '#/components/schemas/company_address_municipality'
      nullable: true
    properties-company_address_municipality_kana:
      allOf:
        - $ref: '#/components/schemas/company_address_municipality_kana'
      nullable: true
    properties-company_address_section:
      allOf:
        - $ref: '#/components/schemas/company_address_section'
      nullable: true
    properties-company_address_section_kana:
      allOf:
        - $ref: '#/components/schemas/company_address_section_kana'
      nullable: true
    properties-company_address_chrome:
      allOf:
        - $ref: '#/components/schemas/company_address_chrome'
      nullable: true
    properties-company_address_chrome_kana:
      allOf:
        - $ref: '#/components/schemas/company_address_chrome_kana'
      nullable: true
    properties-company_address_building_name:
      allOf:
        - $ref: '#/components/schemas/company_address_building_name'
      nullable: true
    properties-company_address_building_name_kana:
      allOf:
        - $ref: '#/components/schemas/company_address_building_name_kana'
      nullable: true
    properties-company_tel:
      allOf:
        - $ref: '#/components/schemas/company_tel'
      nullable: true
    properties-representative_last_name:
      allOf:
        - $ref: '#/components/schemas/representative_last_name'
      nullable: true
    properties-representative_first_name:
      allOf:
        - $ref: '#/components/schemas/representative_first_name'
      nullable: true
    properties-representative_last_name_kana:
      allOf:
        - $ref: '#/components/schemas/representative_last_name_kana'
      nullable: true
    properties-representative_first_name_kana:
      allOf:
        - $ref: '#/components/schemas/representative_first_name_kana'
      nullable: true
    properties-representative_birthday:
      allOf:
        - $ref: '#/components/schemas/representative_birthday'
      nullable: true
    properties-representative_gender:
      allOf:
        - $ref: '#/components/schemas/representative_gender'
      nullable: true
    properties-representative_postal_code:
      allOf:
        - $ref: '#/components/schemas/representative_postal_code'
      nullable: true
    properties-representative_prefecture:
      allOf:
        - $ref: '#/components/schemas/representative_prefecture'
      nullable: true
    properties-representative_prefecture_kana:
      allOf:
        - $ref: '#/components/schemas/representative_prefecture_kana'
      nullable: true
    properties-representative_address_municipality:
      allOf:
        - $ref: '#/components/schemas/representative_address_municipality'
      nullable: true
    properties-representative_address_municipality_kana:
      allOf:
        - $ref: '#/components/schemas/representative_address_municipality_kana'
      nullable: true
    properties-representative_address_section:
      allOf:
        - $ref: '#/components/schemas/representative_address_section'
      nullable: true
    properties-representative_address_section_kana:
      allOf:
        - $ref: '#/components/schemas/representative_address_section_kana'
      nullable: true
    properties-representative_address_chrome:
      allOf:
        - $ref: '#/components/schemas/representative_address_chrome'
      nullable: true
    properties-representative_address_chrome_kana:
      allOf:
        - $ref: '#/components/schemas/representative_address_chrome_kana'
      nullable: true
    properties-representative_address_building_name:
      allOf:
        - $ref: '#/components/schemas/representative_address_building_name'
      nullable: true
    properties-representative_address_building_name_kana:
      allOf:
        - $ref: '#/components/schemas/representative_address_building_name_kana'
      nullable: true
    properties-representative_tel:
      allOf:
        - $ref: '#/components/schemas/representative_tel'
      nullable: true
    properties-staff1_last_name:
      allOf:
        - $ref: '#/components/schemas/staff1_last_name'
      nullable: true
    properties-staff1_first_name:
      allOf:
        - $ref: '#/components/schemas/staff1_first_name'
      nullable: true
    properties-staff1_last_name_kana:
      allOf:
        - $ref: '#/components/schemas/staff1_last_name_kana'
      nullable: true
    properties-staff1_first_name_kana:
      allOf:
        - $ref: '#/components/schemas/staff1_first_name_kana'
      nullable: true
    properties-staff1_company_name:
      allOf:
        - $ref: '#/components/schemas/staff1_company_name'
      nullable: true
    properties-staff1_belongs:
      allOf:
        - $ref: '#/components/schemas/staff1_belongs'
      nullable: true
    properties-staff1_tel:
      allOf:
        - $ref: '#/components/schemas/staff1_tel'
      nullable: true
    properties-staff1_mail:
      allOf:
        - $ref: '#/components/schemas/staff1_mail'
      nullable: true
    properties-staff2_last_name:
      allOf:
        - $ref: '#/components/schemas/staff2_last_name'
      nullable: true
    properties-staff2_first_name:
      allOf:
        - $ref: '#/components/schemas/staff2_first_name'
      nullable: true
    properties-staff2_last_name_kana:
      allOf:
        - $ref: '#/components/schemas/staff2_last_name_kana'
      nullable: true
    properties-staff2_first_name_kana:
      allOf:
        - $ref: '#/components/schemas/staff2_first_name_kana'
      nullable: true
    properties-staff2_company_name:
      allOf:
        - $ref: '#/components/schemas/staff2_company_name'
      nullable: true
    properties-staff2_belongs:
      allOf:
        - $ref: '#/components/schemas/staff2_belongs'
      nullable: true
    properties-staff2_tel:
      allOf:
        - $ref: '#/components/schemas/staff2_tel'
      nullable: true
    properties-staff2_mail:
      allOf:
        - $ref: '#/components/schemas/staff2_mail'
      nullable: true
    properties-used_on_web:
      allOf:
        - $ref: '#/components/schemas/used_on_web'
      nullable: true
    properties-used_on_app:
      allOf:
        - $ref: '#/components/schemas/used_on_app'
      nullable: true
    used_on_other:
      type: boolean
      nullable: true
      example: false
      description: |
        その他の箇所での利用有無\
        \
        Webアプリケーションやネイティブアプリ上でない箇所で利用があるかどうか

        - `true`: Webアプリ／ネイティブアプリでない箇所でfincodeを使用する
    properties-url:
      allOf:
        - $ref: '#/components/schemas/url'
      nullable: true
    site_credential:
      allOf:
        - $ref: '#/components/schemas/credential'
      nullable: true
    ContractDetail_properties-shop_name:
      allOf:
        - $ref: '#/components/schemas/properties-shop_name'
      nullable: true
    ContractDetail_properties-shop_name_kana:
      allOf:
        - $ref: '#/components/schemas/properties-shop_name_kana'
      nullable: true
    properties-shop_name_en:
      allOf:
        - $ref: '#/components/schemas/shop_name_en'
      nullable: true
    properties-support_tel:
      allOf:
        - $ref: '#/components/schemas/support_tel'
      nullable: true
    properties-support_mail:
      allOf:
        - $ref: '#/components/schemas/support_mail'
      nullable: true
    provides_product:
      allOf:
        - $ref: '#/components/schemas/product'
      nullable: true
    provides_service:
      allOf:
        - $ref: '#/components/schemas/service'
      nullable: true
    prepaid:
      allOf:
        - $ref: '#/components/schemas/prepaid_point'
      nullable: true
    properties-unit_price:
      allOf:
        - $ref: '#/components/schemas/unit_price'
      nullable: true
    properties-content_description:
      allOf:
        - $ref: '#/components/schemas/content_description'
      nullable: true
    ChangeRequest.Registering.Request:
      type: object
      required:
        - shop_id
        - need_change_examination
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        need_change_examination:
          type: boolean
          description: |
            変更申請（審査）を行うか
        corporate:
          $ref: '#/components/schemas/corporate'
        corporate_number:
          $ref: '#/components/schemas/properties-corporate_number'
        corporate_name:
          $ref: '#/components/schemas/properties-corporate_name'
        corporate_name_kana:
          $ref: '#/components/schemas/properties-corporate_name_kana'
        hp:
          $ref: '#/components/schemas/properties-hp'
        capital:
          $ref: '#/components/schemas/properties-capital'
        established_at:
          $ref: '#/components/schemas/properties-established_at'
        yearly_sales:
          $ref: '#/components/schemas/properties-yearly_sales'
        business_details:
          $ref: '#/components/schemas/properties-business_details'
        company_postal_code:
          $ref: '#/components/schemas/properties-company_postal_code'
        company_prefecture:
          $ref: '#/components/schemas/properties-company_prefecture'
        company_prefecture_kana:
          $ref: '#/components/schemas/properties-company_prefecture_kana'
        company_address_municipality:
          $ref: '#/components/schemas/properties-company_address_municipality'
        company_address_municipality_kana:
          $ref: '#/components/schemas/properties-company_address_municipality_kana'
        company_address_section:
          $ref: '#/components/schemas/properties-company_address_section'
        company_address_section_kana:
          $ref: '#/components/schemas/properties-company_address_section_kana'
        company_address_chrome:
          $ref: '#/components/schemas/properties-company_address_chrome'
        company_address_chrome_kana:
          $ref: '#/components/schemas/properties-company_address_chrome_kana'
        company_address_building_name:
          $ref: '#/components/schemas/properties-company_address_building_name'
        company_address_building_name_kana:
          $ref: '#/components/schemas/properties-company_address_building_name_kana'
        company_tel:
          $ref: '#/components/schemas/properties-company_tel'
        representative_last_name:
          $ref: '#/components/schemas/properties-representative_last_name'
        representative_first_name:
          $ref: '#/components/schemas/properties-representative_first_name'
        representative_last_name_kana:
          $ref: '#/components/schemas/properties-representative_last_name_kana'
        representative_first_name_kana:
          $ref: '#/components/schemas/properties-representative_first_name_kana'
        representative_birthday:
          $ref: '#/components/schemas/properties-representative_birthday'
        representative_gender:
          $ref: '#/components/schemas/properties-representative_gender'
        representative_postal_code:
          $ref: '#/components/schemas/properties-representative_postal_code'
        representative_prefecture:
          $ref: '#/components/schemas/properties-representative_prefecture'
        representative_prefecture_kana:
          $ref: '#/components/schemas/properties-representative_prefecture_kana'
        representative_address_municipality:
          $ref: '#/components/schemas/properties-representative_address_municipality'
        representative_address_municipality_kana:
          $ref: '#/components/schemas/properties-representative_address_municipality_kana'
        representative_address_section:
          $ref: '#/components/schemas/properties-representative_address_section'
        representative_address_section_kana:
          $ref: '#/components/schemas/properties-representative_address_section_kana'
        representative_address_chrome:
          $ref: '#/components/schemas/properties-representative_address_chrome'
        representative_address_chrome_kana:
          $ref: '#/components/schemas/properties-representative_address_chrome_kana'
        representative_address_building_name:
          $ref: '#/components/schemas/properties-representative_address_building_name'
        representative_address_building_name_kana:
          $ref: '#/components/schemas/properties-representative_address_building_name_kana'
        representative_tel:
          $ref: '#/components/schemas/properties-representative_tel'
        staff1_last_name:
          $ref: '#/components/schemas/properties-staff1_last_name'
        staff1_first_name:
          $ref: '#/components/schemas/properties-staff1_first_name'
        staff1_last_name_kana:
          $ref: '#/components/schemas/properties-staff1_last_name_kana'
        staff1_first_name_kana:
          $ref: '#/components/schemas/properties-staff1_first_name_kana'
        staff1_company_name:
          $ref: '#/components/schemas/properties-staff1_company_name'
        staff1_belongs:
          $ref: '#/components/schemas/properties-staff1_belongs'
        staff1_tel:
          $ref: '#/components/schemas/properties-staff1_tel'
        staff1_mail:
          $ref: '#/components/schemas/properties-staff1_mail'
        staff2_last_name:
          $ref: '#/components/schemas/properties-staff2_last_name'
        staff2_first_name:
          $ref: '#/components/schemas/properties-staff2_first_name'
        staff2_last_name_kana:
          $ref: '#/components/schemas/properties-staff2_last_name_kana'
        staff2_first_name_kana:
          $ref: '#/components/schemas/properties-staff2_first_name_kana'
        staff2_company_name:
          $ref: '#/components/schemas/properties-staff2_company_name'
        staff2_belongs:
          $ref: '#/components/schemas/properties-staff2_belongs'
        staff2_tel:
          $ref: '#/components/schemas/properties-staff2_tel'
        staff2_mail:
          $ref: '#/components/schemas/properties-staff2_mail'
        used_on_web:
          $ref: '#/components/schemas/properties-used_on_web'
        used_on_app:
          $ref: '#/components/schemas/properties-used_on_app'
        used_on_other:
          $ref: '#/components/schemas/used_on_other'
        url:
          $ref: '#/components/schemas/properties-url'
        site_credential:
          $ref: '#/components/schemas/site_credential'
        shop_name:
          $ref: '#/components/schemas/ContractDetail_properties-shop_name'
        shop_name_kana:
          $ref: '#/components/schemas/ContractDetail_properties-shop_name_kana'
        shop_name_en:
          $ref: '#/components/schemas/properties-shop_name_en'
        support_tel:
          $ref: '#/components/schemas/properties-support_tel'
        support_mail:
          $ref: '#/components/schemas/properties-support_mail'
        provides_product:
          $ref: '#/components/schemas/provides_product'
        provides_service:
          $ref: '#/components/schemas/provides_service'
        provides_digital_contents:
          type: boolean
          nullable: true
          description: |
            デジタルコンテンツを取り扱うか
        prepaid:
          $ref: '#/components/schemas/prepaid'
        unit_price:
          $ref: '#/components/schemas/properties-unit_price'
        content_description:
          $ref: '#/components/schemas/properties-content_description'
        bank_name:
          type: string
          nullable: true
          description: |
            銀行名
        bank_name_kana:
          type: string
          nullable: true
          description: |
            銀行名（カナ）
        bank_code:
          type: string
          nullable: true
          description: |
            銀行コード
        branch_name:
          type: string
          nullable: true
          description: |
            支店名
        branch_name_kana:
          type: string
          nullable: true
          description: |
            支店名（カナ）
        branch_code:
          type: string
          nullable: true
          description: |
            支店コード
        account_kind:
          type: integer
          nullable: true
          description: |
            預金種別
        account_number:
          type: string
          nullable: true
          description: |
            口座番号
        account_name:
          type: string
          nullable: true
          description: |
            口座名義
        business_operator_bank_name:
          type: string
          nullable: true
          description: |
            事業者 銀行名
        business_operator_bank_name_kana:
          type: string
          nullable: true
          description: |
            事業者 銀行名（カナ）
        business_operator_bank_code:
          type: string
          nullable: true
          description: |
            事業者 銀行コード
        business_operator_branch_name:
          type: string
          nullable: true
          description: |
            事業者 支店名
        business_operator_branch_name_kana:
          type: string
          nullable: true
          description: |
            事業者 支店名（カナ）
        business_operator_branch_code:
          type: string
          nullable: true
          description: |
            事業者 支店コード
        business_operator_account_kind:
          type: integer
          nullable: true
          description: |
            事業者 預金種別
        business_operator_account_number:
          type: string
          nullable: true
          description: |
            事業者 口座番号
        business_operator_account_name:
          type: string
          nullable: true
          description: |
            事業者 口座名義
        memo:
          type: string
          nullable: true
          description: |
            メモ
    ChangeRequest.Registering.Response:
      allOf:
        - $ref: '#/components/schemas/ChangeRequest.Registering.Request'
        - type: object
          properties:
            id:
              type: string
              description: |
                変更申請ID
            status_code:
              type: integer
              nullable: true
              description: |
                申請ステータス
    ChangeRequest.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/ChangeRequest.Registering.Request'
        - type: object
          properties:
            id:
              type: string
              description: |
                変更申請ID
            status_code:
              type: integer
              nullable: true
              description: |
                申請ステータス
    ContentInfo:
      allOf:
        - $ref: '#/components/schemas/ContentInfo.V2'
        - type: object
          properties:
            id:
              type: string
              minLength: 1
              maxLength: 19
              nullable: true
              description: |
                商品情報ID
            type:
              type: number
              enum:
                - 0
                - 1
                - 2
              description: |
                取扱商材 品目種別

                - `0`: 物品販売
                - `1`: サービス
                - `2`: デジタルコンテンツ
    ContractInputStatus:
      type: number
      enum:
        - 301
        - 302
        - 303
        - 304
      description: |
        本番環境申請情報入力ステータス

        - `301`: 全項目未入力
        - `302`: 一部入力済み
        - `303`: 全項目入力済み
        - `304`: 本番環境申請済み
    ExaminationInfo:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
          description: |
            ショップID（テナント）
        platform_id:
          allOf:
            - $ref: '#/components/schemas/platform_id'
        shop_type:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ShopType'
        status_code:
          allOf:
            - $ref: '#/components/schemas/ContractStatus'
        deposit_cycle_master_id:
          allOf:
            - $ref: '#/components/schemas/DepositCycleMasterId'
        contract_detail:
          allOf:
            - $ref: '#/components/schemas/ContractDetail'
            - type: object
              properties:
                pay_by:
                  allOf:
                    - $ref: '#/components/schemas/ShopPaymentMethod'
          description: |
            契約情報\
            \
            fincodeに登録されているショップ運営事業者の契約情報の詳細
        shop_item_detail:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/ContentInfo'
          description: |
            ショップ 取扱商材情報\
            \
            fincodeに登録されているショップの取扱商材情報
        contract_bank_account:
          allOf:
            - $ref: '#/components/schemas/ContractBankAccountInfo'
          description: |
            銀行口座情報\
            \
            fincode上での売上入金を受け取るための銀行口座情報
        contract_input_status:
          type: object
          properties:
            status_code:
              allOf:
                - $ref: '#/components/schemas/ContractInputStatus'
            contract_info_input:
              type: boolean
              description: |
                契約情報入力完了フラグ\
                \
                契約情報の入力が完了しているかどうか
            shop_info_input:
              type: boolean
              description: |
                ショップ情報入力完了フラグ\
                \
                ショップ情報の入力が完了しているかどうか
            account_info_input:
              type: boolean
              description: |
                銀行口座情報入力完了フラグ\
                \
                銀行口座情報の入力が完了しているかどうか
            card_info_input:
              type: boolean
              description: |
                請求先クレジットカード情報入力完了フラグ\
                \
                fincodeが請求を行う際に請求先となるクレジットカード情報の入力が完了しているかどうか
      x-req-properties:
        update_contract_detail:
          type: boolean
          default: false
          nullable: true
          description: |
            契約情報更新フラグ\
            \
            契約情報の更新を行うかどうか

            - `true`: 更新を行う
        update_shop:
          type: boolean
          default: false
          nullable: true
          description: |
            ショップ情報更新フラグ\
            \
            ショップ情報の更新を行うかどうか

            - `true`: 更新を行う
        update_bank_account:
          type: boolean
          default: false
          nullable: true
          description: |
            入金用銀行口座情報更新フラグ\
            \
            fincodeの売上の入金先となる銀行口座情報の更新を行うかどうか

            - `true`: 更新を行う
        update_deposit_cycle:
          type: boolean
          default: false
          nullable: true
          description: |
            入金サイクル情報更新フラグ\
            \
            fincodeの売上の入金サイクル情報の更新を行うかどうか

            - `true`: 更新を行う
    ExaminationInfo.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/ExaminationInfo'
    update_contract_detail:
      type: boolean
      default: false
      nullable: true
      description: |
        契約情報更新フラグ\
        \
        契約情報の更新を行うかどうか

        - `true`: 更新を行う
    update_shop:
      type: boolean
      default: false
      nullable: true
      description: |
        ショップ情報更新フラグ\
        \
        ショップ情報の更新を行うかどうか

        - `true`: 更新を行う
    update_bank_account:
      type: boolean
      default: false
      nullable: true
      description: |
        入金用銀行口座情報更新フラグ\
        \
        fincodeの売上の入金先となる銀行口座情報の更新を行うかどうか

        - `true`: 更新を行う
    update_deposit_cycle:
      type: boolean
      default: false
      nullable: true
      description: |
        入金サイクル情報更新フラグ\
        \
        fincodeの売上の入金サイクル情報の更新を行うかどうか

        - `true`: 更新を行う
    ExaminationInfo.Updating.Request:
      type: object
      properties:
        update_contract_detail:
          allOf:
            - $ref: '#/components/schemas/update_contract_detail'
        update_shop:
          allOf:
            - $ref: '#/components/schemas/update_shop'
        update_bank_account:
          allOf:
            - $ref: '#/components/schemas/update_bank_account'
        update_deposit_cycle:
          allOf:
            - $ref: '#/components/schemas/update_deposit_cycle'
        deposit_cycle_master_id:
          allOf:
            - $ref: '#/components/schemas/DepositCycleMasterId'
        contract_detail:
          allOf:
            - $ref: '#/components/schemas/ContractDetail'
            - type: object
              properties:
                pay_by:
                  allOf:
                    - $ref: '#/components/schemas/ShopPaymentMethod'
          description: |
            契約情報\
            \
            fincodeに登録するショップ運営事業者の契約情報の詳細
        shop_item_detail:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/ContentInfo'
          description: |
            ショップ 取扱商材情報\
            \
            fincodeに登録するショップの取扱商材情報
        contract_bank_account:
          allOf:
            - $ref: '#/components/schemas/ContractBankAccountInfo'
          description: |
            銀行口座情報\
            \
            fincode上での売上入金を受け取るための銀行口座情報
    ExaminationInfo.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/ExaminationInfo'
    CompanyStamp:
      type: object
      properties:
        shop_id:
          type: string
          minLength: 13
          maxLength: 13
          description: ショップID
        filename:
          type: string
          maxLength: 100
          description: |
            社印ファイル名\
            \
            拡張子を含むアップロードされたファイルの名称
        extension:
          type: string
          maxLength: 10
          description: |
            社印ファイルの拡張子（`png`, `jpg`, `jpeg`）
        data:
          type: string
          description: |
            社印ファイルデータ（Base64 エンコード文字列）  
            ファイルサイズは512KB以下
        delete_flag:
          type: string
          enum:
            - '0'
          description: |
            削除フラグ
            * `0` - 未削除
        create_date:
          type: string
          format: date-time
          description: |
            作成日時 形式：`yyyy/MM/dd HH:mm:ss.SSS`
        update_date:
          type: string
          format: date-time
          description: |
            更新日時 形式：`yyyy/MM/dd HH:mm:ss.SSS`
      x-req-properties:
        data:
          type: string
          format: binary
          description: |
            社印ファイルデータ（マルチパートアップロード）\
            \
            画像ファイルをマルチパートアップロードするときはこの `data` フィールドに画像データを設定します。
    CompanyStamp.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/CompanyStamp'
    x-req-properties-data:
      type: string
      format: binary
      description: |
        社印ファイルデータ（マルチパートアップロード）\
        \
        画像ファイルをマルチパートアップロードするときはこの `data` フィールドに画像データを設定します。
    CompanyStamp.Creating.Request:
      type: object
      required:
        - data
      properties:
        data:
          allOf:
            - $ref: '#/components/schemas/x-req-properties-data'
    CompanyStamp.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/CompanyStamp'
    CompanyStamp.Deleting.Response:
      allOf:
        - $ref: '#/components/schemas/CompanyStamp'
    FincodeEvent:
      type: string
      enum:
        - payments.card.regist
        - payments.card.exec
        - payments.card.capture
        - payments.card.cancel
        - payments.card.auth
        - payments.card.change
        - payments.card.secure2.authenticate
        - payments.card.secure2.result
        - payments.card.secure
        - payments.applepay.regist
        - payments.applepay.exec
        - payments.applepay.capture
        - payments.applepay.cancel
        - payments.googlepay.regist
        - payments.googlepay.exec
        - payments.googlepay.capture
        - payments.googlepay.cancel
        - payments.googlepay.auth
        - payments.googlepay.change
        - payments.googlepay.secure2.authenticate
        - payments.googlepay.secure2.result
        - payments.googlepay.secure
        - payments.konbini.regist
        - payments.konbini.exec
        - payments.konbini.cancel
        - payments.konbini.complete
        - payments.konbini.complete.stub
        - konbini.expired.update.batch
        - payments.paypay.regist
        - payments.paypay.exec
        - payments.paypay.capture
        - payments.paypay.cancel
        - payments.paypay.change
        - payments.paypay.complete
        - payments.amazonpay.regist
        - payments.amazonpay.exec
        - payments.amazonpay.capture
        - payments.amazonpay.cancel
        - payments.amazonpay.auth
        - payments.amazonpay.change
        - payments.amazonpay.complete
        - payments.amazonpay.status.update
        - payments.directdebit.regist
        - payments.directdebit.exec
        - payments.directdebit.cancel
        - payments.directdebit.change
        - payments.directdebit.complete
        - payments.directdebit.complete.stub
        - customers.payment_methods.created
        - customers.payment_methods.updated
        - customers.payment_methods.inactivated
        - customers.payment_methods.activated
        - customers.payment_methods.deleted
        - card.regist
        - card.update
        - card.updater.complete
        - subscription.card.regist
        - subscription.card.delete
        - subscription.card.update
        - recurring.card.batch
        - subscription.directdebit.regist
        - subscription.directdebit.delete
        - subscription.directdebit.update
        - recurring.directdebit.batch
        - subscription.paypay.regist
        - subscription.paypay.delete
        - subscription.paypay.update
        - recurring.paypay.batch
        - payments.bulk.card.regist
        - payments.bulk.card.batch
        - payments.bulk.virtualaccount.regist
        - payments.bulk.virtualaccount.batch
        - payments.bulk.amazonpay.regist
        - payments.bulk.amazonpay.batch
        - contracts.status_code.updated
        - invoice.create
        - invoice.update
        - invoice.open
        - invoice.cancel
        - invoice.delete
        - invoice.expired
        - invoice.paid
        - charge_backs.regist
        - charge_backs.update
        - change_requests.regist
        - change_requests.update
      minLength: 1
      maxLength: 40
      example: payments.card.secure
      description: |
        Webhook通知 トリガーイベント
    WebhookSetting:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 50
          example: w_*********************
          description: |
            Webhook設定ID
        url:
          type: string
          format: uri
          example: https://your-service.example.com/webhook-receiver
          description: |
            Webhook通知先 URL\
            \
            Webhookの通知先URLを指定します。\
            fincodeのWebhookはHTTPS通信かつ443ポートでのみ受信可能です。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
        signature:
          type: string
          minLength: 1
          maxLength: 60
          example: WEBHOOK_FROM_FINCODE
          description: |
            署名\
            \
            このWebhookがfincodeから送信されたことを確認するための署名です。\
            fincodeからのWebhook通知において`Fincode-Signature`ヘッダーにこの値が含まれます。
        created:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/updated'
    WebhookSetting.list:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/WebhookSetting'
    WebhookSetting.ListRetrieving.Response:
      allOf:
        - $ref: '#/components/schemas/WebhookSetting.list'
    WebhookSetting_properties-id:
      type: string
      minLength: 1
      maxLength: 50
      example: w_*********************
      description: |
        Webhook設定ID
    WebhookSetting_properties-url:
      type: string
      format: uri
      example: https://your-service.example.com/webhook-receiver
      description: |
        Webhook通知先 URL\
        \
        Webhookの通知先URLを指定します。\
        fincodeのWebhookはHTTPS通信かつ443ポートでのみ受信可能です。
    signature:
      type: string
      minLength: 1
      maxLength: 60
      example: WEBHOOK_FROM_FINCODE
      description: |
        署名\
        \
        このWebhookがfincodeから送信されたことを確認するための署名です。\
        fincodeからのWebhook通知において`Fincode-Signature`ヘッダーにこの値が含まれます。
    WebhookSetting.Creating.Request:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/WebhookSetting_properties-id'
        url:
          allOf:
            - $ref: '#/components/schemas/WebhookSetting_properties-url'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
        signature:
          allOf:
            - $ref: '#/components/schemas/signature'
      required:
        - event
    WebhookSetting.Creating.Response:
      allOf:
        - $ref: '#/components/schemas/WebhookSetting'
    WebhookSettingId_schema:
      type: string
      example: w_**********************
    WebhookSetting.Retrieving.Response:
      allOf:
        - $ref: '#/components/schemas/WebhookSetting'
    WebhookSetting.Updating.Request:
      type: object
      properties:
        url:
          allOf:
            - $ref: '#/components/schemas/WebhookSetting_properties-url'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
        signature:
          allOf:
            - $ref: '#/components/schemas/signature'
    WebhookSetting.Updating.Response:
      allOf:
        - $ref: '#/components/schemas/WebhookSetting'
    WebhookSetting.Deleting.Response:
      type: object
      properties:
        id:
          allOf:
            - $ref: '#/components/schemas/WebhookSetting_properties-id'
          description: 削除されたWebhook設定のID
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
    CurrencyCode:
      type: string
      enum:
        - JPY
      example: JPY
      description: |
        通貨コード\
        この決済で利用された通貨のコードです。

        - `JPY`: 日本円
    Payment.Card_properties-job_code:
      type: string
      enum:
        - CHECK
        - AUTH
        - CAPTURE
        - CANCEL
      example: CAPTURE
      description: |
        取引種別

        - `CHECK`：有効性チェックのみ行う
        - `AUTH`：仮売上
        - `CAPTURE`：即時売上
        - `CANCEL`：キャンセル
    WebhookEvent.Payment.Card:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Card`: カード
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `CHECKED`: 有効性チェック済み<br /><span class="smallText">カードの有効性チェックが完了しています。</span>
            - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）<br /><span class="smallText">3Dセキュア認証を使用する決済を実行した直後の状態です。認証後決済実行を行うまで請求や仮売上はされません。</span>
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
        pay_times:
          allOf:
            - $ref: '#/components/schemas/CardPayTimes'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額
        tax:
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyCode'
        job_code:
          allOf:
            - $ref: '#/components/schemas/Payment.Card_properties-job_code'
        subscription_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
        bulk_payment_id:
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
        forward:
          allOf:
            - $ref: '#/components/schemas/forward'
        transaction_id:
          allOf:
            - $ref: '#/components/schemas/transaction_id'
        transaction_date:
          type: string
          nullable: false
          example: 2022/05/16 23:59:59.999
          description: |
            決済 処理日時
        approve:
          allOf:
            - $ref: '#/components/schemas/approve'
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookResponse:
      type: object
      properties:
        receive:
          type: string
          minLength: 1
          maxLength: 1
          enum:
            - '0'
            - '1'
          example: '0'
          description: |
            Webhook通知受信\
            \
            Webhookの受信が正常に完了したかどうかをfincodeにレスポンスします。

            - `0`: 受信成功<br /><span class="smallText">fincodeは受信に成功したと判断し、通知を終了します。</span>
            - `1`: 受信失敗<br /><span class="smallText">fincodeは受信に失敗したと判断します。Webhookの受信に失敗した場合は、fincodeはリトライを行います。</span>
    WebhookResponse-plain:
      type: string
      description: |
        - `0`: 受信成功<br /><span class="smallText">fincodeは受信に成功したと判断し、通知を終了します。</span>
        - `1`: 受信失敗<br /><span class="smallText">fincodeは受信に失敗したと判断します。Webhookの受信に失敗した場合は、fincodeはリトライを行います。</span>
      example: 0
    Payment.ApplePay_properties-job_code:
      type: string
      enum:
        - AUTH
        - CAPTURE
        - CANCEL
      example: CAPTURE
      description: |
        取引種別

        - `AUTH`：仮売上
        - `CAPTURE`：即時売上
        - `CANCEL`：キャンセル
    WebhookEvent.Payment.ApplePay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Applepay`: Apple Pay
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額
        tax:
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyCode'
        job_code:
          allOf:
            - $ref: '#/components/schemas/Payment.ApplePay_properties-job_code'
        forward:
          allOf:
            - $ref: '#/components/schemas/forward'
        transaction_id:
          allOf:
            - $ref: '#/components/schemas/transaction_id'
        transaction_date:
          type: string
          nullable: false
          example: 2022/05/16 23:59:59.999
          description: |
            決済 処理日時
        approve:
          allOf:
            - $ref: '#/components/schemas/approve'
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    Payment.GooglePay_properties-job_code:
      type: string
      enum:
        - AUTH
        - CAPTURE
        - CANCEL
      example: CAPTURE
      description: |
        取引種別

        - `AUTH`：仮売上
        - `CAPTURE`：即時売上
        - `CANCEL`：キャンセル
    WebhookEvent.Payment.GooglePay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Googlepay`: Google Pay
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `CHECKED`: 有効性チェック済み<br /><span class="smallText">カードの有効性チェックが完了しています。</span>
            - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上として与信枠の確保が完了しており、売上確定により請求を完了できます。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `AUTHENTICATED`: 未処理（3Dセキュア認証待ち）<br /><span class="smallText">3Dセキュア認証を使用する決済を実行した直後の状態です。認証後決済実行を行うまで請求や仮売上はされません。</span>
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        method:
          allOf:
            - $ref: '#/components/schemas/CardPayMethod'
        pay_times:
          allOf:
            - $ref: '#/components/schemas/CardPayTimes'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額
        tax:
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料
        currency:
          allOf:
            - $ref: '#/components/schemas/CurrencyCode'
        job_code:
          allOf:
            - $ref: '#/components/schemas/Payment.GooglePay_properties-job_code'
        forward:
          allOf:
            - $ref: '#/components/schemas/forward'
        transaction_id:
          allOf:
            - $ref: '#/components/schemas/transaction_id'
        transaction_date:
          type: string
          nullable: false
          example: 2022/05/16 23:59:59.999
          description: |
            決済 処理日時
        approve:
          allOf:
            - $ref: '#/components/schemas/approve'
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    properties-overpayment_flag:
      type: string
      enum:
        - '0'
        - '1'
      description: |
        多重支払フラグ\
        この決済に対して複数回支払いが行われた場合`1`になります。

        - `0`: 0回、または1回の支払いが行われた
        - `1`: 2回以上、同一のバーコードを用いて支払いが行われた
    properties-cancel_overpayment_flag:
      type: string
      enum:
        - '0'
        - '1'
      description: |
        キャンセル後支払フラグ\
        この決済をキャンセルした後に購入者がバーコードを用いて支払いを行った場合`1`になります。

        - `0`: キャンセル後支払は行われていない
        - `1`: キャンセル後、購入者による支払いが行われた
    payment_date:
      type: string
      nullable: true
      description: |
        支払日時\
        コンビニ店頭で購入者が支払いを行った日時です。\
        \
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    properties-payment_term:
      type: string
      nullable: true
      description: |
        支払い期限日時\
        コンビニ決済の支払い期限日時です。\
        \
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    konbini_store_code:
      nullable: true
      minLength: 1
      maxLength: 8
      description: |
        コンビニ店舗コード\
        コンビニ事業者ごとに独自体系の店舗コードです。
    order_serial:
      type: string
      nullable: true
      minLength: 1
      maxLength: 18
      description: |
        注文管理ID
    invoice_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 20
      description: |
        請求ID
    WebhookEvent.Payment.Konbini:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Konbini`: コンビニ決済
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるコンビニ店頭レジでの払い込みを待っている状態。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        overpayment_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-overpayment_flag'
        cancel_overpayment_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-cancel_overpayment_flag'
        payment_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/payment_date'
        payment_term:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-payment_term'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 6
          description: |
            利用金額
        tax:
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 6
          description: |
            税送料
        konbini_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/KonbiniCode'
        konbini_store_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/konbini_store_code'
        order_serial:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/order_serial'
        invoice_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/invoice_id'
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    Payment.PayPay_properties-job_code:
      type: string
      enum:
        - AUTH
        - CAPTURE
        - CANCEL
      example: CAPTURE
      description: |
        取引種別

        - `AUTH`：仮売上
        - `CAPTURE`：即時売上
        - `CANCEL`：キャンセル
    code_expiry_date:
      type: string
      nullable: true
      example: 2022/05/16 12:34:56.999
      description: |
        支払期限\
        形式： `yyyy/MM/dd HH:mm:ss.SSS`
    auth_max_date:
      type: string
      nullable: true
      example: 2022/05/16
      description: |
        仮売上期限\
        形式： `yyyy/MM/dd`
    code_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      example: '123456'
      description: |
        PayPayの支払いコードID
    payment_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      description: |
        PayPay 決済ID
    properties-payment_date:
      type: string
      nullable: true
      example: 2022/05/16 12:34:56.999
      description: |
        支払日時\
        形式： `yyyy/MM/dd HH:mm:ss.SSS`
    merchant_payment_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      description: |
        PayPay トランザクションID
    merchant_update_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      description: |
        PayPay 金額変更ID
    merchant_revert_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      description: |
        PayPay キャンセルID
    merchant_refund_id:
      type: string
      nullable: true
      minLength: 1
      maxLength: 64
      description: |
        PayPay 返金ID
    WebhookEvent.Payment.PayPay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Paypay`: PayPay
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるPayPay上での取引承認を待っている状態。</span>
            - `AUTHORIZED`: 仮売上<br /><span class="smallText">仮売上としてPayPay残高の確保が完了しており、売上確定により請求を完了できます。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">請求が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        job_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Payment.PayPay_properties-job_code'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 9
          description: |
            利用金額
        tax:
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 9
          description: |
            税送料
        code_expiry_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/code_expiry_date'
        auth_max_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/auth_max_date'
        order_description:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/order_description'
        code_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/code_id'
        payment_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/payment_id'
        payment_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-payment_date'
        merchant_payment_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/merchant_payment_id'
        merchant_update_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/merchant_update_id'
        merchant_revert_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/merchant_revert_id'
        merchant_refund_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/merchant_refund_id'
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.Payment.Amazonpay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別    この決済で利用する決済手段です。

            - `Amazonpay`: Amazon Pay
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentAmazonpayStatus'
        job_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/job_code'
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 7
          description: |
            利用金額
        tax:
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 7
          description: |
            税送料
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        payment_method_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/payment_method_id'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        start_limit_time:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/start_limit_time'
        sales_limit_time:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/sales_limit_time'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        start_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/start_flag'
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    withdrawal_date:
      type: string
      nullable: true
      example: 2022/05/06
      description: |
        引き落とし日\
        実際に購入者の口座から引き落としが行われた実績日です。\
        \
        形式： `yyyy/MM/dd`
    request_accept_end_date:
      type: string
      nullable: true
      example: 2022/04/25
      description: |
        請求依頼受付期間 終了日\
        振替依頼を受け付ける最終日。この日付の23:59までに振替依頼（決済実行）を受け付けます。\
        \
        形式： `yyyy/MM/dd`\
        詳細は[Docs > 口座振替年間スケジュール](https://docs.fincode.jp/payment/directdebit/schedule)の「請求依頼受付期間終了日」の列で確認できます。
    transfer_return_date:
      type: string
      nullable: true
      example: 2022/05/11
      description: |
        請求結果反映 予定日\
        \
        形式： `yyyy/MM/dd`\
        詳細は[Docs > 口座振替年間スケジュール](https://docs.fincode.jp/payment/directdebit/schedule)の「振替結果返却日」の列で確認できます。
    WebhookEvent.Payment.DirectDebit:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Directdebit`: 口座振替
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">振替はまだ実行されていません。</span>
            - `AWAITING_PAYMENT_APPROVAL`: 決済処理待ち<br /><span class="smallText">fincodeおよび金融機関による振替処理を待っています。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">振替が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この振替はキャンセルされました。</span>
            - `FAILED`: 請求失敗<br /><span class="smallText">何らかの理由により振替に失敗しました。</span>
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        payment_method_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
        result_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/DirectDebitResultCode'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 10
          description: |
            利用金額
        tax:
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 10
          description: |
            税送料
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        target_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/target_date'
          description: |
            振替指定日
        withdrawal_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/withdrawal_date'
        request_accept_end_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/request_accept_end_date'
        transfer_return_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/transfer_return_date'
        remarks:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/remarks'
          description: |
            ご利用明細表示内容
        subscription_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    bulk_payment_id:
      nullable: true
      allOf:
        - $ref: '#/components/schemas/PaymentBulk_properties-id'
      description: |
        一括決済ID\
        この決済情報が一括決済機能を用いて登録されたものである場合、このフィールドに一括決済IDが設定されます。
    use_static_virtual_account:
      type: boolean
      enum:
        - true
        - false
      description: |
        顧客固定バーチャル口座利用フラグ\
        この決済において顧客固定バーチャル口座が利用されているかどうかを示すフラグです。

        - `true`: 顧客固定バーチャル口座を利用している
        - `false`: 顧客固定バーチャル口座を利用していない
    WebhookEvent.Payment.VirtualAccount:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PayType'
          description: |
            決済種別\
            この決済で利用する決済手段です。

            - `Virtualaccount`: 銀行振込（バーチャル口座）
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatus'
          description: |
            決済ステータス

            - `UNPROCESSED`: 未処理<br /><span class="smallText">請求はまだ実行されていません。</span>
            - `AWAITING_CUSTOMER_PAYMENT`: 購入者の支払い待ち<br /><span class="smallText">購入者によるバーチャル口座への振込を待っている状態。</span>
            - `CAPTURED`: 売上確定<br /><span class="smallText">振込が完了し、売上が確定しています。</span>
            - `CANCELED`: キャンセル<br /><span class="smallText">この決済はキャンセルされました。</span>
            - `EXPIRED`: 決済の期限切れ<br /><span class="smallText">この決済は期限が切れています。</span>
        customer_group_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-customer_group_id'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        amount:
          allOf:
            - $ref: '#/components/schemas/amount'
          maxLength: 20
          description: |
            利用金額
        tax:
          allOf:
            - $ref: '#/components/schemas/tax'
          maxLength: 20
          description: |
            税送料
        billing_amount:
          allOf:
            - $ref: '#/components/schemas/billing_amount'
        billing_tax:
          allOf:
            - $ref: '#/components/schemas/billing_tax'
        billing_total_amount:
          allOf:
            - $ref: '#/components/schemas/billing_total_amount'
        payment_term_day:
          allOf:
            - $ref: '#/components/schemas/properties-payment_term_day'
        payment_term:
          allOf:
            - $ref: '#/components/schemas/payment_term'
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
        va_branch_code:
          allOf:
            - $ref: '#/components/schemas/va_branch_code'
        va_branch_name:
          allOf:
            - $ref: '#/components/schemas/va_branch_name'
        va_account_number:
          allOf:
            - $ref: '#/components/schemas/va_account_number'
        va_account_name:
          allOf:
            - $ref: '#/components/schemas/va_account_name'
        account_assignment_date:
          allOf:
            - $ref: '#/components/schemas/account_assignment_date'
        virtual_account_id:
          allOf:
            - $ref: '#/components/schemas/virtual_account_id'
        transaction_date:
          allOf:
            - $ref: '#/components/schemas/transaction_date'
        value_date:
          allOf:
            - $ref: '#/components/schemas/value_date'
        remitter_bank_name:
          allOf:
            - $ref: '#/components/schemas/remitter_bank_name'
        remitter_branch_name:
          allOf:
            - $ref: '#/components/schemas/remitter_branch_name'
        remitter_account_name:
          allOf:
            - $ref: '#/components/schemas/remitter_account_name'
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        overpayment_flag:
          allOf:
            - $ref: '#/components/schemas/overpayment_flag'
        cancel_overpayment_flag:
          allOf:
            - $ref: '#/components/schemas/cancel_overpayment_flag'
        expire_overpayment_flag:
          allOf:
            - $ref: '#/components/schemas/expire_overpayment_flag'
        bulk_payment_id:
          allOf:
            - $ref: '#/components/schemas/bulk_payment_id'
        use_static_virtual_account:
          allOf:
            - $ref: '#/components/schemas/use_static_virtual_account'
        use_exact_deposit_amount:
          allOf:
            - $ref: '#/components/schemas/properties-use_exact_deposit_amount'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.CustomerPaymentMethodCard:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        order_id:
          allOf:
            - $ref: '#/components/schemas/Payment_properties-id'
        card_status:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodStatus'
        customer_group_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-customer_group_id'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        card_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-id'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        process_type:
          type: string
          enum:
            - I
            - U
          description: |
            処理タイプ

            - `I`: 登録
            - `U`: 更新
        card_no_display:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-card_no'
        expire_display:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-expire'
        forward:
          allOf:
            - $ref: '#/components/schemas/forward'
        default_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/default_flag'
        status:
          type: string
          nullable: true
          enum:
            - AUTHENTICATED
            - CHECK
          example: AUTHENTICATED
          description: |
            3Dセキュア2.0認証処理 ステータス

            - `AUTHENTICATED`: 3Dセキュア認証中<br /><span class="smallText">認証でNGとなった際もこの値で通知されます</span>
            - `CHECK`: 3Dセキュア認証完了

            3Dセキュア認証を利用しない場合はnullを設定します
        access_id:
          allOf:
            - $ref: '#/components/schemas/access_id'
        transaction_id:
          allOf:
            - $ref: '#/components/schemas/transaction_id'
        approve:
          allOf:
            - $ref: '#/components/schemas/approve'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
        pay_type:
          type: string
          enum:
            - Card
          description: |
            決済種別
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookPaymentMethodDirectdebit:
      type: object
      properties:
        application_type:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/DirectDebitApplicationType'
        request_form_id:
          type: string
          minLength: 1
          maxLength: 20
          nullable: true
          description: |
            依頼書ID。\
            依頼書を管理画面から登録した際に登録者が指定した、依頼書を一意に識別するIDです。
        paper_failure_description:
          type: string
          nullable: true
          minLength: 1
          maxLength: 200
          description: |
            依頼書登録に失敗した理由。
    WebhookEvent.CustomerPaymentMethodDirectDebit:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        payment_method_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodStatus'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        pay_type:
          type: string
          enum:
            - Directdebit
          description: |
            決済種別
        directdebit:
          allOf:
            - $ref: '#/components/schemas/WebhookPaymentMethodDirectdebit'
          description: |
            口座振替 決済手段登録情報
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    last_activated_date:
      type: string
      example: 2022/05/16 23:59:59.999
      nullable: true
      description: |
        最終有効化日時\
        このバーチャル口座が有効化された最終日時です。\
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    latest_transaction_date:
      type: string
      example: 2022/05/16
      nullable: true
      description: |
        最新取引日時\
        このバーチャル口座で発生した取引のうち、最も新しい日時です。\
        形式：`yyyy/MM/dd`
    WebhookPaymentMethodVirtualaccount:
      type: object
      properties:
        va_branch_code:
          allOf:
            - $ref: '#/components/schemas/va_branch_code'
        va_branch_name:
          allOf:
            - $ref: '#/components/schemas/va_branch_name'
        va_account_number:
          allOf:
            - $ref: '#/components/schemas/va_account_number'
        va_account_name:
          allOf:
            - $ref: '#/components/schemas/va_account_name'
        virtual_account_id:
          allOf:
            - $ref: '#/components/schemas/virtual_account_id'
        account_assignment_date:
          allOf:
            - $ref: '#/components/schemas/account_assignment_date'
        last_activated_date:
          allOf:
            - $ref: '#/components/schemas/last_activated_date'
        latest_transaction_date:
          allOf:
            - $ref: '#/components/schemas/latest_transaction_date'
    WebhookEvent.CustomerPaymentMethodVirtualAccount:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID
        pay_type:
          type: string
          enum:
            - Virtualaccount
          description: |
            決済種別
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodStatus'
        default_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
        virtual_account:
          allOf:
            - $ref: '#/components/schemas/WebhookPaymentMethodVirtualaccount'
          description: |
            銀行振込（バーチャル口座） 決済手段登録情報
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookPaymentMethodPaypay:
      type: object
      properties:
        paypay_method:
          type: string
          enum:
            - CONTINUOUS
          example: CONTINUOUS
          description: |
            決済方式

            - `CONTINUOUS`: 継続課金（サブスクリプション・自動課金）に利用できるPayPayアカウント連携です。
    WebhookEvent.CustomerPaymentMethodPaypay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
          description: |
            決済手段ID
        pay_type:
          type: string
          enum:
            - Paypay
          description: |
            決済種別
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodPaypayStatus'
        default_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        delete_flag:
          allOf:
            - $ref: '#/components/schemas/delete_flag'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        created:
          allOf:
            - $ref: '#/components/schemas/created'
        updated:
          allOf:
            - $ref: '#/components/schemas/updated'
        paypay:
          allOf:
            - $ref: '#/components/schemas/WebhookPaymentMethodPaypay'
          description: |
            PayPay 決済手段登録情報
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
          description: |
            イベント。\
            PayPayアカウント連携（`pay_type = Paypay`）では、**`customers.payment_methods.updated` のみ**が通知されます。\
            決済手段の登録・連携の完了・連携の失敗・再認可・デフォルト設定の変更・失効・削除のいずれの場合も同じイベントで通知されるため、
            何が起きたかは `status` と `delete_flag` で判断してください。
    WebhookEvent.CustomerPaymentMethodAmazonpay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        customer_id:
          allOf:
            - $ref: '#/components/schemas/id'
        payment_method_id:
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
        process_date:
          allOf:
            - $ref: '#/components/schemas/process_date'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodAmazonpayStatus'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        amazonpay:
          type: object
          nullable: true
          description: |
            Amazon Pay情報
          properties:
            amazonpay_checkout_session_id:
              $ref: '#/components/schemas/amazonpay_checkout_session_id'
            amazonpay_charge_permission_id:
              $ref: '#/components/schemas/amazonpay_charge_permission_id'
            amazonpay_reason_code:
              $ref: '#/components/schemas/amazonpay_reason_code'
            amazonpay_charge_permission_expiration_time:
              $ref: '#/components/schemas/amazonpay_charge_permission_expiration_time'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentMethodPayType'
          description: |
            決済手段の種別

            - `Amazonpay`: この決済手段はAmazon Payの利用承諾（チャージパーミッション）です。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.Card:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        customer_group_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/customer_group_id'
        card_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-id'
        default_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/default_flag'
        card_no_display:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-card_no'
        expire_display:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-expire'
        process_date:
          type: string
          example: 2022/01/01 12:34:56.789
          description: |
            処理日時
        process_type:
          type: string
          enum:
            - I
            - U
          description: |
            処理タイプ

            - `I`: 登録
            - `U`: 更新
        pay_type:
          type: string
          enum:
            - Card
          description: |
            決済種別
        forward:
          allOf:
            - $ref: '#/components/schemas/forward'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.CardUpdaterComplete:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        customer_group_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/customer_group_id'
        card_updater_process_month:
          type: string
          nullable: true
          example: '202601'
          description: |
            カード更新実行年月
            形式：`yyyyMM`
        success_count:
          type: integer
          nullable: true
          example: 10
          description: |
            カード更新成功件数
        processed_count:
          type: integer
          nullable: true
          example: 12
          description: |
            カード更新実施件数
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    next_charge_date:
      type: string
      example: 2022/06/16 00:00:00.000
      description: |
        次回課金日\
        サブスクリプションの次回課金日です。\
        \
        形式：`yyyy/MM/dd HH:mm:ss.SSS`
    WebhookEvent.Subscription.Card:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        subscription_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
        plan_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        card_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-id'
        default_card_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/default_flag'
        status:
          allOf:
            - $ref: '#/components/schemas/SubscriptionStatus'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        start_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/start_date'
        stop_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/stop_date'
        next_charge_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/next_charge_date'
        end_month_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/end_month_flag'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.Subscription.DirectDebit:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        subscription_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
        plan_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        payment_method_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
        default_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        status:
          allOf:
            - $ref: '#/components/schemas/SubscriptionStatus'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        remarks:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/remarks'
          description: |
            ご利用明細表示内容
        start_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/start_date'
        stop_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/stop_date'
        next_charge_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/next_charge_date'
        end_month_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/end_month_flag'
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.Subscription.Paypay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        subscription_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Subscription_properties-id'
        status:
          allOf:
            - $ref: '#/components/schemas/SubscriptionStatus'
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        plan_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Plan_properties-id'
        customer_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/id'
        payment_method_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentMethod_properties-id'
        default_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/properties-default_flag'
        start_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/start_date'
        stop_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/stop_date'
        next_charge_date:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/next_charge_date'
        end_month_flag:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/end_month_flag'
        client_field_1:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 1
        client_field_2:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 2
        client_field_3:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/client_field_n'
          description: |
            加盟店自由項目 3
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.RecurringBatch.Card:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        succeeded:
          type: string
          maxLength: 10
          description: |
            成功件数\
            \
            今回のサブスクリプション課金において成功した決済の件数です。
        failed:
          type: string
          maxLength: 10
          description: |
            失敗件数\
            \
            今回のサブスクリプション課金において失敗した決済の件数です。
        retry_scheduled:
          type: string
          maxLength: 10
          description: |
            次回リトライ予定件数\
            \
            今回のサブスクリプション課金において失敗した決済のうち、次回のサブスクリプション課金でリトライ対象となる決済の件数です。
        total:
          type: string
          maxLength: 10
          description: |
            合計件数\
            \
            今回のサブスクリプション課金において発生した決済の合計件数です。
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        charge_date:
          type: string
          example: 2022/06/16
          description: |
            課金日\
            今回のサブスクリプションの課金日です。\
            \
            形式：`yyyy/MM/dd`
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.RecurringBatch.DirectDebit:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        succeeded:
          type: string
          maxLength: 10
          description: |
            成功件数\
            \
            今回のサブスクリプション課金において成功した決済の件数です。
        failed:
          type: string
          maxLength: 10
          description: |
            失敗件数\
            \
            今回のサブスクリプション課金において失敗した決済の件数です。
        total:
          type: string
          maxLength: 10
          description: |
            合計件数\
            \
            今回のサブスクリプション課金において発生した決済の合計件数です。
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        charge_date:
          type: string
          example: 2022/06/16
          description: |
            課金日\
            今回のサブスクリプションの課金日です。\
            \
            形式：`yyyy/MM/dd`
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.RecurringBatch.Paypay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        succeeded:
          type: string
          maxLength: 10
          description: |
            成功件数\
            \
            今回のサブスクリプション課金において成功した決済の件数です。
        failed:
          type: string
          maxLength: 10
          description: |
            失敗件数\
            \
            今回のサブスクリプション課金において失敗した決済の件数です。
        awaiting:
          type: string
          maxLength: 10
          description: |
            確定待ち件数\
            \
            今回のサブスクリプション課金において、PayPayからの支払い結果の通知を待っている決済の件数です。\
            \
            PayPayでは支払い結果が後から通知される場合があり、その決済は本Webhookの送信時点では成功・失敗が確定していません。\
            確定待ちの決済は、確定後に決済単位のWebhook（`payments.paypay.complete`）で通知されます。\
            また、確定待ちの決済が失敗で確定し、かつリトライ対象であった場合は、翌営業日以降の本Webhookの `retry_scheduled` に計上されます。
        retry_scheduled:
          type: string
          maxLength: 10
          description: |
            次回リトライ予定件数\
            \
            今回のサブスクリプション課金において失敗した決済のうち、次回のサブスクリプション課金でリトライ対象となる決済の件数です。
        total:
          type: string
          maxLength: 10
          description: |
            合計件数\
            \
            今回のサブスクリプション課金において発生した決済の合計件数です。\
            \
            `succeeded` ・ `failed` ・ `awaiting` の合計です。
        process_date:
          nullable: false
          allOf:
            - $ref: '#/components/schemas/Payment_properties-process_date'
        charge_date:
          type: string
          example: 2022/06/16
          description: |
            課金日\
            今回のサブスクリプションの課金日です。\
            \
            形式：`yyyy/MM/dd`
        pay_type:
          allOf:
            - $ref: '#/components/schemas/SubscriptionPayType'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.PaymentBulk.Regist.Card:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        bulk_payment_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
        file_name:
          allOf:
            - $ref: '#/components/schemas/file_name'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkStatus'
        regist_total_count:
          type: string
          minLength: 1
          maxLength: 10
          description: |
            総件数\
            \
            この一括決済に登録された決済の件数です。
        error_total_count:
          type: string
          minLength: 1
          maxLength: 10
          description: |
            エラー件数\
            \
            この一括決済においてエラーが発生した決済の件数です。
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkPayType'
        bulk_search_url:
          type: string
          example: https://api.test.fincode.jp/v1/payments/bulk/{bulk_payment_id}?pay_type=Card
          description: |
            この一括決済の一括決済 詳細情報一覧取得APIのURLです。
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この一括決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.PaymentBulk.Regist.Amazonpay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        bulk_payment_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
        file_name:
          allOf:
            - $ref: '#/components/schemas/file_name'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkStatus'
        regist_total_count:
          type: string
          minLength: 1
          maxLength: 10
          description: |
            総件数\
            \
            この一括決済に登録された決済の件数です。
        error_total_count:
          type: string
          minLength: 1
          maxLength: 10
          description: |
            エラー件数\
            \
            この一括決済においてエラーが発生した決済の件数です。
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkPayType'
          description: |
            決済種別

            - `Amazonpay`: Amazon Pay
        bulk_search_url:
          type: string
          example: https://api.test.fincode.jp/v1/payments/bulk/{bulk_payment_id}?pay_type=Amazonpay
          description: |
            この一括決済の一括決済 詳細情報一覧取得APIのURLです。
        error_code:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/error_code'
          description: |
            この一括決済において発生したエラーのうち、一番最新のエラーのエラーコードです。\
            [各エラーコードの定義はこちらを参照](https://docs.fincode.jp/develop_support/error)して確認できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.PaymentBulk.Batch.Card:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        bulk_payment_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
        file_name:
          allOf:
            - $ref: '#/components/schemas/file_name'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkStatus'
        succeeded_count:
          type: string
          maxLength: 10
          description: |
            成功件数\
            \
            今回の一括決済課金において成功した決済の件数です。
        failed_count:
          type: string
          maxLength: 10
          description: |
            失敗件数\
            \
            今回の一括決済課金において失敗した決済の件数です。
        total_count:
          type: string
          maxLength: 10
          description: |
            合計件数\
            \
            今回の一括決済課金において発生した決済の合計件数です。
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkPayType'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    WebhookEvent.PaymentBulk.Batch.Amazonpay:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        bulk_payment_id:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PaymentBulk_properties-id'
        file_name:
          allOf:
            - $ref: '#/components/schemas/file_name'
        status:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkStatus'
        succeeded_count:
          type: string
          maxLength: 10
          description: |
            成功件数\
            \
            今回の一括決済課金において成功した決済の件数です。
        failed_count:
          type: string
          maxLength: 10
          description: |
            失敗件数\
            \
            今回の一括決済課金において失敗した決済の件数です。
        total_count:
          type: string
          maxLength: 10
          description: |
            合計件数\
            \
            今回の一括決済課金において発生した決済の合計件数です。
        pay_type:
          allOf:
            - $ref: '#/components/schemas/PaymentBulkPayType'
          description: |
            決済種別

            - `Amazonpay`: Amazon Pay
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
    Acquirer:
      type: string
      enum:
        - UC
        - TFC
        - ORICO
        - AFS
        - MUN
        - JCB/AMEX
        - DINERS
        - APPLE PAY UC
        - APPLE PAY JCB/AMEX
        - GOOGLE PAY UC
        - GOOGLE PAY TFC
        - GOOGLE PAY ORICO
        - GOOGLE PAY AFS
        - GOOGLE PAY MUN
        - GOOGLE PAY JCB/AMEX
        - GOOGLE PAY DINERS
        - PAYSLE
        - PAYPAY
        - DIRECT DEBIT
        - DIRECT DEBIT MIZUHO
        - VIRTUAL ACCOUNT
        - VIRTUAL ACCOUNT BULK
        - CARD UPDATER
      description: |
        審査対象

        - `UC`: VISA／Mastercard（UCカード）
        - `TFC`: VISA／Mastercard（トヨタファイナンス）
        - `ORICO`: VISA／Mastercard（オリエントコーポレーション）
        - `AFS`: VISA／Mastercard（イオンフィナンシャルサービス）
        - `MUN`: VISA／Mastercard（三菱UFJニコス）
        - `JCB/AMEX`: JCB／AMEX（JCB）
        - `DINERS`: DINERS（JCB）
        - `APPLE PAY UC`: Apple Pay（UCカード）
        - `APPLE PAY JCB/AMEX`: Apple Pay（JCB）
        - `GOOGLE PAY UC`: Google Pay（UCカード）
        - `GOOGLE PAY TFC`: Google Pay（トヨタファイナンス）
        - `GOOGLE PAY ORICO`: Google Pay（オリエントコーポレーション）
        - `GOOGLE PAY AFS`: Google Pay（イオンフィナンシャルサービス）
        - `GOOGLE PAY MUN`: Google Pay（三菱UFJニコス）
        - `GOOGLE PAY JCB/AMEX`: Google Pay（JCB）
        - `GOOGLE PAY DINERS`: Google Pay（Diners Club）
        - `PAYSLE`: コンビニ決済（電算システム）
        - `PAYPAY`: コンビニ決済（PayPay）
        - `DIRECT DEBIT`: 口座振替（5・6・23・27日）
        - `DIRECT DEBIT MIZUHO`: 口座振替（1・5・20・26日）
        - `VIRTUAL ACCOUNT`: 銀行振込（バーチャル口座）
        - `VIRTUAL ACCOUNT BULK`: 一括決済（バーチャル口座）
        - `CARD UPDATER`: 洗替
      x-ja-description: |
        審査対象（和名）

        - `決済事業者審査: VISA/MASTER-UC`
        - `決済事業者審査: VISA/MASTER-TFC`
        - `決済事業者審査： VISA/MASTER-ORICO`
        - `決済事業者審査： VISA/MASTER-AFS`
        - `決済事業者審査： VISA/MASTER-MUN`
        - `決済事業者審査: JCB/AMEX`
        - `決済事業者審査: DINERS`
        - `決済事業者審査: ApplePay-UC`
        - `決済事業者審査: ApplePay-JCB/AMEX`
        - `決済事業者審査: GooglePay-UC`
        - `決済事業者審査: GooglePay-TFC`
        - `決済事業者審査： GooglePay-ORICO`
        - `決済事業者審査： GooglePay-AFS`
        - `決済事業者審査： GooglePay-MUN`
        - `決済事業者審査: GooglePay-JCB/AMEX`
        - `決済事業者審査: GooglePay-DINERS`
        - `決済事業者審査: コンビニ決済`
        - `決済事業者審査: PayPay決済`
        - `決済事業者審査: 口座振替（5・6・23・27日）`
        - `決済事業者審査: 口座振替（1・5・20・26日）`
        - `決済事業者審査: 銀行振込（バーチャル口座）`
        - `決済事業者審査: 一括決済（バーチャル口座）`
        - `決済事業者審査: 洗替`
    WebhookProvider:
      type: string
      enum:
        - UC
        - TFC
        - ORICO
        - AFS
        - MUN
        - JCB_AMEX
        - DINERS
        - APPLE_PAY_UC
        - APPLE_PAY_JCB_AMEX
        - GOOGLE_PAY_UC
        - GOOGLE_PAY_TFC
        - GOOGLE_PAY_ORICO
        - GOOGLE_PAY_AFS
        - GOOGLE_PAY_MUN
        - GOOGLE_PAY_JCB
        - GOOGLE_PAY_DINERS
        - PAYSLE
        - PAYPAY
        - DIRECT_DEBIT
        - DIRECT_DEBIT_MIZUHO
        - VIRTUAL_ACCOUNT
        - VIRTUAL_ACCOUNT_BULK
        - CARD_UPDATER
      example: UC
      description: |
        決済事業者\

        - `UC`: VISA／Mastercard（UCカード）
        - `TFC`: VISA／Mastercard（トヨタファイナンス）
        - `ORICO`: VISA／Mastercard（オリエントコーポレーション）
        - `AFS`: VISA／Mastercard（イオンフィナンシャルサービス）
        - `MUN`: VISA／Mastercard（三菱UFJニコス）
        - `JCB_AMEX`: JCB／AMEX（JCB）
        - `DINERS`: DINERS（JCB）
        - `APPLE_PAY_UC`: Apple Pay（UCカード）
        - `APPLE_PAY_JCB_AMEX`: Apple Pay（JCB）
        - `GOOGLE_PAY_UC`: Google Pay（UCカード）
        - `GOOGLE_PAY_TFC`: Google Pay（トヨタファイナンス）
        - `GOOGLE_PAY_ORICO`: Google Pay（オリエントコーポレーション）
        - `GOOGLE_PAY_AFS`: Google Pay（イオンフィナンシャルサービス）
        - `GOOGLE_PAY_MUN`: Google Pay（三菱UFJニコス）
        - `GOOGLE_PAY_JCB`: Google Pay（JCB）
        - `GOOGLE_PAY_DINERS`: Google Pay（Diners Club）
        - `PAYSLE`: コンビニ決済（電算システム）
        - `PAYPAY`: コンビニ決済（PayPay）
        - `DIRECT_DEBIT`: 口座振替（5・6・23・27日）
        - `DIRECT_DEBIT_MIZUHO`: 口座振替（1・5・20・26日）
        - `VIRTUAL_ACCOUNT`: 銀行振込（バーチャル口座）
        - `VIRTUAL_ACCOUNT_BULK`: 一括決済（バーチャル口座）
        - `CARD_UPDATER`: 洗替
    AcquirerContractStatus:
      type: string
      enum:
        - '701'
        - '702'
        - '703'
        - '704'
        - '705'
        - '706'
        - '707'
        - '708'
        - '709'
      description: |
        決済事業者 契約ステータス

        - `701`: 申込なし<br /><span class="smallText">まだこの決済手段を利用申請していません</span>
        - `702`: 審査受付<br /><span class="smallText">fincodeが審査を受け付けました。まだこの決済手段は利用できません。</span>
        - `703`: 審査待ち<br /><span class="smallText">fincodeによる審査開始を待っています。まだこの決済手段は利用できません。</span>
        - `704`: 審査中<br /><span class="smallText">fincodeによる審査中です。まだこの決済手段は利用できません。</span>
        - `705`: 審査保留中<br /><span class="smallText">審査の過程で保留中が発生しました。まだこの決済手段は利用できません。</span>
        - `706`: 審査OK<br /><span class="smallText">fincodeによる審査の結果OKとなりました。まだこの決済手段は利用できません。</span>
        - `707`: 利用可能<br /><span class="smallText">この決済手段は利用可能です。</span>
        - `708`: 審査NG<br /><span class="smallText">fincodeによる審査の結果NGとなりました。この決済手段は利用できません。</span>
        - `709`: 申込中止<br /><span class="smallText">この決済手段の利用申請を中止しました。</span>
      x-ja-description: |
        決済事業者 契約ステータス（和名）

        - `申込なし`
        - `審査受付`
        - `審査待ち`
        - `審査中`
        - `審査保留中`
        - `審査OK`
        - `利用可能`
        - `審査NG`
        - `申込中止`
    WebhookEvent.Contract:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
        body:
          type: array
          description: |
            決済手段 契約状況リスト\
            \
            決済手段の種別とその契約ステータスを含むオブジェクトの配列です。
          items:
            type: object
            properties:
              acquirer:
                allOf:
                  - $ref: '#/components/schemas/Acquirer'
              provider:
                allOf:
                  - $ref: '#/components/schemas/WebhookProvider'
              examination_task:
                type: string
                description: |
                  審査対象（和名）

                  - `決済事業者審査: VISA/MASTER-UC`
                  - `決済事業者審査: VISA/MASTER-TFC`
                  - `決済事業者審査： VISA/MASTER-ORICO`
                  - `決済事業者審査： VISA/MASTER-AFS`
                  - `決済事業者審査： VISA/MASTER-MUN`
                  - `決済事業者審査: JCB/AMEX`
                  - `決済事業者審査: DINERS`
                  - `決済事業者審査: ApplePay-UC`
                  - `決済事業者審査: ApplePay-JCB/AMEX`
                  - `決済事業者審査: GooglePay-UC`
                  - `決済事業者審査: GooglePay-TFC`
                  - `決済事業者審査： GooglePay-ORICO`
                  - `決済事業者審査： GooglePay-AFS`
                  - `決済事業者審査： GooglePay-MUN`
                  - `決済事業者審査: GooglePay-JCB/AMEX`
                  - `決済事業者審査: GooglePay-DINERS`
                  - `決済事業者審査: コンビニ決済`
                  - `決済事業者審査: PayPay決済`
                  - `決済事業者審査: 口座振替（5・6・23・27日）`
                  - `決済事業者審査: 口座振替（1・5・20・26日）`
                  - `決済事業者審査: 銀行振込（バーチャル口座）`
                  - `決済事業者審査: 一括決済（バーチャル口座）`
                  - `決済事業者審査: 洗替`
              status_code:
                allOf:
                  - $ref: '#/components/schemas/AcquirerContractStatus'
              status:
                type: string
                description: |
                  決済事業者 契約ステータス（和名）

                  - `申込なし`
                  - `審査受付`
                  - `審査待ち`
                  - `審査中`
                  - `審査保留中`
                  - `審査OK`
                  - `利用可能`
                  - `審査NG`
                  - `申込中止`
              is_updated:
                type: boolean
                description: |
                  更新の有無\
                  \
                  更新があった場合は `true`になります。
    Invoice_properties-id:
      type: string
      description: |
        インボイスID
      minLength: 1
      maxLength: 30
    WebhookEvent.Invoice:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
        invoice_id:
          allOf:
            - $ref: '#/components/schemas/Invoice_properties-id'
          description: |
            イベントが発生したインボイスID\
            このIDを指定してインボイス 取得APIを呼び出すことで、最新のインボイス情報を取得できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
          description: |
            Webhook通知 トリガーイベント

            - `invoice.create`: インボイス 作成
            - `invoice.update`: インボイス 更新
            - `invoice.open`: インボイス 発行（請求実行）
            - `invoice.cancel`: インボイス キャンセル
            - `invoice.delete`: インボイス 削除
            - `invoice.expired`: インボイス 支払期限超過
            - `invoice.paid`: インボイス 支払い完了
    WebhookEvent.ChargeBack:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
          description: |
            イベントが発生したチャージバックが属するショップIDです。
        charge_back_id:
          type: string
          description: |
            イベントが発生したチャージバックIDです。\
            このIDを指定してチャージバック 取得APIを呼び出すことで、最新のチャージバック情報を取得できます。
        status:
          type: integer
          description: |
            通知時点のチャージバックのステータスです。\
            チャージバック 取得APIのレスポンスの `status_code` と同値です。

            - `4005`: 要対応
            - `4006`: 回答済み
            - `4007`: 回答済み
            - `4009`: 売上返還確定（`canceled` が `true` の場合は確定後取消）
            - `4011`: 回答済み
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
          description: |
            Webhook通知 トリガーイベント

            - `charge_backs.regist`: チャージバック 公開（加盟店へ初めて公開されたとき）
            - `charge_backs.update`: チャージバック 更新（公開済みチャージバックのステータスが変化したとき）
    WebhookEvent.ChangeRequest:
      type: object
      properties:
        shop_id:
          allOf:
            - $ref: '#/components/schemas/Shop_properties-id'
          description: |
            イベントが発生した変更申請が属するショップIDです。
        change_request_id:
          type: string
          description: |
            イベントが発生した変更申請IDです。\
            このIDとショップIDを指定して変更申請 取得APIを呼び出すことで、最新の変更申請情報を取得できます。
        event:
          allOf:
            - $ref: '#/components/schemas/FincodeEvent'
          description: |
            Webhook通知 トリガーイベント

            - `change_requests.regist`: 変更申請 登録（変更申請が発生したとき）
            - `change_requests.update`: 変更申請 更新（変更申請のステータスが更新されたとき）
  examples:
    payment_method:
      summary: 口座振替・銀行振込（バーチャル口座）
      value: pm_**********************
    card:
      summary: カード
      value: cs_**********************
x-tagGroups:
  - name: Getting Started
    tags:
      - 文字コード
      - リクエストヘッダー
      - ページネーション
      - 冪等処理
      - エラーオブジェクト
      - エラー
  - name: 顧客情報
    tags:
      - 顧客
      - 決済手段
      - カード
  - name: 決済
    tags:
      - 決済
  - name: 3Dセキュア認証
    tags:
      - 3Dセキュア認証
  - name: リダイレクト型
    tags:
      - リダイレクト型決済
      - リダイレクト型カード登録
  - name: サブスクリプション機能
    tags:
      - プラン
      - サブスクリプション
  - name: 一括決済機能
    tags:
      - 一括決済
  - name: インボイス機能
    tags:
      - インボイス機能
  - name: ショップの入金情報
    tags:
      - 売上入金
      - プラットフォーム利用料収入
      - チャージバック
  - name: プラットフォーム管理
    tags:
      - プラットフォームショップ
      - テナントショップ
  - name: ショップ管理
    tags:
      - 社印
      - ショップ決済手段
  - name: テナント申請管理 (Limited)
    tags:
      - テナント申請管理
  - name: Webhook
    tags:
      - Webhook設定
      - Webhook_通知仕様
