Skip to content

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

import { Unverified } from '@gj-kit/toss-payments/webhook';
/** 나머지 전부 — 이름부터 신뢰 금지. payload를 직접 믿지 말고 refetch로 승격하라. */
interface Unverified {
readonly trust: 'unverified';
readonly event: UnverifiedWebhookEvent;
readonly meta: WebhookMeta;
/** 조회 API 재확인 — Unverified를 신뢰 가능한 Payment로 승격하는 유일한 경로(한 줄, 단언 없음). */
refetch(client: PaymentLookup): Promise<Result<Payment, LookupError | NoPaymentReference>>;
/**
* §3.5 autoRefetch 설정 + 어댑터(fetchHandler/nodeHandler) 경유 시에만 채워짐 —
* undefined = 옵션 꺼짐 또는 수동 verify 경로. Err여도 이벤트는 핸들러에 도달하며,
* 핸들러가 실패를 던지면 어댑터는 claim을 해제하고 5xx로 재전송을 유도한다.
*
* ⚠ trust는 여전히 'unverified'다 — 조회 성공은 웹훅 발신자 진위를 증명하지 않는다
* (위조 웹훅이 실존 orderId를 찍으면 조회는 성공한다, §7-2). payload가 아닌 이 조회
* 결과로 상태를 갱신하라. prefetched 실패 시 payload 폴백은 금물.
*/
readonly prefetched?: Result<Payment, LookupError | NoPaymentReference>;
}

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