RefundQuote — @gj-kit/toss-payments
A public interface from @gj-kit/toss-payments. The signature below is taken directly from the 0.6.1 release declaration.
Verified import example
Section titled “Verified import example”import { RefundQuote } from '@gj-kit/toss-payments';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * 정책 계산 결과. plain serializable 값이며 실제 cancel 실행 전 server의 prepareRefund를 * 통과해야 한다. quote.amount는 항상 이번에 추가로 실행할 금액이다. */interface RefundQuote extends Brand<"RefundQuote"> { readonly kind: "none" | "full" | "partial"; readonly policy: { readonly id: string; readonly version: string; readonly kind: RefundPolicyKind; }; readonly paymentKey: PaymentKey; readonly orderId: OrderId; readonly currency: Payment["currency"]; readonly evaluatedAt: string; /** exclusive. 실행 시각이 이 값 이상이면 반드시 재조회·재견적한다. */ readonly validUntil: string; readonly observedPaymentState: RefundObservedPaymentState; /** quote 생성 때 관찰한 Toss Payment.balanceAmount. */ readonly observedBalanceAmount: number; /** 프로젝트 장부가 기대한 잔액. 생성 성공 시 observed와 같다. */ readonly expectedBalanceAmount: number; readonly basisAmount: number; readonly alreadyRefundedAmount: number; /** 정책상 누적 환불 가능 총액(반올림 후). */ readonly entitlementAmount: number; /** entitlement에서 기존 확정 환불을 뺀 이번 실행액. */ readonly amount: number; readonly balanceAfterRefund: number; /** 과거 확정 환불이 현재 정책 entitlement를 이미 넘은 금액. */ readonly overRefundedAmount: number; /** 금액 직접 산출 정책이면 null. */ readonly rateBps: number | null; readonly rounding: RefundRoundingMode; readonly calculation: RefundCalculation; readonly reason: string | null;}This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/toss-payments - Version:
0.6.1 - Public entry:
. - Source: GitHub