Skip to content

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

import { PaymentStateDiff } from '@gj-kit/toss-payments';
interface PaymentStateDiff {
readonly previous: PaymentStateSnapshot;
readonly next: PaymentStateSnapshot;
readonly changed: boolean;
readonly statusChange: PaymentStateValueChange<PaymentStatus> | null;
readonly lifecycleChange: PaymentStateValueChange<PaymentLifecycle> | null;
readonly balanceAmountChange: PaymentStateBalanceChange | null;
readonly lastTransactionKeyChange: PaymentStateValueChange<string | null> | null;
readonly amountStateChange: PaymentStateValueChange<PaymentAmountState> | null;
readonly pendingCancellationChange: PaymentStateValueChange<boolean> | null;
readonly abortedCancellationChange: PaymentStateValueChange<boolean> | null;
readonly cancelableChange: PaymentStateValueChange<boolean> | null;
readonly partiallyCancelableChange: PaymentStateValueChange<boolean> | null;
readonly cancelChanges: PaymentCancelChanges;
readonly warnings: readonly PaymentStateDiffWarning[];
}

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: .
  • Source: GitHub