xdata-kr Billing Payments API
The Billing Payments API from xdata-kr — 2 operation(s) for billing payments.
The Billing Payments API from xdata-kr — 2 operation(s) for billing payments.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/xdata-kr:xdata-kr-billing-payments-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: XBOSS Billing Payments API
description: '통합 REST API 서버 (홈택스 등). Human API guide: https://developer.xdata.kr · OpenAPI Reference: /docs'
version: 2.0.0
security:
- basicClientCredential: []
- mcpOAuth2: []
tags:
- name: Billing Payments
paths:
/v1/payments:
get:
tags:
- Billing Payments
summary: List Payments
description: 결제 목록 조회.
operationId: list_payments_v1_payments_get
parameters:
- name: query
in: query
required: true
schema:
$ref: '#/components/schemas/PaymentListQuery'
- name: env_scope
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.
enum:
- production
- real_test
- sandbox
title: Env Scope
description: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.
- name: Authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
- name: X-Env-Scope
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.
enum:
- production
- real_test
- sandbox
title: X-Env-Scope
description: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PageEnvelope_PaymentResponse_'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/payments/{payment_id}:
get:
tags:
- Billing Payments
summary: Get Payment
description: 결제 단건 조회.
operationId: get_payment_v1_payments__payment_id__get
parameters:
- name: payment_id
in: path
required: true
schema:
type: integer
title: Payment Id
- name: env_scope
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.
enum:
- production
- real_test
- sandbox
title: Env Scope
description: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.
- name: Authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
- name: X-Env-Scope
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.
enum:
- production
- real_test
- sandbox
title: X-Env-Scope
description: 환경을 고릅니다. 값은 production · real_test · sandbox 중 하나입니다. 경로 접두(/v1/sandbox/... · /v1/test/... · /v1/production/...) · X-Env-Scope 헤더 · env_scope 쿼리 가운데 한 통로로 반드시 보내야 합니다. 빼면 자동으로 채우지 않고 거절하며, 두 통로에 서로 다른 값을 담아도 거절합니다. 거절은 HTTP 422 이고 오류 코드는 VALIDATION_ENV_SCOPE_MISMATCH 입니다.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
PageEnvelope_PaymentResponse_:
properties:
items:
items:
$ref: '#/components/schemas/PaymentResponse'
type: array
title: Items
description: Page result items. Empty list allowed.
next_cursor:
anyOf:
- type: string
- type: 'null'
title: Next Cursor
description: Opaque cursor for next page, or null on last page.
has_more:
type: boolean
title: Has More
description: Whether another page exists. False when next_cursor is null.
default: false
additionalProperties: false
type: object
title: PageEnvelope[PaymentResponse]
PaymentListQuery:
properties:
organization_id:
anyOf:
- type: integer
minimum: 1.0
- type: 'null'
title: Organization Id
description: 조직 PK. 본인 조직 미지정 가능(라우트 주입).
invoice_id:
anyOf:
- type: integer
minimum: 1.0
- type: 'null'
title: Invoice Id
description: 인보이스 ID 필터.
subscription_id:
anyOf:
- type: integer
minimum: 1.0
- type: 'null'
title: Subscription Id
description: 구독 ID 필터.
status:
anyOf:
- items:
type: string
enum:
- INITIATED
- PENDING
- SUCCEEDED
- FAILED
- CANCELED
- EXPIRED
type: array
- type: 'null'
title: Status
description: 상태 필터(다중). 미지정 시 전체.
limit:
type: integer
maximum: 100.0
minimum: 1.0
title: Limit
description: 페이지 크기.
default: 20
cursor:
anyOf:
- type: string
- type: 'null'
title: Cursor
description: 이전 응답의 next_cursor.
type: object
title: PaymentListQuery
description: '결제 목록 조회 쿼리.
자동 필터(라우트 강제):
- `organization_id`: 본인 조직(ADMIN은 명시 가능)
- `env_scope = X-Env-Scope`
명세에 쿼리 표가 없어 이 DTO 가 그 표의 자리를 대신한다.'
PaymentResponse:
properties:
payment_id:
type: integer
minimum: 1.0
title: Payment Id
description: payments.id.
organization_id:
type: integer
minimum: 1.0
title: Organization Id
description: 소유 조직 PK.
invoice_id:
anyOf:
- type: integer
minimum: 1.0
- type: 'null'
title: Invoice Id
description: 연결된 인보이스 ID (선택).
invoice_number:
anyOf:
- type: string
maxLength: 40
- type: 'null'
title: Invoice Number
description: 연결된 청구서의 번호 'INV-YYYYMM-XXXXXX' - 청구서 목록의 번호와 같은 값이라 고객이 문의할 때 한 이름으로 부른다. 청구서가 없으면 null. 결제 조회(GET /v1/payments · /v1/payments/{id})가 읽어서 채운다 - 결제 행에는 없는 값이라 그 밖의 경로가 돌려주는 결제 객체에서는 비어 있을 수 있다.
subscription_id:
anyOf:
- type: integer
minimum: 1.0
- type: 'null'
title: Subscription Id
description: 연결된 구독 ID (선택).
payment_method_id:
anyOf:
- type: integer
minimum: 1.0
- type: 'null'
title: Payment Method Id
description: 사용된 결제수단 ID (선택).
env_scope:
type: string
enum:
- sandbox
- real_test
- production
title: Env Scope
description: 환경 스코프.
pg_provider:
type: string
enum:
- portone
- toss
- payup
- offline
title: Pg Provider
description: PG 사업자.
provider_payment_id:
anyOf:
- type: string
maxLength: 120
- type: 'null'
title: Provider Payment Id
description: PG 발급 결제 식별자 (imp_uid 등). BFF/관리자/환불 입력용. INITIATED 시점에는 NULL일 수 있다.
amount_minor:
type: integer
exclusiveMinimum: 0.0
title: Amount Minor
description: 결제 금액 (minor unit). 0 과 음수는 받지 않는다.
currency:
type: string
const: KRW
title: Currency
description: 통화 코드. v1=KRW.
status:
type: string
enum:
- INITIATED
- PENDING
- SUCCEEDED
- FAILED
- CANCELED
- EXPIRED
title: Status
description: 결제 상태 (6값 enum).
failure_code:
anyOf:
- type: string
maxLength: 80
- type: 'null'
title: Failure Code
description: 결제 실패 코드 (FAILED 상태에서 채워짐). SCHEMA는 PG 원문 허용하나 서비스 계층이 정규화된 안전 문자열로 set 책임.
failure_reason:
anyOf:
- type: string
maxLength: 255
- type: 'null'
title: Failure Reason
description: 결제 실패 사유. **서비스 계층이 PG 원문을 사용자 안전 문자열로 정규화한 값만 set 가능**. raw 원문 직접 노출 금지.
requested_at:
type: string
format: date-time
title: Requested At
description: 결제 요청 시각 (aware datetime, naive 입력 시 422).
confirmed_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Confirmed At
description: 결제 확정 시각 (SUCCEEDED 진입 시 채워짐).
created_at:
type: string
format: date-time
title: Created At
description: 결제 행 생성 시각 (aware datetime, naive 입력 시 422).
additionalProperties: false
type: object
required:
- payment_id
- organization_id
- env_scope
- pg_provider
- amount_minor
- currency
- status
- requested_at
- created_at
title: PaymentResponse
description: "결제 단일 객체 응답.\n\nSCHEMA → DTO 매핑:\n- `payments.id` → `payment_id`.\n- `organization_id/invoice_id/subscription_id/payment_method_id/env_scope/\n provider/provider_payment_id/amount_minor/currency/status/failure_code/\n failure_reason/requested_at/confirmed_at/created_at` → 직접 매핑.\n- `metadata`/`updated_at`는 외부 노출 X.\n- `invoice_number` 는 payments 행의 칸이 아니다 - 결제 조회 서비스(`PaymentQueryService`)가\n `invoices.invoice_number` 를 일괄 조회로 읽어 얹는다(청구서가 없으면 null).\n\n정책 위험 강제 잠금:\n- **`failure_reason`은 서비스 계층이 PG 원문을 사용자 안전 문자열로 정규화하여\n set한 값만 들어와야 한다**. PG raw 응답을\n 그대로 전달하면 시크릿/내부 IP/스택트레이스 누설 사고로 분류된다.\n- `provider_payment_id`는 PG 트랜잭션 식별자. BFF/관리자/환불 입력용으로 노출하되\n 외부 사용자 UI 표시 권장 X."
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
securitySchemes:
basicClientCredential:
type: http
scheme: basic
description: 'Console-issued client credential. Send `Authorization: Basic base64(client_id:client_secret)`.'
mcpOAuth2:
type: oauth2
description: For MCP clients. OAuth 2.0 authorization code flow with PKCE (S256) for public clients. The client_id is the HTTPS URL of an OAuth Client ID Metadata Document that XBOSS has allow-listed; dynamic client registration is not supported.
flows:
authorizationCode:
authorizationUrl: https://api.xdata.kr/oauth/authorize
tokenUrl: https://api.xdata.kr/oauth/token
scopes: {}