Skip to content

diffPaymentState — @gj-kit/toss-payments

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

import { diffPaymentState } from '@gj-kit/toss-payments';
/**
* 동일 결제의 두 상태 스냅샷을 비교한다.
*
* 어떤 status 전이도 거부하지 않는다. 식별자가 다를 때만 Err이며, 잔액 증가와 취소
* transaction 제거는 성공 결과의 warnings로 전달한다.
*/
declare function diffPaymentState(previous: PaymentStateSnapshot, next: PaymentStateSnapshot): Result<PaymentStateDiff, PaymentStateIdentityError>;

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