Skip to content

LiqPay payment settings

Purpose

TBD by human

Identity & key fields

  • Primary key: id (uuid, default gen_random_uuid()).
  • privateKey (nullable text), publicKey (nullable text).
  • paymentId (uuid, NOT NULL, UNIQUE, FK → payments.settings.id, on-delete cascade).

business meaning: TBD by human

Invariants

  • paymentId is UNIQUE → one LiqPay credential row per payment-settings row (enforced in tktspace-backend/libs/shared/data-access-db/src/lib/schema/payments.schema.ts).
  • paymentId ON DELETE CASCADE (enforced in tktspace-backend/libs/shared/data-access-db/src/lib/schema/payments.schema.ts).

business invariants: TBD by human

Lifecycle

No explicit lifecycle.

Relationships

  • Payment settings (ENT-036) — paymentIdpayments.settings.id, UNIQUE, on-delete cascade. 1:1.

API surfaces

SurfaceExposedNotes
clientno — secret credentials
businessyes — managed via libs/features/payments/src/lib/payments-admin.module.ts; rendered through PaymentSettingsResponseDto on the client side as a non-secret summarySwagger UI
super-adminno

Known gotchas / open questions

  • Both keys are nullable in the schema — TBD by human whether the application enforces presence before activation.
  • Stores privateKey in plaintext text — encryption-at-rest TBD by infra.