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"
}'import requests
url = "https://verification.didit.me/v3/billing/top-up-invoices/"
payload = {
"amount_in_dollars": 5000,
"po_number": "PO-88213"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount_in_dollars: 5000, po_number: 'PO-88213'})
};
fetch('https://verification.didit.me/v3/billing/top-up-invoices/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/billing/top-up-invoices/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount_in_dollars' => 5000,
'po_number' => 'PO-88213'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://verification.didit.me/v3/billing/top-up-invoices/"
payload := strings.NewReader("{\n \"amount_in_dollars\": 5000,\n \"po_number\": \"PO-88213\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://verification.didit.me/v3/billing/top-up-invoices/")
.header("Idempotency-Key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount_in_dollars\": 5000,\n \"po_number\": \"PO-88213\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/billing/top-up-invoices/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_in_dollars\": 5000,\n \"po_number\": \"PO-88213\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}충전 청구서 생성 API: 계좌이체로 결제
API로 Didit 충전 청구서를 생성하고 45일 안에 계좌이체로 결제하세요. 크레딧 1,000 20,000, 계좌 정보와 PDF 제공.
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"
}'import requests
url = "https://verification.didit.me/v3/billing/top-up-invoices/"
payload = {
"amount_in_dollars": 5000,
"po_number": "PO-88213"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount_in_dollars: 5000, po_number: 'PO-88213'})
};
fetch('https://verification.didit.me/v3/billing/top-up-invoices/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verification.didit.me/v3/billing/top-up-invoices/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount_in_dollars' => 5000,
'po_number' => 'PO-88213'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://verification.didit.me/v3/billing/top-up-invoices/"
payload := strings.NewReader("{\n \"amount_in_dollars\": 5000,\n \"po_number\": \"PO-88213\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://verification.didit.me/v3/billing/top-up-invoices/")
.header("Idempotency-Key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount_in_dollars\": 5000,\n \"po_number\": \"PO-88213\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/billing/top-up-invoices/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_in_dollars\": 5000,\n \"po_number\": \"PO-88213\"\n}"
response = http.request(request)
puts response.read_body{
"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"
}
}작동 방식
- 크레딧 잔액 조회로 잔액을 확인합니다.
- $1,000에서 $20,000 사이의 필요한 크레딧에 대해 새
Idempotency-Key와 함께 청구서를 생성합니다. - 참조 번호로
invoice_number를 입력하여amount_open을bank_details의 계좌로 이체합니다. - 충전 청구서 조회로 이어서
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 | 청구서의 상태를 확인할 수 없습니다. 같은 키로 다시 시도하십시오. |
인증
귀사 애플리케이션의 API 키입니다. Business Console의 Developers -> API keys에서 확인할 수 있습니다. 기본 키는 모든 권한을 가집니다. 명명된 키는 범위를 지정할 수 있습니다. 리소스별로 권한 없음, 읽기 또는 쓰기를 설정할 수 있고, 일부 워크플로나 승인된 세션으로 제한할 수 있으며, 허용된 IP 목록으로 제한할 수 있고, 만료일을 설정할 수 있습니다. 401은 키가 잘못되었거나, 취소되었거나, 만료되었음을 의미합니다. 403은 키가 전송되지 않았거나, 키에 해당 리소스 또는 작업에 대한 권한이 없거나, 요청이 IP 목록 밖의 주소에서 왔음을 의미합니다. 세션 경로에서 발생한 404는 세션이 키의 워크플로 또는 상태 범위를 벗어났음을 의미합니다. 미디어 접근 권한이 없는 키는 이미지, 동영상 및 PDF URL을 null로 받으며, 세션 쓰기 권한이 없는 키는 세션 링크와 토큰을 null로 받습니다. 자세한 내용은 https://docs.didit.me/console/api-keys 를 참조합니다.
헤더
본문
응답
새로 생성되었거나 이 키로 이미 만든 청구서이며, 현재 상태 그대로입니다.
은행 이체로 결제하는 충전 청구서입니다. 콘솔의 충전 대화상자에서 발행되는 것과 같은 청구서입니다. 현재 상태는 status와 금액으로 확인하십시오. 타임스탬프는 이벤트 기록만 남깁니다.
open: 송금을 기다리는 중입니다. part_paid: total의 일부가 입금되었으며 해당 금액에 대한 크레딧이 추가되었습니다. 같은 참조 번호와 함께 due_at 이전에 amount_open을 보내야 합니다. paid: total이 입금되었으며 credit_amount가 추가되었습니다. expired: total 전액이 입금되기 전에 due_at이 지났습니다. 이미 입금된 금액은 그대로 추가된 상태로 유지되며, 참조 번호가 포함된 송금이 여전히 도착하면 그 송금액만큼 추가됩니다. cancelled: 입금이 도착하기 전에 사용자가 콘솔에서 취소했습니다(입금이 도착한 후에는 청구서를 더 이상 취소할 수 없습니다). failed: 청구서를 발행할 수 없었으며 아무것도 발행되지 않았습니다.
open, part_paid, paid, expired, cancelled, failed