Skip to content

PaymentStateConsistencyIssue — @gj-kit/toss-payments

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

import { PaymentStateConsistencyIssue } from '@gj-kit/toss-payments';
type PaymentStateConsistencyIssue = {
readonly kind: "invalid-amount";
readonly field: "totalAmount" | "balanceAmount";
readonly value: number;
readonly reason: "not-safe-integer" | "negative";
} | {
readonly kind: "balance-exceeds-total";
readonly totalAmount: number;
readonly balanceAmount: number;
} | {
readonly kind: "zero-balance-with-non-canceled-status";
readonly status: Exclude<PaymentStatus, "CANCELED" | "PARTIAL_CANCELED">;
} | {
readonly kind: "cancellation-status-without-history";
readonly status: "CANCELED" | "PARTIAL_CANCELED";
} | {
readonly kind: "canceled-status-with-balance";
readonly balanceAmount: number;
} | {
readonly kind: "partial-status-without-canceled-amount";
readonly totalAmount: number;
readonly balanceAmount: number;
} | {
readonly kind: "partial-status-without-effective-cancellation";
} | {
readonly kind: "paid-status-with-canceled-amount";
readonly totalAmount: number;
readonly balanceAmount: number;
} | {
readonly kind: "full-cancellation-status-mismatch";
readonly status: Exclude<PaymentStatus, "CANCELED" | "PARTIAL_CANCELED">;
} | {
readonly kind: "completed-cancel-status-mismatch";
readonly status: Exclude<PaymentStatus, "CANCELED" | "PARTIAL_CANCELED">;
} | {
readonly kind: "latest-cancel-balance-mismatch";
readonly transactionKey: string;
readonly cancelRefundableAmount: number;
readonly paymentBalanceAmount: number;
} | {
readonly kind: "duplicate-cancel-transaction-key";
readonly transactionKey: string;
};

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