Last year a friend almost wired a rental deposit to a fraudster. The invoice looked right, the IBAN was copied from an email, and the bank app accepted it without a murmur. Nothing in the flow asked the one question that would have saved them: does this account belong to the person I think I'm paying?
That question is now a legal requirement, and the next wave of EU rules also decides who pays when the answer is ignored. I build payment backends for a living, so this post is the version I wish I had when the compromise texts landed: first the plain explanation, then the architecture, then the code.
Part 1: The idea in plain words
Let me define the terms before I use them.
IBAN (International Bank Account Number): the long account identifier used for European transfers.
PSP (Payment Service Provider): a bank, payment institution or e-money company that moves money for customers.
PSD3 (Payment Services Directive 3): the third generation of the EU directive that licenses and supervises payment…