> ## 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: 계좌이체로 결제

> API로 Didit 충전 청구서를 생성하고 45일 안에 계좌이체로 결제하세요. 크레딧 $1,000~$20,000, 계좌 정보와 PDF 제공.

Didit의 충전 청구서 API는 USD 청구서를 발행합니다. 재무팀이 45일 이내에 어떤 은행에서든 은행 송금으로 이 청구서를 결제하면 잔액에 크레딧이 추가됩니다.
콘솔의 충전 대화상자에서 사용자가 만드는 청구서와 동일한 청구서입니다.

충전 청구서 생성 프롬프트
        프롬프트를 클립보드에 복사



      
      

\<pre>

\`Goal: Create a Didit top-up invoice that the organization's finance team pays by bank transfer, so the balance is topped up without a card.

Endpoint: POST https://verification.didit.me/v3/billing/top-up-invoices/
Auth header: x-api-key: <DIDIT_API_KEY>
Idempotency-Key header: REQUIRED, 1 to 255 characters. One new key per invoice you intend to create; store it and reuse it ONLY to retry that same request.
Content-Type: application/json

Request body:
\- amount_in_dollars (number, REQUIRED): the credit to add, in USD, from 1,000 to 20,000, at most two decimals. Tax is added to the invoice when it applies.
\- po_number (string, optional, up to 140 characters): printed on the invoice.

curl:
curl -X POST 'https://verification.didit.me/v3/billing/top-up-invoices/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 0b8e6f4a-3c2d-4e1f-9a7b-5d6c8e2f1a30' \
-d '{"amount_in_dollars": 5000, "po_number": "PO-88213"}'

Response 201: the invoice { id, lane: "bank_transfer", status, credit_amount, total, tax, currency, amount_received, amount_credited, amount_open, invoice_number, hosted_invoice_url, invoice_pdf, po_number, due_at, confirmed_at, closed_at, created_at, bank_details: { currency, amount_due, account_holder_name, bank_name, account_number, routing_number, swift_code, reference } or null }

Before telling anyone to pay, read status and amount_open: a retry with the same key returns the same invoice in its CURRENT state, even paid, cancelled or expired. Give payment instructions ONLY while status is open or part_paid and amount_open is above 0.
To pay: transfer amount_open (not credit_amount: total includes tax) to bank_details, with invoice_number as the reference. routing_number is for ACH and US wires, swift_code for international wires. If bank_details is null, use hosted_invoice_url. The billing contacts also receive the invoice by email.
Credit: only what arrives is added, when it arrives. A part payment adds credit in proportion to the share of total it pays; the rest stays open with the same reference until due_at (45 days after issue). After due_at the status is expired; a transfer that still arrives with the reference is added for what it pays.
Follow it with GET /v3/billing/top-up-invoices/{top_up_id}/ and stop once status is paid, expired, cancelled or failed. Use due_at as returned (45 days after issue for new invoices). Settle on status and the amounts, never on confirmed_at (also set by a part payment) or closed_at (null for a paid invoice).

Errors (objects with code and detail, except field errors, which name the field):
\- 400 field error on amount_in_dollars (below 1,000, above 20,000, more than two decimals); idempotency_key_required (missing, blank or longer than 255 characters); a body that is not valid JSON (detail only); billing_details_required (missing lists the fields a person saves once in the console's billing details)
\- 404 billing_not_available
\- 409 top_up_invoice_open (open_invoice is the invoice still open or part paid: pay what it owes or wait for it to expire; it can be cancelled in the console only while nothing has arrived), idempotency_key_conflict (same key with another amount or from another API key), top_up_not_completed (an earlier request with this key could not issue its invoice: nothing was issued, create it again with a NEW key), top_up_not_allowed (annual Enterprise contract), billing_customer_missing
\- 502 payment_provider_error (the state could not be confirmed): retry with the SAME key. It returns the invoice if it was issued, or 409 top_up_not_completed if not; only then use a NEW key.`

\</pre>



      
      

붙여넣을 곳

