RefundQuote — @gj-kit/toss-payments
@gj-kit/toss-payments/server에서 공개하는 interface입니다. package version 0.6.1의 release declaration을 그대로 표시합니다.
검증된 import 예제
섹션 제목: “검증된 import 예제”import { RefundQuote } from '@gj-kit/toss-payments/server';시그니처, 매개변수, 반환 타입
섹션 제목: “시그니처, 매개변수, 반환 타입”/** * 정책 계산 결과. 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;}이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.
Release context
섹션 제목: “Release context”- 패키지:
@gj-kit/toss-payments - 버전:
0.6.1 - 공개 entry:
./server - 소스: GitHub
구현 주석
섹션 제목: “구현 주석”정책 계산 결과. plain serializable 값이며 실제 cancel 실행 전 server의 prepareRefund를 통과해야 한다. quote.amount는 항상 이번에 추가로 실행할 금액이다.