WebhookHandlers — @gj-kit/toss-payments
A public interface from @gj-kit/toss-payments/webhook. The signature below is taken directly from the 0.6.1 release declaration.
Verified import example
Section titled “Verified import example”import { WebhookHandlers } from '@gj-kit/toss-payments/webhook';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * 핸들러 키 = 구독 가능한 전체 이벤트. * `onBillingApproved`는 존재하지 않는다 — 토스가 빌링 승인 웹훅을 제공하지 않는다 * (BILLING_DELETED만 존재). approve 반환값 + getPayment 재확인이 완결 신호다. */interface WebhookHandlers { onDepositCallback?: (w: SecretVerified) => void | Promise<void>; onPaymentStatusChanged?: (w: Unverified & { event: PaymentStatusChangedEvent; }) => void | Promise<void>; /** 해외 간편결제 전용. */ onCancelStatusChanged?: (w: Unverified & { event: CancelStatusChangedEvent; }) => void | Promise<void>; onBillingDeleted?: (w: Unverified & { event: BillingDeletedEvent; }) => void | Promise<void>; onMethodUpdated?: (w: Unverified & { event: MethodUpdatedEvent; }) => void | Promise<void>; onCustomerStatusChanged?: (w: Unverified & { event: CustomerStatusChangedEvent; }) => void | Promise<void>; onOrderPaymentStatusChanged?: (w: Unverified & { event: OrderPaymentStatusChangedEvent; }) => void | Promise<void>; onPayoutChanged?: (w: SignatureVerified & { event: PayoutChangedEvent; }) => void | Promise<void>; onSellerChanged?: (w: SignatureVerified & { event: SellerChangedEvent; }) => void | Promise<void>; onArsReservationChanged?: (w: Unverified & { event: ArsReservationChangedEvent; }) => void | Promise<void>; /** 전방 호환 — 새 이벤트가 와도 여기로 흐른다. */ onUnknownEvent?: (w: Unverified & { event: UnknownWebhookEvent; }) => void | Promise<void>;}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.
Release context
Section titled “Release context”- Package:
@gj-kit/toss-payments - Version:
0.6.1 - Public entry:
./webhook - Source: GitHub