What should you know about security and compliance in fintech?
QA turns fintech requirements into checks of visible behaviour, while certifying compliance is for the auditor and compliance team. PCI DSS: the card number is masked and the CVV is stored nowhere, including logs. GDPR: minimal data, consent, individual rights. KYC/AML: limits until verification. SCA: a payment that requires confirmation does not complete without it. Audit: every financial action recorded. A full card number in logs is a defect.
QA Fundamentals · Fintech specifics
A full card number was found in the application logs. Is that a bug or normal?
While analysing an incident a developer opens the logs and sees a full card number with an expiry date in a request line. For an application that accepts payments this is no trifle but a breach of a standard, for which a company can lose the right to work with cards. Fintech lives by rules that demand specific behaviour from a system: what to store, what to mask, whom to verify and what to record. This lesson is about the main requirements (PCI DSS, GDPR, KYC/AML, SCA, audit) and what QA can check from them without a law degree.
How it works and why. Each requirement answers a specific risk. A card gives access to someone else's money, so card data is restricted (PCI DSS). Personal data belongs to a person, so it is collected minimally and the person gets control (GDPR). Money is laundered through financial systems, so customers are verified and suspicious operations tracked (KYC/AML). A payment may be initiated by an attacker, so it is confirmed additionally (SCA, 3-D Secure). A dispute about "who did what" is resolved by a record, so everything is logged (audit). QA does not certify compliance: an auditor and the compliance team do. QA checks behaviour that is visible from outside, that is, that the requirements turn into testable actions.
| Requirement | About | What QA checks |
|---|---|---|
| PCI DSS | Payment card data | The number in the UI, API, logs and DB is masked or absent; CVV is stored nowhere; testing only with test cards |
| GDPR | Personal data (in the EU and for its residents) | Collecting only what is needed, consent and its withdrawal, export and erasure on request, no personal data in logs |
| KYC / AML | The customer's identity and suspicious operations | Restrictions before verification, verification states, monitoring rules, passing suspicious operations for review |
| SCA / 3-D Secure | Extra confirmation of a payment | A payment does not complete without confirmation, a failure and a confirmation timeout are handled |
| Audit | Who did what, when and from where | A record of every financial action and settings change, the log cannot be altered |
Now the substance of each requirement, with what can be said confidently.
PCI DSS applies to everyone who accepts, processes or stores card data. A card number (PAN) may be stored only encrypted or in another unreadable form, and shown only masked: the standard allows the first six and last four digits for those who need it for their job, and for most places in an application that is just the last four. Sensitive authentication data (CVV/CVC, PIN, the full magnetic stripe content) is not stored at all after authorization, even encrypted. This includes logs, dumps, error traces and screenshots. To narrow the scope of the standard, companies often never touch the card number: the input field leads to the provider's page and the system receives only a token.
GDPR requires a lawful basis for processing (consent or a contract), minimisation (collect only what is needed), a limit on how long data is kept and rights for the person: access, correction, erasure. There is a typical trap here: the right to erasure does not cancel the obligation of a financial institution to keep records of operations, set by other law. In practice, after an erasure request the profile is anonymised while operations stay in a restricted form. What exactly to do is decided by compliance, and QA checks that the requirement is implemented as written.
KYC / AML. KYC is customer identification, AML is a set of measures against money laundering: transaction monitoring, sanctions list checks, reporting suspicious operations. For QA this means limits and restrictions for an unverified user, the states of the verification process (submitted, under review, rejected, approved), rules firing on test data (for example, many transfers just below a threshold) and that a trigger is not blocked silently but goes to review. A separate nuance: a customer is usually not told what exactly caused the suspicion, so a message text must not reveal the reason.
SCA and 3-D Secure. Strong customer authentication (SCA) under PSD2 requires two of three factors: something known (a password, PIN), something possessed (a phone, a token) and something inherent (biometrics). For card payments it is usually provided by 3-D Secure: the bank asks for a code or a confirmation in its app. There are exemptions (small amounts, trusted recipients) which are set by a rule, not by QA. The checks: a payment does not reach the charge without confirmation, a failed or skipped confirmation gives Declined or a timeout and leaves no hold, and the amount and recipient shown in the confirmation match the charged ones.
Audit: every financial action and administrative change (a limit, a fee, a role) leaves a record "who, what, when, from where, was-now". The log should be append-only, and the log itself must not contain secrets.
Where a card number can leak
Example: masking from an API response to the logs. The initial server response to a card request returns everything:
// before: the response of GET /cards/card-9
{"id":"card-9","number":"4111111111111111","cvv":"123","expiry":"12/28"}
// after
{"id":"card-9","brand":"visa","last4":"1111","expiry":"12/28"}
There are two violations here: the full number and the CVV in the response. The fixed response has no CVV at all (there was nothing to store), and the number is given as the last four digits only. But the check does not end there: the incoming request that ends up in logs, an error message, a report or a CSV export and analytics events are checked the same way. A practical method: make a test payment with a known test card (for example 4111 1111 1111 1111) and search for it and the CVV in the logs, the database and exports:
# after a test payment with a test card, look for long digit runs in logs
grep -rEn '[0-9]{13,19}' ./logs | head -20
# false positives (ids, timestamps) are filtered by the Luhn check
A finding in logs is a bug with high severity even if the UI is fine. To reproduce, the report does not paste a real number but names the test one, and a log with the leak is not copied into a general ticket.
Limits and alternatives. QA is not a lawyer or an auditor: phrases like "this complies with PCI" or "this breaches GDPR" without compliance are incorrect. The requirements depend on the jurisdiction and the type of product (a shop that passes the card to a provider is one thing, a bank that stores it another), so in an interview it is right to show the level "what I will check", not "what the law demands in detail". Additional requirements worth knowing: test only on test data, do not copy production data to test environments without anonymisation, restrict access to the admin panel by roles, encrypt the connection. Pay attention to testing tools too: a HAR file or a screenshot may contain tokens and numbers, so they are checked before being attached to a ticket.
Common mistakes.
- Checking the mask only on screen: a number in an API response, the logs or an export remains a leak.
- Taking real cards and customer data for tests: that is itself a violation, not compliance.
- Thinking encryption allows storing CVV: after authorization it is not stored even encrypted.
- Confusing the right to erasure with the duty to keep financial records: a compliance decision is needed, not a QA assumption.
- Not checking behaviour on failure: a cancelled or expired 3-D Secure leaves a payment hanging with a hold.
- Pasting a screenshot or a HAR with someone else's tokens or numbers into a ticket: the leak then appears in the tracker.
Check yourself
A payment autotest passed, the UI shows "**** 1111". Is that enough to check the PCI masking requirement?
Answer
No. A mask in the UI does not guarantee that the full number is not in the API response, the logs, the database, exports and analytics events. All these places must be checked: a test card, a search for the digit sequence in logs and responses, a look at the DB fields. A full number found is a defect even with a correct UI.
A user asks to delete the account, and the system has their historical payments. How do you check correct behaviour without being a lawyer?
Answer
Do not invent a rule but check against the compliance requirement. Typically: the profile and contact data are anonymised or deleted, active sessions and tokens are revoked, the history of operations stays in a restricted form from which the person cannot be restored without need. The test checks that behaviour matches what is written and that personal data did not stay in logs and backup exports, which the requirement also describes.