ConfirmFlow — @gj-kit/toss-payments
A public interface from @gj-kit/toss-payments/server. The signature below is taken directly from the 0.6.1 release declaration.
Verified import example
Section titled “Verified import example”import { ConfirmFlow } from '@gj-kit/toss-payments/server';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”interface ConfirmFlow<E extends Env> { /** 검증 + store.saveOrder까지 완료된 뒤에만 Ok — 금액을 저장 시점에 고정. */ createOrder(input: { amount: number; /** ≤100자 precheck. */ orderName: string; /** 생략 시 generateOrderId(). */ orderId?: OrderId; /** 기본 'KRW'. */ currency?: 'KRW' | 'USD' | 'JPY'; }): Promise<Result<PendingOrder, CreateOrderError>>; /** 저장 주문 로드 → amount 일치 → 시한 검증. 통과해야만 VerifiedCheckout. */ verify(callback: UnverifiedCallback): Promise<Result<VerifiedCheckout, VerifyCheckoutError>>; /** * VerifiedCheckout만 받는다 — UnverifiedCallback은 컴파일 에러. * 멱등키는 일급 옵션이며 **기본 미부착**(§7 확정 5 — 에러 응답 멱등 재생 여부 미실측이라 보수적). */ confirm(checkout: VerifiedCheckout, options?: CallOptions<E>): Promise<Result<ConfirmedPayment, ConfirmError>>; /** 원스톱: parse → verify → confirm. 검증을 생략이 아니라 내장 — 단계별 에러가 union으로 구분된다. */ confirmCallback(input: CallbackQueryInput, options?: CallOptions<E>): Promise<Result<ConfirmedPayment, CallbackParseError | VerifyCheckoutError | ConfirmError>>; /** * §3.7 {@link resolveConfirmFailure}의 플로우 결합판 — 플로우의 client를 재사용한다. * 일반적인 가상계좌 조회는 secret을 반환하지 않으므로 * `confirmed-without-deposit-secret`을 주문 보류/운영 복구로 처리해야 한다. provider가 * 예외적으로 secret을 보존한 `actually-confirmed`일 때만 §3.1 저장 경로를 재사용한다. * * ⚠ 조회 Err = 진실 미확정 — 성공/실패 어느 쪽으로도 사용자에게 단정 안내하지 말 것. */ resolveFailure(orderId: OrderId, error: ConfirmError): Promise<Result<ConfirmResolution, LookupError$1>>;}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:
./server - Source: GitHub