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

# トップアップ請求書取得API：銀行振込を追跡

> Didit のトップアップ請求書の状態、着金額、残高に加算された金額、未送金額を取得します。銀行振込の照合に活用できます。

Didit のチャージ請求書取得APIは、お使いのチャージ請求書の1つを現在の状態で返します。これにより、財務自動化で支払い済みかどうか、まだ送付すべき金額、残高に追加された金額を把握できます。
請求書は[チャージ請求書の作成](https://docs.didit.me/ja/management-api/billing/create-top-up-invoice.md)で作成します。

チャージ請求書の取得プロンプト
        プロンプトをクリップボードにコピー



      
      

\<pre>

\`Goal: Read a Didit top-up invoice to know whether it is paid, what is still to send and what was added to the balance.

Endpoint: GET https://verification.didit.me/v3/billing/top-up-invoices/{top_up_id}/
Auth header: x-api-key: <DIDIT_API_KEY>
top_up_id: the id returned by POST /v3/billing/top-up-invoices/.

curl:
curl 'https://verification.didit.me/v3/billing/top-up-invoices/9a4f2c1e-7b3d-4e8a-a1c5-6f0d2b9e8c47/' \
-H 'x-api-key: YOUR_API_KEY'

Response 200: the same invoice body as the create call, in its current state.
Settle on status and the amounts: open (waiting), part_paid (send amount_open with the same reference before due_at), paid (credit_amount was added), expired (due_at passed; what arrived stays added), cancelled (cancelled in the console before anything arrived), failed (never issued, nothing owed).
confirmed_at is the latest confirmed transfer, a part payment included; closed_at is null for a paid invoice. Never use them to decide settlement. Give payment instructions only while status is open or part_paid and amount_open is above 0, and stop polling once status is paid, expired, cancelled or failed. Use due_at as returned: new invoices are due 45 days after issue, older ones keep their own date.
404 top_up_not_found for an id that is not one of the organization's top-up invoices; 404 billing_not_available when billing is not available yet.`

\</pre>



      
      

貼り付け先

## ステータスと金額を確認する| `status` | 意味 |
| - | - |
| `open` | 振込を待っている状態です。 |
| `part_paid` | `total`の一部が入金され、その分のクレジットが追加されています。同じ参照番号で、`due_at`までに`amount_open`を送金してください。 |
| `paid` | `total`の全額が入金され、`credit_amount`が追加されています。 |
| `expired` | `total`の全額が入金される前に`due_at`を過ぎています。それまでに入金された分は追加されたままです。参照番号付きで後から届いた振込は、支払われた金額分が追加されます。 |
| `cancelled` | 何も入金される前に、誰かがコンソールでキャンセルしました。 |
| `failed` | 請求書を発行できませんでした。未払いの金額はありません。 |- `amount_received`は入金された金額、`amount_credited`は残高に追加された金額、`amount_open`は残りの送金額です。
- `bank_details`は、請求書で振込を受け付けられる間（`open`または`part_paid`）は存在します。支払い案内は、その状態かつ`amount_open`が0より大きい間に限って提示してください。
- `status`が`paid`、`expired`、`cancelled`または`failed`になったら、追跡を停止してください。
- `due_at`は請求書に記載された期日なので、返された値をそのまま使用してください。新しい請求書の支払期日は発行から45日後です。以前の条件で発行された請求書は、元の期日を保持します。
- 判断は`status`と金額に基づいて行ってください。`confirmed_at`は一部入金を含めて最後に確認された振込の日時です。`closed_at`は支払い済みの請求書ではnullです。## エラー| HTTP | `code` | 意味 |
| - | - | - |
| 404 | `top_up_not_found` | 組織内にこのIDを持つチャージ請求書はありません。 |
| 404 | `billing_not_available` | お使いの組織ではまだ請求機能を利用できません。 |


## OpenAPI

````yaml ja/openapi-25.json GET /v3/billing/top-up-invoices/{top_up_id}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 本人確認API。x-api-keyヘッダーで認証します。
servers:
  - url: https://verification.didit.me
security: []
tags:
  - name: Bank Data
    description: >-
      Bank
      Link、接続、口座、残高、取引、金融機関、対応範囲に関するAPIです。実際の銀行に対する1回限りの読み取りは、本番アプリケーションで利用できます。実際の銀行への継続的なアクセスは、本番アプリケーションではまだ利用できません。サンドボックスアプリケーションでDidit
      Test Bankを使う場合に限り利用でき、国ごとに順次開放されます。サンドボックスでは料金は発生しません。


      APIキーを使った呼び出しには、銀行データにアクセスできるキーが必要です。フルアクセスのキーであればアクセスできます。スコープ付きのキーの場合は、スコープに`bank-data`を含める必要があります（読み取りはread、変更を伴う操作はwrite）。このスコープがないスコープ付きキーは拒否され、呼び出しは`403
      bank_data_access_denied`を返します。口座確認は例外です。口座確認には、セッションへの書き込みアクセス、またはフルアクセスが必要で、Bank
      dataスコープは必要ありません。生の銀行データ（口座、残高、取引、変更フィード）も、APIキーを含まないリクエストは拒否します。


      `/v3/bank/`配下で、口座確認以外のすべての拒否応答は、同じJSON本文を返します（`code`、`message`、`request_id`、`field`、`next_action`、`retry_after`）。操作ではないパス、UUIDではないID、未知のサブリソースは、すべてのメソッドで`404
      not_found`を返します。予期しないエラーは、`request_id`を含む`500
      internal_error`を返します。銀行データが利用できない場合、すべての操作は未知のルートと同じく、プラットフォーム標準の`404`を返します。
paths:
  /v3/billing/top-up-invoices/{top_up_id}/:
    get:
      tags:
        - Billing
      summary: チャージ用請求書を取得
      description: >-
        組織のチャージ請求書を1件確認してください。その
        `status`、受け取った金額（`amount_received`）、残高に追加された金額（`amount_credited`）、まだ送金が必要な金額（`amount_open`）、そして振込を受け付けている間は
        `bank_details` を確認します。判断は `status`
        と金額に基づいて行い、タイムスタンプでは判断しないでください。`status` が
        `paid`、`expired`、`cancelled`、`failed` のいずれかになったら、それ以降は追跡をやめてください。
      operationId: billing_top_up_invoices_retrieve
      parameters:
        - name: top_up_id
          in: path
          required: true
          description: '`POST /v3/billing/top-up-invoices/` から取得した請求書の `id` です。'
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: 現時点の状態の請求書です。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingTopUpInvoice'
              examples:
                Open:
                  value:
                    id: 9a4f2c1e-7b3d-4e8a-a1c5-6f0d2b9e8c47
                    lane: bank_transfer
                    status: open
                    credit_amount: '5000.00'
                    total: '5000.00'
                    tax: '0.00'
                    currency: usd
                    amount_received: '0.00'
                    amount_credited: '0.00'
                    amount_open: '5000.00'
                    presented: null
                    method:
                      type: customer_balance
                      name: Bank transfer
                    invoice_number: 7F3A2C1B-0012
                    hosted_invoice_url: https://invoice.example.com/i/7F3A2C1B-0012
                    invoice_pdf: https://invoice.example.com/i/7F3A2C1B-0012/pdf
                    po_number: PO-88213
                    due_at: '2027-01-14T10:00:00Z'
                    confirmed_at: null
                    closed_at: null
                    failure_reason: null
                    created_at: '2026-11-30T10:00:00Z'
                    bank_details:
                      currency: USD
                      amount_due: '5000.00'
                      account_holder_name: Didit
                      bank_name: Example Bank, N.A.
                      account_number: '000123456789'
                      routing_number: '000000000'
                      swift_code: EXAMUS33XXX
                      reference: 7F3A2C1B-0012
                Part paid:
                  value:
                    id: 9a4f2c1e-7b3d-4e8a-a1c5-6f0d2b9e8c47
                    lane: bank_transfer
                    status: part_paid
                    credit_amount: '1000.00'
                    total: '1100.00'
                    tax: '100.00'
                    currency: usd
                    amount_received: '550.00'
                    amount_credited: '500.00'
                    amount_open: '550.00'
                    presented: null
                    method:
                      type: customer_balance
                      name: Bank transfer
                    invoice_number: 7F3A2C1B-0012
                    hosted_invoice_url: https://invoice.example.com/i/7F3A2C1B-0012
                    invoice_pdf: https://invoice.example.com/i/7F3A2C1B-0012/pdf
                    po_number: null
                    due_at: '2027-01-14T10:00:00Z'
                    confirmed_at: '2026-12-04T09:12:00Z'
                    closed_at: null
                    failure_reason: null
                    created_at: '2026-11-30T10:00:00Z'
                    bank_details:
                      currency: USD
                      amount_due: '550.00'
                      account_holder_name: Didit
                      bank_name: Example Bank, N.A.
                      account_number: '000123456789'
                      routing_number: '000000000'
                      swift_code: EXAMUS33XXX
                      reference: 7F3A2C1B-0012
        '401':
          description: APIキーまたはアプリケーションのアクセストークンの有効期限が切れているか、失効しています。認証情報を差し替えてください。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpInvoiceDetailError'
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: 認証情報が送信されなかった場合、またはこの組織で認証情報がチャージ請求書を利用できない場合。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpInvoiceDetailError'
              examples:
                No credential:
                  value:
                    detail: Authentication credentials were not provided.
        '404':
          description: >-
            `top_up_not_found`：この組織のチャージ請求書で、このIDを持つものはありません。`billing_not_available`：この組織ではまだ請求機能を利用できません。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpInvoiceError'
              examples:
                Not found:
                  value:
                    code: top_up_not_found
                    detail: Top-up not found.
        '429':
          description: レート制限を超えました。リクエストを控え、`Retry-After`で示された間隔の経過後に再試行してください。
          content:
            application/json:
              examples:
                Throttled:
                  value:
                    detail: >-
                      GET request rate limit exceeded. You can make up to 600
                      requests per minute.
                    reference: RL-00000000000040008000000000000001
                    limit: 600
                    remaining: 0
                    reset: 1794358860
                    window_seconds: 60
              schema:
                $ref: '#/components/schemas/RateLimitBudgetError'
          headers:
            Retry-After:
              $ref: '#/components/headers/BudgetRetryAfter'
            X-RateLimit-Scope:
              $ref: '#/components/headers/BudgetXRateLimitScope'
            X-RateLimit-Limit:
              $ref: '#/components/headers/BudgetXRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/BudgetXRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/BudgetXRateLimitReset'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl
            'https://verification.didit.me/v3/billing/top-up-invoices/9a4f2c1e-7b3d-4e8a-a1c5-6f0d2b9e8c47/'
            \
              -H 'x-api-key: YOUR_API_KEY'
components:
  schemas:
    BillingTopUpInvoice:
      type: object
      description: >-
        銀行振込で支払われるチャージ用請求書です。コンソールの「Top up」ダイアログで発行されるものと同じ請求書です。現在の状況を把握するには
        `status` と金額を確認してください。タイムスタンプは、イベントが発生した時刻を記録するだけです。
      required:
        - id
        - lane
        - status
        - credit_amount
        - total
        - tax
        - currency
        - amount_received
        - amount_credited
        - amount_open
        - created_at
      properties:
        id:
          type: string
          format: uuid
          description: >-
            請求書の識別子です。`GET /v3/billing/top-up-invoices/{top_up_id}/`
            で再度取得してください。
        lane:
          type: string
          enum:
            - bank_transfer
          description: 常に `bank_transfer`。
        status:
          type: string
          enum:
            - open
            - part_paid
            - paid
            - expired
            - cancelled
            - failed
          description: >-
            `open`：振込を待っている状態です。`part_paid`：`total`
            の一部が入金され、その分のクレジットが加算されています。`due_at` の前に、同じ参照番号を付けて `amount_open`
            を送金してください。`paid`：`total` が入金され、`credit_amount`
            が加算されました。`expired`：`total` の全額が入金される前に `due_at`
            を過ぎました。入金済みの分は加算されたままです。参照番号を付けた振込が後から届いた場合は、その支払い分が加算されます。`cancelled`：入金前に、ユーザーがコンソールでキャンセルしました。入金後は請求書をキャンセルできません。`failed`：請求書を発行できませんでした。何も発行されていません。
        credit_amount:
          type: string
          description: '`total` が全額支払われたときに残高に追加されるクレジット額（USD、税抜き）です。'
          example: '5000.00'
        total:
          type: string
          description: 請求書が求める金額（USD、税込み）です。`credit_amount` より大きい場合があります。
          example: '5000.00'
        tax:
          type: string
          description: 請求書上の税額（USD）。該当しない場合は `0.00` です。
          example: '5000.00'
        currency:
          type: string
          enum:
            - usd
          description: 常に `usd`。
        amount_received:
          type: string
          description: 現時点までに到着した金額（USD）です。
          example: '5000.00'
        amount_credited:
          type: string
          description: >-
            現時点までに残高に追加されたクレジット（USD）です。一部入金の場合、支払われた `total`
            の割合に応じてクレジットが追加されます。1,100.00 USD の請求書に対して 1,000.00 USD
            のクレジットがある場合、550.00 USD の支払いで 500.00 USD が追加されます。
          example: '5000.00'
        amount_open:
          type: string
          description: >-
            未送金の金額（USD）です。`status` が `open` または `part_paid`
            の間に有効です。この金額をそのまま送金し、参照として `invoice_number`
            を記載してください。請求書が締められた後は無視してください。
          example: '5000.00'
        presented:
          type: object
          nullable: true
          description: チャージ用請求書では常に null。
          properties:
            amount:
              type: string
            currency:
              type: string
        method:
          type: object
          nullable: true
          description: 請求履歴での表記に合わせた支払い方法。
          properties:
            type:
              type: string
              example: customer_balance
            name:
              type: string
              example: Bank transfer
        invoice_number:
          type: string
          nullable: true
          description: 請求書番号です。参照として送金に記載してください。記載のない送金は請求書と照合できません。
        hosted_invoice_url:
          type: string
          format: uri
          nullable: true
          description: 銀行情報を含む請求書のページです。
        invoice_pdf:
          type: string
          format: uri
          nullable: true
          description: 請求書のPDFです。
        po_number:
          type: string
          nullable: true
          description: 請求書に記載された発注番号です（送付された場合）。
        due_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            請求書に記載された支払期日です。この値をそのまま使用し、計算式で求めないでください。新しい請求書の支払期日は発行から45日後です。以前の条件で発行された請求書は、発行時の日付を維持します。その日までに`total`の全額が到着していない場合、ステータスは`expired`になります。支払い済みの請求書は`paid`のままです。
        confirmed_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            一部入金を含め、直近の送金が確認された日時です。請求書が決済済みであることを意味しないため、`status` と
            `amount_open` を確認してください。
        closed_at:
          type: string
          format: date-time
          nullable: true
          description: 請求書が失敗、期限切れ、またはキャンセルされた日時です。未払い、一部入金、または支払い済みの請求書では null です。
        failure_reason:
          type: string
          nullable: true
          description: 失敗または期限切れになった理由と、その日時。
        created_at:
          type: string
          format: date-time
          description: 発行日時。
        bank_details:
          type: object
          nullable: true
          description: >-
            振込先。請求書が振込を受け付けられる状態（`open` または `part_paid`）の間に返されます。請求書が締め切られると
            null になります。また、現時点で振込先情報を読み取れない場合も null になります。その場合は、振込先も表示される
            `hosted_invoice_url` を使用してください。エラー時の `open_invoice` には含まれません。
          required:
            - currency
            - amount_due
            - account_holder_name
            - bank_name
            - account_number
            - routing_number
            - swift_code
            - reference
          properties:
            currency:
              type: string
              description: 常に `USD`。
            amount_due:
              type: string
              description: 送金する金額（USD）です。`amount_open` と同じです。
            account_holder_name:
              type: string
              description: お金の送金先の口座です。
            bank_name:
              type: string
              description: 受取銀行です。
            account_number:
              type: string
              description: 受取口座の番号です。
            routing_number:
              type: string
              description: ACH と米国内送金向け。
            swift_code:
              type: string
              description: 国際送金向け。
            reference:
              type: string
              description: 請求書番号です。送金に含める必要があります。
    TopUpInvoiceDetailError:
      type: object
      description: >-
        `detail` のみを含む拒否:
        期限切れまたは取り消された認証情報（401）、キーがない、または認証情報に必要な権限がない場合（403）、またはJSONとして無効な本文（400）。
      required:
        - detail
      additionalProperties: false
      properties:
        detail:
          type: string
          description: 人が読める形式の説明。
    TopUpInvoiceError:
      type: object
      description: チャージ用請求書リクエストのエラーボディ。
      required:
        - code
        - detail
      properties:
        code:
          type: string
          enum:
            - idempotency_key_required
            - billing_details_required
            - top_up_invoice_open
            - idempotency_key_conflict
            - top_up_not_allowed
            - top_up_not_completed
            - billing_customer_missing
            - billing_not_available
            - top_up_not_found
            - payment_provider_error
          description: 安定したエラーコード。
        detail:
          type: string
          description: 人が読める形式の説明。
        missing:
          type: array
          items:
            type: string
          description: >-
            `billing_details_required`の場合：保存が必要な請求情報（`legal_name`や`address.line1`など）。
        open_invoice:
          description: >-
            `top_up_invoice_open`の場合：未払いまたは一部入金済みの請求書。`bank_details`は含まれないため、振込先は請求書を読み取って確認してください。回答を書く前に終了していた場合はnullです。その場合は請求書を再度作成してください。
          oneOf:
            - $ref: '#/components/schemas/BillingTopUpInvoice'
            - $ref: '#/components/schemas/TopUpInvoiceNoOpenInvoice'
    RateLimitBudgetError:
      type: object
      description: >-
        レート制限ミドルウェアの予算超過による拒否の場合にのみ返されます。その他の429エラー（冪等性の競合やエンドポイント固有の上限を含む）では、これらのメタデータフィールドは保証されません。
      required:
        - detail
        - reference
        - limit
        - remaining
        - reset
        - window_seconds
      properties:
        detail:
          type: string
          description: 既存の、人が読める形式のバジェット拒否メッセージです。
        reference:
          type: string
          pattern: ^RL-[0-9a-f]{32}$
          description: RL-で始まり、その後に小文字の16進数文字32文字（UUID形式）が続く不透明なサポート参照番号。
        limit:
          type: integer
          description: 超過した範囲のバジェット。X-RateLimit-Limit と同じ値です。
        remaining:
          type: integer
          minimum: 0
          description: 残りの予算。ゼロ未満にならないよう下限をゼロに制限しています。X-RateLimit-Remaining と等しくなります。
        reset:
          type: integer
          format: int64
          description: ウィンドウのリセット時刻（Unix秒）。X-RateLimit-Resetと同じ値です。
        window_seconds:
          type: integer
          description: 固定ウィンドウの期間（秒）です。残りの待機時間ではありません。再試行する前に Retry-Afterに従ってください。
      example:
        detail: >-
          Write request rate limit exceeded. You can make up to 300 requests per
          minute.
        reference: RL-00000000000040008000000000000001
        limit: 300
        remaining: 0
        reset: 1794358860
        window_seconds: 60
    TopUpInvoiceNoOpenInvoice:
      description: 請求書はありません：回答を書く前に、開いていた請求書が終了しました。
      enum:
        - null
      nullable: true
  headers:
    BudgetRetryAfter:
      description: 次のウィンドウまでの待機秒数（切り上げ）。ミドルウェアの予算超過による拒否の場合にのみ含まれます。
      schema:
        type: integer
    BudgetXRateLimitScope:
      description: 予算を超過した範囲。ミドルウェアによる拒否の場合にのみ含まれます。
      schema:
        type: string
    BudgetXRateLimitLimit:
      description: 超過した範囲のバジェット。ボディの制限値と同じ値です。ミドルウェアのバジェットによる拒否の場合にのみ含まれます。
      schema:
        type: integer
    BudgetXRateLimitRemaining:
      description: >-
        残りの予算。ゼロ未満にならないよう下限をゼロに制限しています。ボディの remaining
        と等しくなります。ミドルウェアの予算による拒否の場合に存在します。
      schema:
        type: integer
    BudgetXRateLimitReset:
      description: リセット時刻はUnix秒です。本文のresetと同じ値です。ミドルウェアの予算超過による拒否レスポンスに含まれます。
      schema:
        type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        お客様のアプリケーションのAPIキーです。Business Console の Developers -> API keys
        から取得できます。プライマリーキーはすべてのアクセス権を持ちます。名前付きキーは範囲を制限できます。リソースごとに
        none、read、write
        を指定でき、一部のワークフローや承認済みセッションに限定できます。IPアドレスのリストや有効期限も設定できます。401
        はキーが誤っている、取り消されている、または期限切れであることを意味します。403
        はキーが送信されていない、そのリソースまたはアクションへのアクセス権がない、またはリクエストがIPリストに含まれないアドレスから送信されたことを意味します。セッションのルートでの404
        は、セッションがキーのワークフローまたはステータスの範囲外にあることを意味します。メディアへのアクセス権がないキーでは、画像、動画、PDFのURLが
        null で返されます。セッションの書き込み権限がないキーでは、セッションリンクとトークンが null で返されます。詳しくは
        https://docs.didit.me/console/api-keys を参照してください。
    BearerAuth:
      type: http
      scheme: bearer
      description: アプリケーションのクライアント認証情報によるアクセストークン。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.