인보이스 API

구독의 회차별 청구 건인 인보이스에 관한 API 입니다.

상점의 구독 인보이스를 조건에 맞춰 조회합니다. 기본은 생성 일시 역순입니다.

정기 청구와 별개로 인보이스를 만들어 즉시 결제합니다. 결제 결과는 반환된 인보이스의 상태로 확인합니다.

목록과 같은 조건으로 인보이스의 상태별 건수와 통화별 금액을 집계합니다. 상태별로 세므로 상태 조건은 받지 않습니다.

청구를 취소합니다. 이미 결제된 인보이스는 취소할 수 없습니다.

취소한 정기 청구 회차를 지금 시점의 상품·할인으로 다시 계산해 새 인보이스로 만들고 결제합니다. 원래 인보이스는 취소된 채로 남습니다. 금액을 그대로 다시 결제하려면 결제 재시도를 사용합니다.

결제에 실패한 인보이스를 같은 금액으로 다시 결제합니다.

계좌 입금 등으로 대금을 따로 받은 인보이스를 완납 처리합니다.

주어진 아이디로 구독 인보이스를 조회합니다.

타입 정의

API 요청/응답의 각 필드에서 사용되는 타입 정의들을 확인할 수 있습니다
CancelSubscriptionInvoiceError: ForbiddenError | InvalidRequestError | SubscriptionInvoiceNotFoundError | ...
CancelSubscriptionInvoiceResponse: { invoice }
구독 인보이스 취소 성공 응답
CreateSubscriptionInvoiceBody: { storeId, subscriptionId, items, ... }
구독 인보이스 수동 청구 입력 정보
CreateSubscriptionInvoiceResponse: { invoice }
구독 인보이스 수동 청구 성공 응답
Currency: "KRW" | "USD" | "JPY" | ...
통화
ForbiddenError: { type, message }
요청이 거절된 경우
GetSubscriptionInvoiceResponse: { invoice, events }
구독 인보이스 조회 성공 응답
GetSubscriptionInvoiceStatsBody: { storeId, filter }
구독 인보이스 집계 조회 입력 정보
GetSubscriptionInvoiceStatsError: ForbiddenError | InvalidRequestError | UnauthorizedError
GetSubscriptionInvoiceStatsResponse: { statusCounts, currencySummaries, availableCurrencies }
구독 인보이스 집계 조회 성공 응답
GetSubscriptionInvoicesAllBody: { storeId, page, statuses, ... }
구독 인보이스 다건 조회 입력 정보
GetSubscriptionInvoicesAllError: ForbiddenError | InvalidRequestError | UnauthorizedError
GetSubscriptionInvoicesAllResponse: { items, page }
구독 인보이스 다건 조회 성공 응답
InvalidRequestError: { type, message }
요청된 입력 정보가 유효하지 않은 경우

허가되지 않은 값, 올바르지 않은 형식의 요청 등이 모두 해당됩니다.

PageInfo: { number, size, totalCount }
반환된 페이지 결과 정보
PageInput: { number, size }
다건 조회 API 에 사용되는 페이지 입력 정보
RegenerateSubscriptionInvoiceResponse: { invoice }
구독 인보이스 재생성 성공 응답
RetrySubscriptionInvoiceResponse: { invoice }
구독 인보이스 결제 재시도 성공 응답
SettleSubscriptionInvoiceBody: { storeId, method, paidAt, ... }
구독 인보이스 수동 완납 입력 정보
SettleSubscriptionInvoiceError: ForbiddenError | InvalidRequestError | SubscriptionInvoiceNotFoundError | ...
SettleSubscriptionInvoiceResponse: { invoice }
구독 인보이스 수동 완납 성공 응답
SortOrder: "DESC" | "ASC"
정렬 방식
SubscriptionCustomerHasNoBillingKeyError: { type, message }
구독 고객에게 사용 가능한 빌링키가 없는 경우
SubscriptionDiscountType: "PERCENT" | "AMOUNT"
구독 할인 유형
SubscriptionInvoice: { id, subscriptionId, customerId, ... }
구독 인보이스
SubscriptionInvoiceAlreadyRegeneratedError: { type, message }
이미 재생성된 구독 인보이스인 경우
SubscriptionInvoiceCurrencySummary: { currency, count, totalAmount, ... }
구독 인보이스 통화별 집계
SubscriptionInvoiceDiscountLine: { discountId, name, type, ... }
구독 인보이스 할인 내역

인보이스 발행 시점의 할인 조건을 그대로 담습니다. 원본 할인이 이후에 바뀌어도 변하지 않습니다.

SubscriptionInvoiceEvent: { id, occurredAt, detail }
구독 인보이스 처리내역

인보이스 상태가 바뀐 순간의 기록입니다. 쌓이기만 합니다.

