Calculations with money are checked in five places: data type, rounding, allocation, currency and display. Money is not computed in float, because 0.1 has no exact binary form; it is stored as integers in minimal units or as DECIMAL. The rounding rule comes from the requirement. Splitting an amount (100.00 into three) must hold an invariant: the parts add up to the whole and differ by at most one kopeck.
QA Fundamentals · Fintech specifics
A 100 UAH bill split between three people adds up to 99.99. Where did the cent go?
A café bill of 100.00 UAH is split between three people. The app shows three payments of 33.33, together 99.99. One kopeck belongs to nobody: not the café, not the guests. On one bill it is a trifle, but on a million operations a day it is a gap in accounting that takes weeks to find. This lesson is about where money "breaks" (number representation, rounding, allocation, currencies, display) and what QA checks in each place.
How it works and why. A computer stores fractional numbers in binary (float, double), and most decimal fractions, 0.1 among them, have no exact binary form. For physics that is fine, for money it is not: the law requires a cent to be a cent. So money is stored and calculated in one of two ways: as integers in the minimal currency unit (kopecks, cents) or as an exact decimal type (DECIMAL in the database, BigDecimal in Java). This is what float does:
0.1 + 0.2// 0.30000000000000004, not 0.30.1 * 3// 0.300000000000000041.005.toFixed(2) // "1.00", not "1.01"Math.round(-2.5) // -2 (while Math.round(2.5) gives 3)
A difference in the seventeenth digit is invisible on screen, because the sum is rounded for display. It shows up in comparisons ("balance >= amount" does not hold), in report totals and in the accumulation over thousands of operations. There is also a transfer trap: if an API returns an amount as a number with a dot, the client parses it as a double and the error comes back. So an amount in JSON is either an integer in minimal units together with a currency code, or a string.
One amount in two representations
Risky
float: 0.1 * 3
The result is 0.30000000000000004. Comparing with 0.3 is false, and a cent-sized difference piles up in reports.
Reliable
integer cents: 10 * 3
The result is 30, exactly. The dot appears only on screen, when the number is formatted for a human.
Figure 1. The same calculation in float and in minimal units: precision is solved by the data type, not by rounding "by eye".
Now what exactly to test. Errors concentrate in five places:
Where it breaks
Sign in a test
What to check
Data type
A cent "appears" or vanishes
Amounts with 0.1, 0.2, 0.7; the sum of many lines; values in the DB and in the API
Rounding
A total differs by a cent from a manual calculation
The rule (up, to nearest, to even) and the step where it is applied
Allocation
The sum of parts differs from the whole
Division by 3, 7, into percentage parts; where the remainder goes
Currency
Extra or missing decimal places
The minor unit by ISO 4217; conversion and the rate
Display
A different look on different screens
Separators, currency symbol, negative amounts, very large numbers
Rounding: the rule and the step. There are several rules. Half-up (0.5 goes up) is familiar from school. Banker's rounding (half-even) rounds a half to the even neighbour, so 2.5 becomes 2 and 3.5 becomes 4, and the systematic drift in totals disappears; it is standard in some banking systems and in many libraries. Which rule applies is set by a requirement or a contract, not by QA. Even more important is the step: round every line of a bill or only the total. The difference shows even in a small example.
The same bill, rounded at different steps
Per line
3 items at 0.15, tax 10%
Tax on one line 0.015 → 0.02. Together 0.06. Bill total 0.51.
On the total
Sum 0.45, tax 10%
Tax 0.045 → 0.05 (half-up). Bill total 0.50.
Figure 2. Both approaches are legitimate, but must give what the requirement says. A cent of difference is multiplied by the number of bills.
Example: splitting 100.00 UAH three ways, from the bug to the fix. The initial logic divides and rounds every part separately: 100 / 3 = 33.333… → 33.33 for everyone. A test with the expectation "the sum of parts equals the whole" fails: 99.99 against 100.00. One kopeck belongs to nobody. The fix works with integer kopecks: everyone gets the base and the remainder is handed out one kopeck at a time:
functionsplit(totalMinor: number, parts: number): number[] {
const base = Math.floor(totalMinor / parts);
const rest = totalMinor - base * parts;
// the remainder goes out one minor unit at a timereturnArray.from({ length: parts }, (_, i) => base + (i < rest ? 1 : 0));
}
split(10000, 3); // [3334, 3333, 3333], the sum is exactly 10000
Now the sum matches by construction, and the test checks exactly the invariant: for any amount and any number of parts the sum of parts equals the whole, and parts differ by at most one kopeck. One such test with a set of values (100.00 by 3; 0.01 by 2; 0.02 by 3; 1,000,000.00 by 7) catches a whole class of errors. A few boundary cases that matter for money: 0.00 (is it allowed), 0.01 (the minimum), the maximum from the requirement, and crossing the integer type limit: 2,147,483,647 kopecks is 21,474,836.47 UAH, and at exactly such an amount a 32-bit integer overflows. Negative values (refunds, adjustments) are a separate class too, because Math.round(-2.5) gives -2, not -3, and the rounding rule for minus is easy to break.
Currencies. The number of decimal places depends on the currency: the hryvnia and the dollar have two, the yen zero, the Bahraini dinar three (ISO 4217). So "always two places" is wrong, and a check of "100.5 JPY" must reject or round it by the rule. In a conversion the rate has many decimal places; the right order is to compute with full precision and round once at the end, not at intermediate steps. Separately it is clarified at which moment the rate is fixed: at payment creation or at charging (more in the lesson about payment risks).
Limits and alternatives. Float is not forbidden everywhere: for analytics, charts and estimates an error in the seventeenth digit does not matter, and a ban there would be excessive. The rule concerns money that moves, is stored and is shown as a debt or a balance. Alternatives to integer kopecks: decimal types of the language (BigDecimal, decimal) or libraries such as Decimal.js; the team chooses, and QA checks that the chosen solution is in place everywhere from the UI to the DB, because one float link spoils everything. If the requirement says nothing about the rounding rule, that is a question for the analyst, not a place for your own assumption.
Common mistakes.
Checking only "nice" amounts like 100.00 and 250.00: errors live in 0.1, 0.7, 19.99 and in sums that divide with a remainder.
Comparing the result with the expected value in a test through float: the test itself introduces the error. Expectations are set in kopecks or as a string.
Looking only at the screen: display rounds, and an extra cent is visible only in the API response, in the DB or in a report.
Not asking about the rounding step: two "correct" results differ by a cent, and the argument goes on without a requirement.
Forgetting negative amounts and refunds: rounding behaves differently there.
Assuming two decimals for all currencies: the yen, the dinar and cryptocurrencies have other rules.
Check yourself
An order of 0.10 + 0.20 UAH. An autotest compares total === 0.3 and fails, although the screen shows "0.30 ₴". Is it a product bug or a test bug, and what do you do?
Answer
Most likely the product calculates in float while the screen shows a rounded value. It is a product bug, and the test only exposed it. The fix: calculate in kopecks or DECIMAL, and in the test expect 30 kopecks. If the API response contains 0.30000000000000004, we see the same problem at the contract level.
An amount of 100.00 UAH is divided between three recipients and the system returns 33.33 + 33.33 + 33.33. What else besides the sum do you need to ask and check?
Answer
Who gets the remainder of 0.01 by the requirement (the first, the last, a random one, a separate account), whether this choice is stable on a repeat, whether a kopeck is lost with other divisions (7, 0.02 by 3). The invariant: the sum of parts equals the whole, and parts differ by no more than 0.01.
Related lessons: “What are the typical risks in payment scenarios?”, “What is boundary value analysis?”, “What are equivalence classes?”, “How would you test a money transfer between cards?”.
In an interview.Junior: Money must not be calculated in float, because 0.1 + 0.2 does not equal 0.3. It is stored as integer kopecks or as a decimal. I check rounding, the number of places for each currency, that an allocation adds up to the kopeck, and that display is right, including negative amounts. Middle/Senior: I check invariants, not single examples: the sum of parts equals the whole, a total matches in the UI, the API and the DB. I separately ask for the rounding rule and the step where it applies, because per line and on the total the result differs by a cent. I take boundary amounts: 0.01, the maximum, 32-bit integer overflow, negative values, currencies with 0 and 3 places. If the requirement is silent about rounding, that is a question for the analyst, not my assumption.
What states does a payment have and what do you test in them?
A payment moves through Created, Pending, Authorized, Captured and Settled, while the branches Declined, Voided and Refunded end it differently. Authorized only holds the amount, Captured charges it. A timeout is not a decline: the state stays Pending until the outcome is established by reference or webhook. Tests cover allowed and forbidden transitions, the balance at each step, duplicate and out-of-order webhooks, and the cap on partial refunds.
QA Fundamentals · Fintech specifics
The provider did not answer within 30 seconds. Did the payment go through or not?
A user presses "Pay", the screen spins, the provider is silent. The system decides the payment failed and offers to try again. The user presses it, but the first request had reached the bank and the money was already held. Now the bank has two charges while the system has one failed payment. This lesson is about which states a payment goes through, why there are several and what to test in each, so that such gaps do not appear.
How it works and why. A card payment is not one action but a chain between several parties: our system, the payment provider, the card network and the card's issuing bank. Every step is separate, asynchronous and can end differently, which is why a payment has states. A typical path:
Created: the payment is created in our system, nothing has been sent.
Pending: the request went to the provider, no answer yet.
Authorized: the bank confirmed the money is there and held the amount on the card. This is not a charge yet.
Captured: we confirmed the charge, the held amount becomes a spend.
Settled: the money really reached the recipient, usually later, in a batch.
Branches: Declined (a refusal by the bank or provider), Voided (cancelling an authorization before the charge), Refunded (a return after the charge, full or partial). Names differ between providers while the principle stays: every state says what has already happened to the money and what has not. The split into authorization and capture exists because otherwise you cannot back out of an order when the goods are out of stock: a hold can be released without a charge.
Payment states and the main transitions
Figure 1. The main path on top, branches downwards. There is no way back from Settled to Captured: a refund is a separate payment in the opposite direction.
The user's balance also changes step by step. An example for a balance of 1,000 and a payment of 100 (simplified, real banks show it differently):
State
Available
Held
What the user sees
Created, Pending
1,000
0
"Processing"
Authorized
900
100
The amount is reserved
Captured
900
0
Charged 100
Voided or Declined
1,000
0
The money is back in place
Refunded
1,000
0
Returned
There are two invariants to check at every step: available plus held plus charged keep the total unchanged, and after a cancellation or refusal the held amount really gets released. A typical bug caught this way: after Declined part of the amount stays held.
Example: a timeout and an unknown result. The most dangerous state is not Declined but the one where there is no answer. The initial version treats a timeout as a refusal. The right one treats it as unknown and finds out the fact:
POST /payments {"reference":"ord-1042","amount":10000,"currency":"UAH"}
→ timeout 30 s, no response
Before: the system sets Failed, the user presses "Pay" again
→ a new payment ord-1042-2, two charges of 100.00 at the bank
After: state Pending (the result is unknown), no repeated charge
GET /payments?reference=ord-1042 → {"status":"authorized"}
→ Authorized, then the usual path to Captured
What is checked here. A timeout does not set Failed but leaves Pending. A repeated attempt by the user does not create a second payment with the same intent (idempotency, more in the lesson about idempotency). The status is found by a request to the provider by reference, or by a webhook, and the state moves by fact. For QA this is a separate case: emulate a slow response or a dropped connection (in the provider mock, with throttling or a delay), then check the state, the balance and the number of payments.
The second kind of checks is forbidden transitions and the order of events. Provider webhooks can arrive twice, late and out of order: "captured" before "authorized". The system must reject a move backwards (the state does not roll back) and not charge a second time. A minimal set of negative cases: Declined → Captured, Voided → Captured, Captured → Authorized, a repeated webhook of the same state, a refund larger than the charge, a refund of a payment that is still Authorized. For partial refunds, the sum of all refunds does not exceed the charge: 30 + 80 from a payment of 100 gives a refusal for the second.
Limits and alternatives. Real providers add states: waiting for 3-D Secure (the user has not confirmed yet), Expired (the authorization was not captured in time and lapsed after a period set by the issuer and the provider), Disputed (a chargeback, when the cardholder disputes the charge). These are separate flows with their own rules, which stay in the provider's documentation, so the first QA step on a new project is to draw the state diagram from the docs and compare it with the code. Payment states can be tested as state transition testing (a transition table) or end to end, but forbidden transitions are checked only at the API or service level, because the interface simply does not offer them. Some systems keep several status fields (payment status, settlement status, refund status), and then their combinations are tested, not one field.
Common mistakes.
Testing only "successful" and "declined": most bugs live in timeouts, repeats and event order.
Checking the status in the UI and not looking at the balance: the UI says "Paid" while the hold has not been released.
Assuming a payment always leaves Pending on its own and not checking what happens if the result never comes: a payment needs a lifetime and a way to a final state.
Checking transitions only through the interface: invalid calls are possible only in the API, which is where to try them.
Not checking notifications: the user receives "Payment confirmed" before the actual Captured, or nothing after Declined.
Check yourself
The provider sent a "captured" webhook twice for one payment, and the database has two charge records. What is wrong and how do you check it with a test?
Answer
Webhook handling is not idempotent: the event should be keyed by event or payment id and a repeat ignored. The test: send the same webhook twice and check that there is one charge, the balance changed once and there is one notification.
A payment of 100 is Authorized. The user cancels the order, and then a request to refund 100 appears. Which state is right for the cancellation and why not Refund?
Answer
The right one is Void (cancelling the authorization): the money has not been charged, so releasing the hold is enough. Refund applies to money already charged and is a separate movement back, sometimes with a fee or a delay. The test checks that after Void the available balance returned and that Refund for such a payment is rejected.
Related lessons: “What are the typical risks in payment scenarios?”, “What is state transition testing?”, “What is idempotency and why test it?”, “What is reconciliation and how do you test it?”.
In an interview.Junior: A payment goes through states from creation via authorization and capture to settlement, with branches for decline, cancellation and refund. I check that all allowed transitions work and the forbidden ones are rejected, that the balance is right at every stage and that the user gets correct messages. Middle/Senior: I give the most attention to uncertainty: a timeout does not mean a refusal, so the state must stay Pending until the fact is established by reference or a webhook. Webhooks can repeat and arrive out of order, so I check idempotent handling and the ban on rolling a state back. Partial refunds must not exceed the charge. I also reconcile the payment with the provider, because our state can drift from the bank's.
What are the typical risks in payment scenarios?
Typical payment risks come down to three causes: a repeated request, concurrency and an uncertain outcome. The defences are an idempotency key, an atomic debit or row lock, and establishing the status by reference. A race is reproduced only with parallel requests and judged by the final state, not the responses; a button disabled on the client is no protection. The key is created once per intent and reused on retries.
QA Fundamentals · Fintech specifics
Two clicks on "Pay" and the card was charged twice. How do you check this?
A user presses "Pay", nothing happens, and they press again. Or the network drops after the request is sent, and the app retries it automatically. Or the user opens the same payment in two tabs. In all three cases two identical requests reach the server, and the question is one: will the system charge the money twice. This lesson is about where the typical risks of payment scenarios come from, what they have in common and how to reproduce them with a test instead of waiting for a user to do it in production.
How it works and why. Most risks come down to three causes. The first is a repeated request (a double click, the Back button, an automatic retry by the client or a gateway). The second is concurrency, when two requests run at the same time and read the same data. The third is an uncertain result, when we do not know whether the request arrived. Each has its own protection: an idempotency key (a repeat of the same intent does not create a second operation), an atomic update or a row lock (the check and the write are not torn apart) and finding out the fact by reference or by reconciliation (instead of an assumption). Protection on the client, for example a disabled button, lowers the chances but guarantees nothing: a request can be sent from another tab, from Postman or by a library retry.
A race is the least obvious, because it is not reproduced by a click, only by two requests at one moment. The classic case: the balance is 100, there are two transfers of 80. Both requests read the balance, both see that 100 is enough, both write 20.
A race of two transfers on one balance
Figure 1. The check "is there enough" and the write of the new balance are torn apart in time, so the second request acts on stale data.
Hence the first conclusion for tests: such an error is not reproduced by sequential requests, parallel ones are needed. The second: the right fix is not "check once more" but to make the check and the charge one atomic step (a conditional update like "decrease the balance if it is not less than the amount", or a row lock in a transaction).
Here are the main risks and how to reproduce them:
Risk
How to reproduce
What we expect
Double charge
A double click, a repeat of the same request, the Back button after payment
One operation, one charge, one notification
A race
Two parallel requests for a balance that is enough for one
One success, one refusal, the balance is not negative
A drop after sending
Offline or a delayed response in DevTools, a provider mock with a timeout
State Pending, not Failed; a repeat does not duplicate
Limits
Operations exactly at the limit, 0.01 above it, after many small ones
The boundary is handled as the requirement says, not "roughly"
Time zones
An operation at 23:59:59 and at 00:00:01, a clock change, a change of the user's zone
The "day" for a limit is defined unambiguously
Currencies
A payment in a currency other than the account's, a rate that changes between steps
The rate and the time it is fixed are defined, the shown amount equals the charged one
Example: from a duplicate to idempotency. Initially a repeated request creates a second transfer: a test that calls POST /transfers twice with the same body sees two records and two charges. The fix adds an idempotency key: the client generates a unique Idempotency-Key for each intent, and the server stores the result of the first processing. The Idempotency-Key header is described in an IETF draft and supported by many payment APIs, but the exact behaviour depends on the product, so we check it against the contract:
POST /transfers Idempotency-Key: 7c1e-0001
{"from":"acc-1","to":"acc-2","amount":8000,"currency":"UAH"}
→ 201 {"id":"tr-77","status":"completed"}
POST /transfers Idempotency-Key: 7c1e-0001 (same key and body)
→ the response about tr-77, no new operation
POST /transfers Idempotency-Key: 7c1e-0001 (amount: 9000)
→ an error, not a second transfer
There are three checks here, not one: a repeat with the same key and body returns the same response without a new charge; the same key with a different body is rejected, because it is a different intent; a new key means a new operation. A key the client generates for every attempt gives no idempotency, and that is a frequent mistake: the key is created once per intent and repeated on a retry.
A race is checked at the API level, because an interface cannot send two requests at once. Any client with parallel requests will do; here is a sketch with Playwright APIRequestContext (different keys, because the balance is under test, not a repeat):
// balance of acc-1 is 100.00, each transfer is 80.00const send = () =>
request.post('/transfers', {
headers: { 'Idempotency-Key': crypto.randomUUID() },
data: { from: 'acc-1', to: 'acc-2', amount: 8000, currency: 'UAH' },
});
const res = awaitPromise.all([send(), send()]);
const codes = res.map((r) => r.status()).sort();
// expected: one success and one refusal for insufficient funds// (the exact refusal code comes from the API contract)
The test is run several times, because a race does not show up every time. After that you check not only the responses but also the state: the balance is not negative and the journal has exactly one charge.
Limits and alternatives. A parallel test does not prove the absence of a race, it only raises the chance of seeing one; resilience comes from atomic operations in the code, so it helps to read the code or ask developers how it is built. Load tools (k6, JMeter) give more concurrency than one script. For time boundaries you do not wait for midnight but replace the clock (in Playwright that is the Clock API, in API tests a test-environment parameter or the time in the data). For time zones the question is always the same: is a "day" by server time, user time or UTC; on a daylight-saving change a day lasts 23 or 25 hours. For the rate: fixing it at creation gives the user a predictable amount, fixing it at charging is more accurate for the bank, and the requirement must say which applies.
Common mistakes.
Checking protection only with a disabled button: a server without idempotency will still double a request from Postman or after a retry.
Testing a race with sequential requests: they always pass correctly.
Checking only the response: after a duplicate the response is "OK" while the balance was charged twice. Look at the state in the DB or the history.
Taking a limit boundary "roughly": errors by ±1 kopeck and at the day boundary are the most frequent.
Setting the system time by hand on a test environment and not restoring it: the test leaves unreliable data for others.
Assuming a timeout is a failure: see the lesson about payment states.
Check yourself
A test calls POST /transfers twice sequentially for a balance of 100 (80 each): the first succeeds, the second is rejected. Does this prove there is no race?
Answer
No. Sequential requests do not overlap in time, while the error appears when both read the balance before the first one has written the new one. Parallel requests, several runs and a check of the final state are needed: the balance is not negative, there is one charge.
The client generates a new Idempotency-Key on every retry. Does that protect from a duplicate if the first attempt reached the server but the response was lost?
Answer
No. For the server these are two different intents, and it will execute both. The key must be created once per intent (one payment) and repeated in all retries. The test: send two requests with the same key and body and check one operation, then the same key with a different amount and check a refusal.
Related lessons: “What is idempotency and why test it?”, “What states does a payment have and what do you test in them?”, “What should you check in calculations with money?”, “How would you test a money transfer between cards?”.
In an interview.Junior: The main payment risks: a double charge (a double click, a repeated request), races with parallel transfers, a connection drop in the middle of an operation, limits at the day boundary, time zones and the moment the rate is fixed. I check a double click and two tabs with the same transfer in every payment scenario. Middle/Senior: I reduce them to a repeat, concurrency and uncertainty and look for a server-side protection for each: an idempotency key, an atomic charge, finding the status by reference. I reproduce a race with parallel requests with different keys and look at the final balance, not at the responses. I test time boundaries with a replaced clock, including the daylight-saving change, and take limits at the boundary, 0.01 above and below. I do not count client-side protection as protection.
What is reconciliation and how do you test it?
Reconciliation compares our operations with provider or bank data by a shared key to find differences in operations, amounts, statuses and duplicates. It is needed because data in a distributed system does not match instantly. Tests check each difference lands in one class and the total gap is fully explained by exceptions, plus a repeated run, the day boundary with a waiting window, and duplicates.
QA Fundamentals · Fintech specifics
We have 1,000 payments, the bank has 998. Where are the two?
At the end of the day a finance person compares the payment register in the system with a bank statement or a payment provider's file. The totals should match, but they do not: one system has operations that the other lacks, somewhere an amount differs, somewhere the same operation appears twice. If nobody knows about a difference, the money is simply lost, and a month later it is searched for among thousands of rows. This lesson is about what reconciliation is, why differences appear even without "bad" code and what exactly QA tests.
How it works and why. Reconciliation is a comparison of two (sometimes three) sources of truth about the same operations: our system, the provider, the bank. It is needed because the system is distributed: a payment goes through several parties, requests get lost, webhooks arrive late, the provider groups settlements into batches and deducts a fee. Even when everyone works correctly, the data does not match instantly. So reconciliation is run regularly (daily or more often), instead of hoping it will never diverge.
The mechanism is simple. Take the provider's file or API statement, match each row with our record by a shared key (usually a reference or the provider's transaction id), then compare the amount, currency, status and date. The result is sorted into classes, and each has its own route:
How reconciliation sorts operations
Figure 1. An operation falls into exactly one of four classes. A difference cannot vanish: it goes into a report or a queue for manual review.
The reasons for differences are usually these: an operation is only ours (a timeout, the provider did not process it, the request did not arrive), only the provider's (we did not get a webhook, a write error), a different amount (a fee, rounding, an input error), a different status (we have "captured", the bank has "refunded"), a duplicate (a repeated file delivery, a repeated payment). So not only the match is tested but each of these classes.
Example: from files to a report. There is the data of our system and a provider file for a day:
On the surface the difference is 109.55, but reconciliation breaks it down into concrete rows. The expected report:
Matched: ord-1001, ord-1002
Different amount: ord-1003 (75.50 ours, 75.05 provider, -0.45)
Only ours: ord-1004 (20.00, -20.00)
Only in provider: ord-1006 (30.00, +30.00)
Duplicate in file: ord-1005 (extra +100.00)
Sum check: 30.00 + 100.00 - 20.00 - 0.45 = 109.55 = 455.05 - 345.50
The last line is important: the difference in the total must be fully explained by the list of exceptions. If after all the explanations a kopeck is left, reconciliation is missing something. This is a good automatic invariant for a test. This example also shows different types of errors: 75.50 against 75.05 is a swap of digits (a write or input error), ord-1004 could have been lost to a timeout, and ord-1005 is a duplicate in the file that should not be counted twice.
It is useful for QA to know how to run this check by hand. The query below finds unmatched rows and different amounts (status and currency are added to the WHERE the same way), but not duplicates, because a duplicate in the file is matched with the same row of ours and the amount is the same in both copies. So duplicates are caught by a separate query:
SELECTCOALESCE(o.ref, p.ref) AS ref, o.amount AS ours, p.amount AS provider
FROM our_payments o
FULLOUTERJOIN provider_rows p ON p.ref = o.ref
WHERE o.ref ISNULLOR p.ref ISNULLOR o.amount <> p.amount;
-- duplicates are NOT visible above: both copies match the same rowSELECT ref, COUNT(*) FROM provider_rows GROUPBY ref HAVINGCOUNT(*) > 1;
If the DBMS does not support FULL JOIN (MySQL does not have it), two LEFT JOINs are combined with UNION instead.
What is tested in reconciliation itself, besides sorting into classes:
A repeated run: a second reconciliation of the same data does not create duplicates in the exceptions queue and does not "close" old ones.
The day boundary: an operation at 23:59 on our side and at 00:01 at the provider (another time zone or a delay) must not become a permanent exception. There is a waiting window for those.
Aggregation: one provider payout consists of many payments minus a fee. Reconciliation sums the batch and compares it with the payout, rather than finding "extras".
Files: an empty file, a header only, another encoding, a corrupted row, a large volume, unusual characters in fields.
An exception's life: it goes into a queue, has an owner, a status and an age; a resolved exception does not return.
Permissions: who can close an exception or make a correcting entry, and whether a trace remains in the audit log.
Limits and alternatives. For money the tolerance is normally zero: "roughly matches" is unacceptable, and only known differences (a fee) are explained by a rule. For time there is a tolerance: a payment late in the evening can land in the next day's file, and reconciliation must know it. There is two-sided reconciliation (we and the provider) and three-sided (a bank statement too), and also real-time reconciliation against a batch daily one. Automatic reconciliation does not remove the manual one: some exceptions need a human, for example whether to write to the customer or refund. There is also an internal version: differences between our balance and the sum of all entries in the ledger (internal reconciliation), which is tested the same way, at the invariant level.
Common mistakes.
Checking only a perfect match: the most valuable thing reconciliation does is find differences.
Ignoring duplicates and empty data: "found everything" really means a file with a repeat was not checked.
Checking only the amount and not the status: a payment can match by money while we have "captured" and the bank has "refunded".
Not checking a repeated run: a second pass breeds copies or wipes out the previous review.
Taking test files with clean data only: real files have another encoding, extra spaces, total rows.
Treating "a difference of one kopeck" as a trifle: such a difference is most often a sign of rounding.
Check yourself
A FULL OUTER JOIN query by ref shows zero differences, but the totals of our payments and the provider file differ by 100.00. What do you check?
Answer
Duplicates: if a provider row repeats twice, both copies match the same row of ours and the amount is identical. Check GROUP BY ref HAVING COUNT(*) > 1 in the provider file. There can also be rows with a different currency or status that a query by amount does not show.
An operation at 23:59:30 is in our register, but the provider file for that day lacks it, while it is in the file of the following day. Is it a difference or not, and how do you reflect it in a test?
Answer
It is an expected delay, not an error, if it fits the window set by the requirement. Reconciliation must neither close it as a match nor escalate it at once as a loss, but hold it in a waiting state. The test: an operation on the day boundary appears among exceptions only after the window ends and disappears when it arrives in the next file.
Related lessons: “What states does a payment have and what do you test in them?”, “How do you use SQL to verify data?”, “What kinds of JOIN are there?”, “What should you check in calculations with money?”.
In an interview.Junior: Reconciliation compares our operations with the bank's or provider's data. I test not only a full match but also differences: an operation in only one system, different amounts or statuses, duplicates. The main thing is that every difference lands in a report for review and does not vanish. Middle/Senior: I check that every operation falls into exactly one class and that the total difference is fully explained by the list of exceptions: an invariant that can be automated. Separately I test a repeated run (no duplicates in the queue), the day boundary and the waiting window, batch payouts with a fee, duplicates in the file and nasty files (empty, another encoding). SQL with FULL JOIN finds differences but not duplicates, so I check duplicates with a separate query. I also look at who can close an exception and whether a trace remains in the audit.
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
Figure 1. Every place must be checked, not only the screen: each has its own team and its own way of logging.
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.
A log line from a test payment
2026-11-12T10:41:07.512Z INFO http POST /payments 201 38ms
2026-11-12T10:41:07.513Z 1DEBUG payments request body={"card":{"number":"24111111111111111","expiry":"12/28","cvv":"3123"},"amount":10000,"currency":"UAH"}
Body in the log: the DEBUG level and the whole request body: the logger writes everything it receives.
Number: the full card number (a test one here) is readable in the log as plain text.
CVV: CVV is not stored anywhere after authorisation, and that includes logs.
What to do
File a bug with high severity (the report names only the test number). The fix: do not log a request body with card fields, write the brand and the last four digits instead; do not write CVV at all.
Figure 2. A log line with a leak: where it is, what it shows and why it is a bug.
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.
Related lessons: “How do you test authentication and authorisation in an API?”, “What are the typical risks in payment scenarios?”, “What data must not be passed to AI tools?”, “How do you use DevTools in testing?”.
In an interview.Junior: I know the basic requirements: under PCI DSS a card number is masked and CVV is stored nowhere, even in logs; GDPR protects personal data; KYC and AML verify customers and operations; audit records all financial actions; 3-D Secure confirms a payment. As QA I check this at the behaviour level: in the UI, in API responses and in logs. Middle/Senior: I do not certify compliance, I turn requirements into checks: I make a test payment with a known card and search for its number and CVV in the response, logs, database and exports, check the limits of an unverified user, a refusal and a 3-D Secure timeout without a hanging hold, an audit record with was-now. Questions at the edge of law, for example erasure of data against the duty to keep records, I pass to compliance and check that what they decided is implemented. In reports I never paste real data.