청구서 상세 조회
청구서 ID로 청구서 상세 조회
중국 본토 사용자 안내: 중국 본토 사용자는 https://api.toapis.cn 를 API 엔드포인트(Base URL)로 사용해 주세요. 본 문서의 예시에서 https://api.toapis.com 을 https://api.toapis.cn 로 바꿔 주세요.
인증, 페이지 처리 및 오류는 시작하기를 참조하세요.
동작
인보이스 ID로 Stripe 청구서 한 건의 상세를 반환합니다. 자신의 청구를 조회할 수 있는 것은 메인 계정뿐이며 서브 계정은 HTTP 403, 메인 계정도 본 엔드포인트로 멤버 청구를 조회할 수 없습니다.
응답의 청구서 필드는 목록 항목과 같고 data.meta에는 읽기 출처, Customer 범위, 읽기 시각이 추가됩니다. 조회할 때마다 청구서가 현재 Customer 소속인지 다시 검증하고 타인의 청구서나 없는 청구서는 404입니다.
hosted_invoice_url, invoice_pdf, Customer ID는 반환하지 않습니다. 필드 의미는 청구서 목록을 참고하세요.
인증
Authorizationstring헤더필수Bearer YOUR_SYSTEM_ACCESS_TOKEN 을 사용합니다. 모델 API 키는 사용할 수 없습니다. X-User-Id 는 필요하지 않습니다.
요청 매개변수
invoice_idstring경로필수in_ 으로 시작하는 Stripe 청구서 ID.
제약: maxLength=255; pattern=^in_[A-Za-z0-9_]+$.
요청 예제
요청 예시
curl --request GET \
--url 'https://api.toapis.com/api/v1/billing/stripe/invoices/in_example_01' \
--header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'import requests
response = requests.get(
"https://api.toapis.com/api/v1/billing/stripe/invoices/in_example_01",
headers={"Authorization": "Bearer YOUR_SYSTEM_ACCESS_TOKEN"},
timeout=30,
)
response.raise_for_status()
print(response.json())const url = new URL("https://api.toapis.com/api/v1/billing/stripe/invoices/in_example_01");
const response = await fetch(url, {
headers: { Authorization: "Bearer YOUR_SYSTEM_ACCESS_TOKEN" },
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}
console.log(await response.json());응답 필드
예시는 가상 데이터이며 credits_per_usd="100" 을 가정합니다. 실제 환산에는 응답 값을 사용하세요.
codeinteger결과 코드. 0 은 성공입니다.
messagestring성공 시 빈 문자열이며 오류 메시지는 현지화됩니다.
dataobject현재 조회의 결과 객체입니다.
data.idstring청구서 상세 조회에 사용하는 Stripe 청구서 ID 입니다.
data.providerstring결제 서비스 제공자입니다. 고정 값: "stripe".
data.numberstring | nullStripe 청구서 번호이며 청구서 ID 와 다릅니다. 불명확하거나 해당하지 않으면 null 입니다.
data.statusstringStripe 가 반환한 청구서 상태입니다.
data.created_atstring | null생성 시각입니다. 시간대가 포함된 RFC 3339 형식입니다. 불명확하거나 해당하지 않으면 null 입니다.
data.currencystring금액에 사용되는 원래 통화입니다.
data.subtotalstring청구서 소계이며 통화는 currency 입니다. 정밀도를 유지하기 위해 십진수 문자열로 반환합니다.
data.totalstring청구서 총액이며 통화는 currency 입니다. 정밀도를 유지하기 위해 십진수 문자열로 반환합니다.
data.amount_duestring청구서 납부 금액이며 통화는 currency 입니다. 정밀도를 유지하기 위해 십진수 문자열로 반환합니다.
data.amount_paidstring청구서 납부 완료 금액이며 통화는 currency 입니다. 정밀도를 유지하기 위해 십진수 문자열로 반환합니다.
data.amount_remainingstring청구서 미납 잔액이며 통화는 currency 입니다. 정밀도를 유지하기 위해 십진수 문자열로 반환합니다.
data.paid_atstring | nullStripe 에 기록된 청구서 결제 완료 시각입니다. 시간대가 포함된 RFC 3339 형식입니다. 불명확하거나 해당하지 않으면 null 입니다.
data.platform_trade_nonull신뢰할 수 있는 로컬 충전 주문 번호이며 연결 미확인 시 null 입니다.
data.metaobject데이터 출처, 조회 범위 및 집계 기준 등의 메타데이터입니다.
data.meta.sourcestring데이터 출처입니다. 로컬 설정이나 원장 스냅샷은 실시간 Stripe 상태를 뜻하지 않습니다. 고정 값: "stripe".
data.meta.coveragestring현재 검증된 Stripe Customer 만 포함하며 전체 이력이 아닙니다. 고정 값: "current_customer_only".
data.meta.scopestring조회 데이터의 소유 범위이며 인증된 계정 자신입니다. 고정 값: "self".
data.meta.fetched_atstring현재 Stripe 조회 시각이며 청구서 생성 시각이 아닙니다. 시간대가 포함된 RFC 3339 형식입니다.
응답 예제
응답 예시
{
"code": 0,
"message": "",
"data": {
"id": "in_example_01",
"provider": "stripe",
"number": "EXAMPLE-0001",
"status": "paid",
"created_at": "2026-11-01T08:00:00Z",
"currency": "USD",
"subtotal": "10",
"total": "10",
"amount_due": "10",
"amount_paid": "10",
"amount_remaining": "0",
"paid_at": "2026-11-01T08:01:00Z",
"platform_trade_no": null,
"meta": {
"source": "stripe",
"coverage": "current_customer_only",
"scope": "self",
"fetched_at": "2026-11-02T01:00:00Z"
}
}
}