콘텐츠로 이동

BillingKeyRecord — @gj-kit/toss-payments

@gj-kit/toss-payments/server에서 공개하는 interface입니다. package version 0.6.1의 release declaration을 그대로 표시합니다.

import { BillingKeyRecord } from '@gj-kit/toss-payments/server';
/**
* 영속화 경계 — 여기서만 raw 쌍(customerKey + billingKey)이 보인다.
*
* ⚠ 토스의 빌링 보안 모델은 이 쌍의 분리에 의존한다("빌링키가 노출되어도 매핑된
* customerKey를 모른다면 결제가 불가능합니다" — 빌링 가이드). billingKey와
* customerKey를 같은 로그에 함께 남기지 말 것.
*/
interface BillingKeyRecord {
readonly customerKey: string;
readonly billingKey: string;
/** 응답 원문 한글 리터럴 — 요청 enum(CARD/TRANSFER)과 비대칭. */
readonly method: '카드' | '계좌이체';
/** 발급 응답의 authenticatedAt. */
readonly issuedAt: string;
readonly card: {
readonly issuerCode: string;
readonly number: string;
readonly cardType: '신용' | '체크' | '기프트' | '미확인';
readonly ownerType: '개인' | '법인' | '미확인';
} | null;
/** 퀵계좌이체 발급 — 배열이다(응답 원문 구조). */
readonly transfers: readonly {
readonly bankName: string;
readonly bankAccountNumber: string;
}[] | null;
}

이 선언은 매개변수, optionality, 제네릭, 반환값, 공개 union/type 계약의 정본입니다. 호출 전 필요한 환경·권한·오류 경계는 패키지 Golden path와 이 subpath의 import 조건을 함께 확인하세요.

  • 패키지: @gj-kit/toss-payments
  • 버전: 0.6.1
  • 공개 entry: ./server
  • 소스: GitHub

영속화 경계 — 여기서만 raw 쌍(customerKey + billingKey)이 보인다.

⚠ 토스의 빌링 보안 모델은 이 쌍의 분리에 의존한다(“빌링키가 노출되어도 매핑된 customerKey를 모른다면 결제가 불가능합니다” — 빌링 가이드). billingKey와 customerKey를 같은 로그에 함께 남기지 말 것.