SubscriptionInvoiceEventCanceled: { type }
청구 취소
SubscriptionInvoiceEventPaymentFailed: { type, attempt, failure }
결제 실패
SubscriptionInvoiceEventPaymentMethodChanged: { type, method }
결제 수단 변경

실패한 채로 있는 동안 고객 빌링키가 바뀌었습니다. 다음 재시도는 이 수단으로 나갑니다.

SubscriptionInvoiceEventPaymentRefunded: { type, refund }
결제 환불

결제 건이 취소됐습니다. 부분 취소마다 한 줄입니다.

SubscriptionInvoiceEventPaymentSucceeded: { type, attempt }
결제 승인
SubscriptionInvoiceEventSettledManually: { type, method, paidAt }
수동 완납

처리내역 시각은 처리한 시각이고, 실제 입금 시각은 paidAt입니다.

SubscriptionInvoiceEventZeroAmountPaid: { type }
0원 완납

청구 금액이 0원이라 결제 없이 완납했습니다.

SubscriptionInvoiceFilterInput: { timestampType, from, to, ... }
구독 인보이스 조회 조건

번호·고객명 검색도 기간 안에서 찾습니다.

SubscriptionInvoiceItem: { productId, name, unitPrice, ... }
구독 인보이스 항목
SubscriptionInvoiceItemFormCustom: { type, name, unitPrice, ... }
임의 항목으로 청구
SubscriptionInvoiceItemFormProduct: { type, productId, quantity }
등록된 상품으로 청구
SubscriptionInvoiceMethod: "CARD_BILLING" | "PAYPAL_BILLING"
구독 인보이스 결제 수단
SubscriptionInvoiceNotFoundError: { type, message }
요청된 구독 인보이스가 존재하지 않는 경우
SubscriptionInvoicePayment: { paymentId, billingKey, failure, ... }
구독 인보이스 결제 정보
SubscriptionInvoicePaymentAttempt: { sequence, trigger, method, ... }
구독 인보이스 결제 시도
SubscriptionInvoicePaymentFailure: { type, pgCode, pgMessage, ... }
구독 인보이스 결제 실패 정보
SubscriptionInvoicePaymentFailureReason: "INSUFFICIENT_FUNDS_OR_LIMIT_EXCEEDED" | "CARD_UNAVAILABLE" | "CARD_EXPIRED" | ...
구독 인보이스 결제 실패 사유 분류

결제사 실패 메시지를 단어로 묶은 것입니다.

SubscriptionInvoicePaymentFailureType: "PG_PROVIDER" | "BILLING_KEY_NOT_FOUND" | "BILLING_KEY_ALREADY_DELETED" | ...
구독 인보이스 결제 실패 유형
SubscriptionInvoicePaymentTrigger: "ISSUE" | "RETRY" | "REGISTRATION"
구독 인보이스 결제 시도 계기
SubscriptionInvoiceRefund: { cancellationId, amount, refundedAt, ... }
구독 인보이스 환불

결제 건이 결제취소 API·콘솔로 취소된 한 건입니다. 부분 취소마다 한 건씩 쌓입니다.

SubscriptionInvoiceSettlement: { method }
구독 인보이스 수동 완납 정보
SubscriptionInvoiceSettlementMethod: "BANK_TRANSFER" | "CARD" | "OTHER"
구독 인보이스 수동 완납 방법
SubscriptionInvoiceSortBy: "BILLING_AT" | "CREATED_AT" | "PAID_AT" | ...
구독 인보이스 정렬 기준
SubscriptionInvoiceSource: "AUTO" | "MANUAL"
구독 인보이스 생성 경로
SubscriptionInvoiceStatus: "PENDING" | "PAID" | "FAILED" | ...
구독 인보이스 상태
SubscriptionInvoiceStatusCount: { status, count }
구독 인보이스 상태별 건수
SubscriptionInvoiceStatusNotAllowedError: { type, message, status }
현재 인보이스 상태에서 허용되지 않는 요청인 경우
SubscriptionInvoiceTimestampType: "BILLING_AT" | "CREATED_AT" | "PAID_AT"
구독 인보이스 조회 기준 시점
SubscriptionNotFoundError: { type, message }
요청된 구독이 존재하지 않는 경우
SubscriptionProductBillingPausedError: { type, message, productIds }
구독 상품의 청구가 중지된 경우
SubscriptionProductNotFoundError: { type, message }
요청된 구독 상품이 존재하지 않는 경우
SubscriptionStatus: "ACTIVE" | "INCOMPLETE" | "PAUSED" | ...
구독 상태
SubscriptionStatusNotAllowedError: { type, message, status }
현재 구독 상태에서 허용되지 않는 요청인 경우
UnauthorizedError: { type, message }
인증 정보가 올바르지 않은 경우