Skip to content

CancelOutcome — @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.

import { CancelOutcome } from '@gj-kit/toss-payments/server';
interface CancelOutcome {
/** 전액 취소여도 status 'CANCELED' 단정 금지 — 부분취소 이력이 있으면 PARTIAL_CANCELED 유지(실측). */
readonly payment: Payment & {
readonly status: 'CANCELED' | 'PARTIAL_CANCELED';
};
/** 이번 취소 건. ABORTED는 CancelError로 분리되므로 성공 outcome에는 들어오지 않는다. */
readonly cancel: CancelTransaction & {
readonly cancelStatus: 'DONE' | 'IN_PROGRESS';
};
/** 완전 취소 판정의 유일한 기준: balanceAmount === 0. status로 판정하지 않는다. */
readonly fullyCanceled: boolean;
/** cancelStatus === 'IN_PROGRESS' (PayPal 등 해외 비동기) → CANCEL_STATUS_CHANGED 웹훅 대기. */
readonly pending: boolean;
/** 실제 사용된 키 (자동 생성분 포함). */
readonly idempotencyKey: IdempotencyKey;
}

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