LiqPay payment settings
Purpose
TBD by human
Identity & key fields
- Primary key:
id(uuid, defaultgen_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
paymentIdis UNIQUE → one LiqPay credential row per payment-settings row (enforced in tktspace-backend/libs/shared/data-access-db/src/lib/schema/payments.schema.ts).paymentIdON 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) —
paymentId→payments.settings.id, UNIQUE, on-delete cascade. 1:1.
API surfaces
| Surface | Exposed | Notes |
|---|---|---|
| client | no — secret credentials | — |
| business | yes — managed via libs/features/payments/src/lib/payments-admin.module.ts; rendered through PaymentSettingsResponseDto on the client side as a non-secret summary | Swagger UI |
| super-admin | no | — |
Known gotchas / open questions
- Both keys are nullable in the schema — TBD by human whether the application enforces presence before activation.
- Stores
privateKeyin plaintext text — encryption-at-rest TBD by infra.