Skip to content

createTossClient — @gj-kit/toss-payments

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

import { createTossClient } from '@gj-kit/toss-payments/server';
/**
* 오버로드로 키 종류가 각인된다 — 위젯 상점의 confirm은 gsk 필수(키 쌍 규칙, 불일치 시
* INVALID_API_KEY — 400인 점 주의). 빌링 플로우는 'api' KeyKind만 받는다.
*/
declare function createTossClient<E extends Env>(key: ApiSecretKey<E>, options?: TossClientOptions): TossServerClient<E, 'api'>;
declare function createTossClient<E extends Env>(key: WidgetSecretKey<E>, options?: TossClientOptions): TossServerClient<E, 'widget'>;

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