## 작동 방식1) [크레딧 잔액 조회](https://docs.didit.me/ko/management-api/billing/balance.md)로 잔액을 확인합니다.
2) $1,000에서 $20,000 사이의 필요한 크레딧에 대해 새 `Idempotency-Key`와 함께 청구서를 생성합니다.
3) 참조 번호로 `invoice_number`를 입력하여 `amount_open`을 `bank_details`의 계좌로 이체합니다.
4) [충전 청구서 조회](https://docs.didit.me/ko/management-api/billing/get-top-up-invoice.md)로 이어서 `status`가 `paid`가 되거나, `expired` 또는 `cancelled`로 종료될 때까지 추적합니다.## 결제 금액과 받는 금액- `amount_in_dollars`는 추가할 크레딧 금액입니다. 해당하는 경우 청구서에 세금이 추가되므로, 송금해야 하는 금액인 `total`은 `credit_amount`보다 클 수 있습니다.
- 실제로 도착한 금액만 도착한 시점에 잔액에 추가됩니다.
- 부분 입금은 `total` 중 납부된 비율만큼 크레딧을 추가하며, 나머지 금액은 같은 참조 번호로 `due_at`까지 미결제 상태로 남습니다.
- `due_at`은 청구서에 명시된 납부 기한으로, 발행일로부터 45일 후입니다. 반환된 값을 사용하십시오. 이전 조건으로 발행된 청구서는 고유한 날짜를 유지합니다.
- `due_at`까지 `total`이 모두 도착하지 않으면 청구서는 `expired` 상태가 됩니다. 참조 번호가 포함되어 그 이후에 도착한 송금은 납부한 금액만큼 추가됩니다.
- `routing_number`는 ACH 및 미국 송금용이고, `swift_code`는 국제 송금용입니다. `bank_details`가 null이면 `hosted_invoice_url`에서 같은 은행 정보를 확인할 수 있습니다.
- 결제 담당자에게도 청구서가 이메일로 전송됩니다.## 첫 청구서 발행 전- 사용자가 콘솔의 청구 정보에 회사의 법적 명칭과 주소를 한 번 저장해야 합니다. 그 전까지 요청은 `missing` 필드와 함께 `400 billing_details_required`를 반환합니다.
- 충전 청구서는 Free, Growth, Scale 요금제에서 사용할 수 있습니다. 연간 Enterprise 계약은 `409 top_up_not_allowed`를 반환합니다.## 멱등성 및 재시도- 생성하려는 청구서마다 `Idempotency-Key`를 하나씩 사용하고 저장해 두십시오. 같은 요청을 재시도할 때만 재사용해야 합니다.
- 키가 없거나, 공백이거나, 255자를 초과하면 `400 idempotency_key_required`가 반환됩니다.
- 같은 자격 증명에서 같은 키와 같은 금액으로 요청하면, 청구서가 결제 완료, 취소됨 또는 만료됨 상태여도 현재 상태 그대로 반환됩니다. 결제 안내는 `status`가 `open` 또는 `part_paid`이고 `amount_open`이 0보다 큰 경우에만 제공하십시오.
- 같은 키에 다른 금액을 사용하거나 다른 자격 증명에서 요청하면 `409 idempotency_key_conflict`가 반환됩니다.
- `502 payment_provider_error`는 청구서의 상태를 확인할 수 없었다는 뜻입니다. 같은 키로 재시도하십시오. 청구서가 이미 발급되었다면 그 청구서가 반환되고, 아무것도 발급되지 않았다면 `409 top_up_not_completed`가 반환됩니다. 이 경우에만 새 키로 새 청구서를 생성하십시오.## 한 번에 하나의 청구서`open` 또는 `part_paid` 상태인 동안 다른 청구서를 생성하면 `409 top_up_invoice_open`과 함께 `open_invoice`가 반환됩니다.
남은 금액을 결제하거나 만료될 때까지 기다리십시오.
사용자는 입금된 금액이 전혀 없을 때에만 콘솔에서 청구서를 취소할 수 있습니다.## 오류| HTTP | `code` | 의미 |
| - | - | - |
| 400 | `amount_in_dollars` 필드 오류 | 금액이 $1,000 미만이거나 $20,000을 초과하거나 소수점 이하 자릿수가 두 자리를 넘습니다. |
| 400 | `idempotency_key_required` | `Idempotency-Key` 헤더가 없거나 비어 있거나 255자를 넘습니다. |
| 400 | 없음 (`detail`만 포함) | 요청 본문이 유효한 JSON이 아닙니다. |
| 400 | `billing_details_required` | 청구서에는 회사의 법적 명칭과 주소가 필요합니다. `missing`에는 아직 누락된 항목이 나열됩니다. |
| 404 | `billing_not_available` | 아직 조직에서 결제를 사용할 수 없습니다. |
| 409 | `top_up_invoice_open` | 다른 청구서가 미결제 상태이거나 일부만 결제되었습니다. `open_invoice`에 해당 청구서가 표시됩니다. |
| 409 | `idempotency_key_conflict` | 이 키는 다른 금액으로 사용되었거나 다른 API 키로 사용되었습니다. |
| 409 | `top_up_not_completed` | 이 키를 사용한 이전 요청에서 청구서를 발행하지 못했습니다. 아무것도 발행되지 않았으므로 새 키로 새 청구서를 생성하십시오. |
| 409 | `top_up_not_allowed` | 연간 Enterprise 계약은 크레딧을 충전할 수 없습니다. |
| 409 | `billing_customer_missing` | 조직에 아직 결제 계정이 없습니다. 담당자가 콘솔에서 결제를 설정해야 합니다. |
| 502 | `payment_provider_error` | 청구서의 상태를 확인할 수 없습니다. 같은 키로 다시 시도하십시오. |대신 카드로 크레딧을 충전하려면 [크레딧 충전](https://docs.didit.me/ko/management-api/billing/top-up.md)을 참고하십시오.


## OpenAPI

````yaml ko/openapi-25.json POST /v3/billing/top-up-invoices/
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, 연결, 계좌, 잔액, 거래, 금융기관 및 지원 범위입니다. 실제 은행에 대한 일회성 조회는 프로덕션 애플리케이션에
      제공됩니다. 실제 은행에 대한 지속적인 접근은 아직 프로덕션 애플리케이션에 제공되지 않습니다. Didit Test Bank를 사용하는
      샌드박스 애플리케이션에서만 이용할 수 있으며, 국가별로 순차적으로 열립니다. 샌드박스에서는 요금이 부과되지 않습니다. API 키로
      호출하려면 뱅크 데이터에 접근할 수 있는 키가 필요합니다. 전체 액세스 키는 접근할 수 있으며, 범위가 제한된 키에는 스코프에
      `bank-data`가 포함되어 있어야 합니다(조회에는 read, 변경을 수반하는 작업에는 write). 이 스코프가 없는 범위 제한
      키는 거부되며, 호출은 `403 bank_data_access_denied`로 응답합니다. 계좌 확인은 예외입니다. 이 작업에는
      세션에 대한 쓰기 권한 또는 전체 액세스 권한이 필요하며, 뱅크 데이터 스코프는 필요하지 않습니다. 원시 뱅크 데이터(계좌, 잔액,
      거래 및 변경 피드)는 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/:
    post:
      tags:
        - Billing
      summary: 충전 청구서 생성
      description: >-
        은행 송금으로 결제할 때 어떤 은행에서든 **45일** 이내에 조직의 잔액을 충전하는 USD 청구서를 발행합니다. 콘솔의 충전
        대화 상자에서 사용자가 만드는 것과 같은 청구서입니다. 충전을 자동화하는 재무 팀을 위해 설계되었습니다. `GET
        /v3/billing/balance/`를 확인하고, 청구서를 생성하고, 결제한 다음 `GET
        /v3/billing/top-up-invoices/{top_up_id}/`로 추적하세요.


        - **금액.** `amount_in_dollars`는 크레딧 금액이며 **\$1,000에서 \$20,000** 사이이고, 소수점
        이하는 최대 두 자리까지 입력할 수 있습니다. 세금이 적용되면 청구서에 세금이 추가되므로 `total`(송금할 금액)은
        `credit_amount`보다 클 수 있습니다.

        - **결제 방법.** `status`가 `open` 또는 `part_paid`이고 `amount_open`이 0보다 큰 동안,
        `invoice_number`를 참조 번호로 하여 `amount_open`을 `bank_details`에 있는 계좌로
        송금하세요(ACH 및 미국 와이어는 `routing_number`, 국제 와이어는 `swift_code`). 조직의 결제 담당
        연락처로도 청구서가 이메일로 전송되며, `hosted_invoice_url`과 `invoice_pdf`에서도 같은 정보를 확인할
        수 있습니다. `bank_details`가 null이면 `hosted_invoice_url`을 사용하세요.

        - **크레딧.** 실제로 도착한 금액만, 도착한 시점에 추가됩니다. `total` 전액이 송금되면 `credit_amount`가
        추가되고, 일부만 결제하면 결제한 `total`의 비율만큼 크레딧이 추가됩니다. 나머지 금액은 같은 참조 번호로 열린 상태로
        남아, 청구서에 명시된 날짜인 `due_at`까지 유지됩니다. 그 날짜까지 `total` 전액이 도착하지 않으면 상태가
        `expired`로 바뀝니다. 그 이후에 참조 번호와 함께 도착한 송금은 결제한 금액만큼 크레딧이 추가됩니다.

        - **한 번에 하나씩.** 청구서가 열려 있거나 일부 결제된 상태인 동안 다른 청구서를 생성하면 `409`
        `top_up_invoice_open`과 `open_invoice`가 반환됩니다. 남은 금액을 결제하거나 만료될 때까지
        기다리세요. 사용자는 아무 금액도 도착하지 않은 경우에만 콘솔에서 청구서를 취소할 수 있습니다.

        - **결제 정보.** 청구서는 회사의 법적 명칭과 주소로 발행되며, 이 정보는 사용자가 콘솔의 결제 정보에서 한 번 저장합니다.
        저장하기 전에는 요청이 `400` `billing_details_required`와 `missing` 필드를 반환합니다.

        - **요금제.** 충전이 가능한 Free, Growth, Scale 요금제에서 사용할 수 있습니다. 연간 Enterprise
        계약은 `409` `top_up_not_allowed`를 반환합니다.


        **멱등성.** `Idempotency-Key` 헤더는 필수입니다. 키가 없거나, 비어 있거나, 255자를 넘으면 `400`
        `idempotency_key_required`가 반환됩니다. 생성하려는 청구서마다 키를 하나씩 사용하고 저장해 두었다가, 같은
        요청을 재시도할 때만 재사용하세요. 같은 자격 증명에서 같은 키와 금액을 보내면 현재 상태가 무엇이든(결제됨, 취소됨, 만료됨
        포함) 그 청구서가 반환되며(`201`), 따라서 결제 안내는 `status`가 `open` 또는 `part_paid`이고
        `amount_open`이 0보다 큰 동안에만 제공하세요. 같은 키라도 금액이 다르거나 다른 자격 증명에서 보내면 `409`
        `idempotency_key_conflict`가 반환됩니다.


        **요청이 실패한 경우.** `502` `payment_provider_error`는 청구서 상태를 확인할 수 없다는 뜻입니다.
        같은 키로 재시도하세요. 청구서가 이미 발행되었다면 재시도 시 해당 청구서가 반환되고, 아무것도 발행되지 않았다면 `409`
        `top_up_not_completed`가 반환됩니다. `top_up_not_completed`를 받은 후에만 새 키로 새
        청구서를 생성하세요. `502`를 받은 뒤 새 키만으로 청구서를 만들면 첫 번째 청구서가 아직 열려 있어 `409`
        `top_up_invoice_open`이 반환될 수 있습니다.
      operationId: billing_top_up_invoices_create
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            생성하려는 청구서마다 키를 하나씩 사용하며, 길이는 1자에서 255자이고 같은 요청을 재시도할 때만 재사용합니다. 같은
            자격 증명에서 같은 키와 금액을 보내면 같은 청구서가 반환되며 두 개가 발행되지 않습니다. 키가 없거나 비어 있거나 더
            길면 `400` `idempotency_key_required`가 반환됩니다.
          schema:
            type: string
            minLength: 1
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount_in_dollars
              properties:
                amount_in_dollars:
                  type: number
                  minimum: 1000
                  maximum: 20000
                  description: >-
                    추가할 크레딧(USD)입니다. **1,000에서 20,000 사이**이며 소수점 이하는 최대 두 자리입니다.
                    세금이 해당되는 경우 청구서에 세금이 추가됩니다.
                  multipleOf: 0.01
                po_number:
                  type: string
                  maxLength: 140
                  description: 청구서에 인쇄된 구매 주문서 번호입니다.
            examples:
              Invoice for $5,000 of credit:
                value:
                  amount_in_dollars: 5000
                  po_number: PO-88213
      responses:
        '201':
          description: 새로 생성되었거나 이 키로 이미 만든 청구서이며, 현재 상태 그대로입니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingTopUpInvoice'
              examples:
                Issued:
                  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
        '400':
          description: >-
            필드 오류(예: `amount_in_dollars`가 \$1,000 미만이거나, \$20,000을 초과하거나, 소수점 둘째
            자리를 넘는 경우) 또는 `code`가 있는 객체입니다. 코드 값은
            `idempotency_key_required`(`Idempotency-Key`가 없거나, 비어 있거나, 255자를 넘는
            경우) 또는 `billing_details_required`(법적 이름과 주소가 아직 저장되지 않음, `missing`에
            해당 항목이 나열됨)입니다. 유효한 JSON이 아닌 본문은 `detail`만 포함한 객체를 반환합니다.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TopUpInvoiceFieldErrors'
                  - $ref: '#/components/schemas/TopUpInvoiceError'
                  - $ref: '#/components/schemas/TopUpInvoiceDetailError'
              examples:
                Amount below the minimum:
                  value:
                    amount_in_dollars:
                      - A bank transfer top-up must be at least $1,000
                Billing details missing:
                  value:
                    code: billing_details_required
                    detail: >-
                      Add your billing details (legal name and address) before
                      creating an invoice.
                    missing:
                      - legal_name
                      - address.line1
                Body not valid JSON:
                  value:
                    detail: >-
                      JSON parse error - Expecting value: line 1 column 1 (char
                      0)
        '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: '`billing_not_available`: 이 조직에 대해 아직 결제 기능을 사용할 수 없습니다.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpInvoiceError'
              examples:
                Billing not available:
                  value:
                    code: billing_not_available
                    detail: Plans and billing settings are not available yet.
        '409':
          description: >-
            `top_up_invoice_open` (다른 청구서가 열려 있거나 일부 결제된 상태입니다. `open_invoice`에서
            해당 청구서의 이름을 확인할 수 있습니다), `idempotency_key_conflict` (같은 키가 다른 금액으로
            사용되었거나 다른 API 키로 사용되었습니다), `top_up_not_completed` (이 키로 보낸 이전 요청에서
            청구서를 발행하지 못했습니다. 아무것도 발행되지 않았으므로 새로운 키로 새 청구서를 생성하십시오),
            `top_up_not_allowed` (연간 Enterprise 계약입니다) 또는
            `billing_customer_missing` (조직에 아직 결제 계정이 없습니다. 사용자가 콘솔에서 결제를 설정해야
            합니다).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpInvoiceError'
              examples:
                Invoice already open:
                  value:
                    code: top_up_invoice_open
                    detail: >-
                      An invoice is already open. Pay it or cancel it before
                      creating another.
                    open_invoice:
                      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'
                Open invoice closed meanwhile:
                  value:
                    code: top_up_invoice_open
                    detail: >-
                      An invoice is already open. Pay it or cancel it before
                      creating another.
                    open_invoice: null
                Key used for another invoice:
                  value:
                    code: idempotency_key_conflict
                    detail: This idempotency key was used for another top-up.
                Invoice not issued:
                  value:
                    code: top_up_not_completed
                    detail: >-
                      An earlier request with this Idempotency-Key failed before
                      the invoice was issued. Nothing is owed: create a new
                      invoice with a new key.
        '429':
          description: '속도 제한 초과: 요청 빈도를 줄이고 `Retry-After`에 표시된 간격이 지난 후 다시 시도하십시오.'
          content:
            application/json:
              examples:
                Throttled:
                  value:
                    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
              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'
        '502':
          description: >-
            `payment_provider_error`: 결제 제공업체에서 청구서 상태를 확인할 수 없었습니다. 같은
            `Idempotency-Key`로 다시 시도하십시오. 청구서가 발행되었다면 해당 청구서가 반환되고, 아무것도 발행되지
            않았다면 `409` `top_up_not_completed`가 반환됩니다. 이 경우에만 새로운 키로 새 청구서를
            생성하십시오.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopUpInvoiceError'
              examples:
                Not issued:
                  value:
                    code: payment_provider_error
                    detail: The payment provider is not available. Try again later.
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/billing/top-up-invoices/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -H 'Idempotency-Key: 0b8e6f4a-3c2d-4e1f-9a7b-5d6c8e2f1a30' \
              -d '{
                "amount_in_dollars": 5000,
                "po_number": "PO-88213"
              }'
components:
  schemas:
    BillingTopUpInvoice:
      type: object
      description: >-
        은행 이체로 결제하는 충전 청구서입니다. 콘솔의 충전 대화상자에서 발행되는 것과 같은 청구서입니다. 현재 상태는 `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 청구서 중 550.00 USD를 결제하면 1,000.00 USD 크레딧 기준으로 500.00
            USD가 추가됩니다.
          example: '5000.00'
        amount_open:
          type: string
          description: >-
            `status`가 `open` 또는 `part_paid`인 동안 아직 송금해야 할 금액(USD)입니다. 이 금액을 정확히
            송금하고 참조 번호로 `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: 청구서 번호입니다. 이체에 반드시 포함되어야 합니다.
    TopUpInvoiceFieldErrors:
      type: object
      description: '필드 오류: 잘못된 각 요청 필드와 해당 메시지(예: \$1,000 미만 금액)입니다.'
      additionalProperties:
        type: array
        items:
          type: string
      example:
        amount_in_dollars:
          - A bank transfer top-up must be at least $1,000
    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'
    TopUpInvoiceDetailError:
      type: object
      description: >-
        `detail`만 포함된 거부 응답입니다. 만료되었거나 취소된 자격 증명(401), 키가 없거나 자격 증명에 필요한 권한이 없는
        경우(403), 또는 유효한 JSON이 아닌 본문(400)이 해당합니다.
      required:
        - detail
      additionalProperties: false
      properties:
        detail:
          type: string
          description: 사람이 읽을 수 있는 설명입니다.
    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- 뒤에 소문자 UUID 16진수 문자 32자가 이어집니다.
        limit:
          type: integer
          description: 초과된 범위의 예산입니다. X-RateLimit-Limit 값과 같습니다.
        remaining:
          type: integer
          minimum: 0
          description: 남은 예산이며 0 미만으로 내려가지 않습니다. 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: 남은 예산이며 0 미만으로 내려가지 않습니다. 본문의 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에서 확인할 수
        있습니다. 기본 키는 모든 권한을 가집니다. 명명된 키는 범위를 지정할 수 있습니다. 리소스별로 권한 없음, 읽기 또는 쓰기를
        설정할 수 있고, 일부 워크플로나 승인된 세션으로 제한할 수 있으며, 허용된 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.