How we hid payment details so the database itself “wouldn’t know more than it should”
In PDP, we introduced PGP encryption for payment details in the apartment booking system: the data is encrypted at the application layer before being written to the database, and decrypted only when generating the payment link.

In PDP, we introduced PGP encryption for payment details in the apartment booking system. The logic is simple, but effective: the data is encrypted at the application layer before it is written to the database, and decrypted only at one point — when generating the payment link.
So even if someone gets access to the database, they won’t see payment details — just encrypted noise. In an era when data leaks and compliance are back at the top of the agenda, this is no longer a “nice to have”; it’s the baseline.
We strengthened protection with two more layers on top: PostgreSQL TDE for the users table and encryption of TOTP secrets. The result is a solid defense in depth: not one lock on the door, but a full quest for an attacker.
In short: it’s better to spend time on crypto now than later to be having coffee with security folks under very serious circumstances.