---
title: "Get Invoice"
method: GET
path: "/v1/invoices/{invoice_id}"
tags: ["Billing Invoices"]
---

# Get Invoice

`GET /v1/invoices/{invoice_id}`

## Request

- Base URL: `https://api.xdata.kr` (the document declares no server; this is the origin it was published from)
- URL: `https://api.xdata.kr/v1/invoices/{invoice_id}`
- Auth: one of:
  - HTTP basic
  - OAuth 2 (authorization code, authorization URL `https://api.xdata.kr/oauth/authorize`, token URL `https://api.xdata.kr/oauth/token`)

인보이스 단건 조회.

## Path parameters

- `invoice_id` integer, required

## Query parameters

- `env_scope` 'production' | 'real_test' | 'sandbox', nullable: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.

## Headers

- `Authorization` string, nullable
- `X-Env-Scope` 'production' | 'real_test' | 'sandbox', nullable: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.

## Response `200`

Successful Response

- InvoiceResponse: 인보이스 단일 객체 응답. 자세한 SCHEMA 매핑과 제약은 이 클래스 위 주석에 있다.
  - `invoice_id` integer, required: invoices.id.
  - `organization_id` integer, required: 소유 조직 PK.
  - `subscription_id` integer, nullable: 연결된 구독 ID. 일회성 청구 시 NULL.
  - `env_scope` 'sandbox' | 'real_test' | 'production', required: 환경 스코프.
  - `invoice_number` string, required: 인보이스 비즈 번호 'INV-YYYYMM-XXXXXX' 형식.
  - `status` 'DRAFT' | 'OPEN' | 'PAID' | 'VOID' | 'UNCOLLECTIBLE' | 'REFUNDED' | 'PARTIALLY_REFUNDED', required: 인보이스 상태 (7값 enum).
  - `subtotal_amount_minor` integer, required: 공급가액 합계 (minor unit). 음수는 받지 않는다.
  - `tax_amount_minor` integer, required: 부가세 합계 (minor unit). 0 허용 (영세율 등).
  - `total_amount_minor` integer, required: 총액 (minor unit). 공급가액 + 세액과 같아야 한다. (= subtotal + tax) 강제. 서비스 계층 검증 책임.
  - `currency` 'KRW', required: 통화 코드. v1=KRW.
  - `period_start` string, date-time, nullable: 청구 적용 기간 시작.
  - `period_end` string, date-time, nullable: 청구 적용 기간 종료.
  - `issued_at` string, date-time, nullable: OPEN 전이 시각 (DRAFT는 NULL).
  - `due_at` string, date-time, nullable: 지급 만기 시각.
  - `paid_at` string, date-time, nullable: PAID 전이 시각 (미결제 시 NULL).
  - `voided_at` string, date-time, nullable: VOID 전이 시각 (정상 시 NULL).
  - `items` InvoiceItemResponse[]: 청구 항목 배열. 빈 배열 허용(DRAFT 단계).
    - `invoice_item_id` integer, required: invoice_items.id.
    - `description` string, required: 청구 항목 설명.
    - `quantity` integer, required: 수량. 0 이상이어야 한다.
    - `unit_amount_minor` integer, required: 단가 (minor unit 정수). 음수 금지.
    - `amount_minor` integer, required: 항목 합계 (minor unit 정수). 수량 x 단가와 같아야 한다. (= quantity * unit_amount_minor) 강제. 서비스 계층 검증 책임.
    - `currency` 'KRW', required: 통화 코드. v1=KRW.
    - `item_kind` 'SUBSCRIPTION' | 'USAGE' | 'ONE_TIME' | 'DISCOUNT' | 'TAX_ADJUSTMENT', required: 항목 종류 (5값 enum).
    - `period_start` string, date-time, nullable: 항목 적용 기간 시작 (구독성 항목만 채워짐).
    - `period_end` string, date-time, nullable: 항목 적용 기간 종료.
  - `created_at` string, date-time, required: 인보이스 생성 시각 (aware datetime, naive 입력 시 422).

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/xdata/apis/xboss-api.md) · [All operations](https://skmtc.dev/xdata/apis/xboss-api/llms.txt) · [OpenAPI document](https://skmtc.dev/xdata/apis/xboss-api/revisions/816de78950db?raw)
