Skip to content

DepositSecretStore — @gj-kit/toss-payments

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

import { DepositSecretStore } from '@gj-kit/toss-payments/server';
/**
* 가상계좌 secret 저장소 — 웹훅 `DepositSecretSource`(getSecret)의 상위 타입 (설계 §3.1, G1).
*
* 한 객체로 confirm측 자동 저장(`ConfirmFlowOptions.depositSecrets`) + 웹훅측 대조
* (`WebhookVerifierConfig.depositSecrets`) 양쪽을 1회 배선한다 — 저장(README 수동 한 줄)과
* 조회(웹훅 config)가 다른 파일에 흩어져 저장 누락 → DEPOSIT_CALLBACK 전부 unknown-order
* 거부가 되는 사고를 구조로 막는다.
*/
interface DepositSecretStore extends DepositSecretSource {
/**
* upsert 시맨틱 계약 — 기존 수동 저장과 병용해도 이중 저장이 무해해야 한다.
* (getSecret(orderId): Promise<string | null>은 DepositSecretSource에서 상속 —
* 기존 WebhookVerifierConfig.depositSecrets에 그대로 전달 가능, 파괴 없음.)
*/
saveSecret(orderId: OrderId, secret: string): 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.

  • Package: @gj-kit/toss-payments
  • Version: 0.6.1
  • Public entry: ./server
  • Source: GitHub