Skip to content

@gj-kit/toss-payments-postgresql

PostgreSQL stores, migrations, inbox, and encryption seams for @gj-kit/toss-payments.

Current npm latest: 0.5.1

Use it when Toss payment stores need a proven PostgreSQL implementation while your app retains connection lifecycle and key custody.

Do not run migrations on request or application startup, and do not use the plaintext protector in production.

Outcome: PostgreSQL-backed Toss stores with one explicit migration step.

Terminal window
pnpm add @gj-kit/toss-payments-postgresql

Adapt your pool with fromPgPool, use a real encrypted sensitiveValueProtector, and run migration during deployment.

Copy this first, then replace only the app-owned values named above.

import { createTossPaymentsPostgres, fromPgPool, type PgPoolLike, type SensitiveValueProtector } from '@gj-kit/toss-payments-postgresql';
declare const pool: PgPoolLike;
declare const sensitiveValueProtector: SensitiveValueProtector; // App KMS/encryption boundary.
export const stores = createTossPaymentsPostgres({
sql: fromPgPool(pool),
sensitiveValueProtector,
});
// Run await stores.migrate() once in deployment, never per request.

Engines: node >=20

Peer Supported range Required for
@gj-kit/toss-payments `^0.5.0
@nestjs/common `^10
reflect-metadata `^0.1.13
rxjs ^7 documented optional subpaths only
Entry Exported symbols
Root entry 55
./nestjs 14
./testing 30

Use an app-owned KMS or key-management boundary for sensitive values, run explicit migrations once, and keep cleanup operations idempotent.

complete API reference contains every public function, class, type, constant, and error contract generated from release declarations. Each item shows its import path, release signature, and package version.

@gj-kit/toss-payments, @gj-kit/toss-payments-nestjs

npm · GitHub