Skip to content

CancelPreflightError — @gj-kit/toss-payments

A public type from @gj-kit/toss-payments/server. The signature below is taken directly from the 0.6.1 release declaration.

import { CancelPreflightError } from '@gj-kit/toss-payments/server';
type CancelPreflightError = {
/** 우회해서 서버로 보내면 403 NOT_CANCELABLE_AMOUNT (실측) — API 호출 전에 차단한다. */
readonly source: 'library';
readonly kind: 'amount-exceeds-balance';
readonly cancelAmount: number;
readonly balanceAmount: number;
} | {
readonly source: 'library';
readonly kind: 'expected-amount-mismatch';
readonly expected: number;
readonly actual: number;
} | {
readonly source: 'library';
readonly kind: 'invalid-input';
readonly field: string;
readonly reason: string;
} | {
readonly source: 'library';
readonly kind: 'partial-cancel-not-allowed';
readonly paymentKey: PaymentKey;
} | {
readonly source: 'library';
readonly kind: 'retry-ticket-expired';
readonly issuedAt: string;
} | {
readonly source: 'library';
readonly kind: 'retry-store-failure';
readonly operation: 'save' | 'load' | 'delete';
readonly cause: unknown;
};

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.

  • Package: @gj-kit/toss-payments
  • Version: 0.6.1
  • Public entry: ./server
  • Source: GitHub