Scrivio Interview library
ScenarioAdvanced6 min read · updated 12 November 2026

Finance reports that your payment records and the provider's settlement reports disagree for about 0.1 percent of transactions each month. As the architect of the payments platform, how would you investigate and fix the process?

I would first classify the 0.1 percent of differences: missing on our side, missing on the provider's side, amount or currency mismatches, and timing differences across days. Then I would look for the usual causes, payments stuck in unknown states after timeouts and webhooks lost or processed twice. The process fix is an automated daily reconciliation with matching rules, exception queues and owners, and the root-cause fixes are persisting state before calling providers, idempotent webhook handling and status queries for unknown outcomes, with the exception rate reported as a metric against a target.

Why this question is asked

A 0.1 percent mismatch sounds small, but at 2 million transactions a month it is 2,000 payments that finance cannot explain, some of them customers charged without an order and some orders shipped without money. Finance usually discovers these by hand at month end, long after the cause is hard to trace. Interviewers ask this scenario to see whether an architect can turn a vague data-quality complaint into categories, causes and a lasting process. In this answer, we will classify the differences, trace the technical causes behind each category, build an automated reconciliation process, fix the root causes in the platform, and make the exception rate a measured target.

1Classifying the Differences

The first step is to stop treating the 0.1 percent as one problem. I would take a full month of mismatches and sort each one into a category, because each category has different causes and owners. Typically there are four.

Missing on our side means the provider settled a transaction that we have no successful record of: the customer was charged, and we may not have fulfilled the order. Missing on the provider's side means we recorded success but the provider has no settled transaction: we may have shipped without being paid. Amount or currency mismatches mean both sides have the transaction but disagree on the value, often because of partial captures, fees or currency conversion. Timing differences mean the transaction exists on both sides but on different dates, for example a payment at 23:58 in our time zone that the provider settles on the next day in UTC.

Categories of mismatch and where to look
CategoryTypical shareLikely causes
Timing across daysabout halftime zones, settlement cut-off, late capture
Missing on our sideabout a quartertimeouts left unknown, lost webhooks, crashes
Missing at providersmallerrecorded success on a timeout, voided auth
Amount or currencysmallerpartial captures, refunds, fees, FX conversion
Illustrative shares; the real ones come from classifying a month of data.

2Separating Timing From Real Differences

Timing differences are usually the largest category and are not errors at all. If our report uses local midnight and the provider's settlement file uses a UTC cut-off, or a payment is authorised on Monday and captured on Wednesday, the same transaction appears on different days. Matching by provider reference across a window of several days, rather than within one calendar day, removes most of them. What remains after that are the real discrepancies, and that is the number worth reporting.

3Tracing the Technical Causes

For the real discrepancies I would pick twenty of each category and trace them through logs and the payment's event history. A few patterns usually explain most of them.

Payments stuck in an unknown state: our call to the provider timed out, we marked the payment failed (or left it pending), but the provider had in fact charged the card. These appear as missing on our side. Lost webhooks: the provider notified us of a capture or refund, our endpoint returned 500 during a deployment, and the provider gave up after its retries. Duplicate webhook processing: the same refund notification was processed twice and recorded two refunds, producing an amount mismatch. Crashes between charging and saving: the code charged the card first and saved afterwards, so a crash left a charge with no record. And manual actions in the provider's dashboard, such as a refund issued by support, that never flowed back into our system.

Step throughHow a timeout creates a mismatch
Payment serviceProviderSettlement file
charge 49.99
charge succeeds, reply is slow
timeout after 10 s: mark FAILED
next day: charge settled
reconciliation: settled, but our record says FAILED

5 messages in order. Play them, or step through them one at a time.

The customer was charged; our record says the payment failed.

4Making Reconciliation an Automated Daily Process

Month-end spreadsheets find problems too late. I would build a daily reconciliation job that loads each provider's settlement file, matches lines to our payments by provider reference (falling back to amount, currency, date and order id), and compares status and amount. Matching rules handle the known benign cases: a window of several days for timing, fees reported separately, and partial captures summed per payment.

Anything that does not match goes to an exception queue, not a report. Each exception has a category, an owner (payments operations for operational cases, the engineering team for system defects), a due date and a resolution, such as "refunded customer" or "recorded missing capture". Many exceptions can be auto-resolved: if the provider shows a settled charge for a payment we marked UNKNOWN, the job can update our record and trigger fulfilment or a refund according to policy.

Step throughDaily reconciliation
  1. Load settlement filesone per provider, per day
  2. Match by provider referencewindow of several days for timing
  3. Amounts and status agree?
    YesMark reconciledNoClassify the difference
  4. Known auto-fix?e.g. UNKNOWN but settled
    YesUpdate record and notifyNoException queue with owner
  5. Report exception ratedaily metric against target

5 steps in order. Play them, or step through them one at a time.

5Fixing Root Causes in the Platform

Reconciliation catches problems; the platform should stop creating them. Persist the payment before calling the provider, so a crash never leaves a charge with no record. Treat a timeout as UNKNOWN, never as FAILED, and resolve it by querying the provider's status API with the same idempotency key until there is an answer. Make webhook handling idempotent: store each provider event id with a unique constraint and skip duplicates, and return 200 only after the event is stored, so the provider retries anything we failed to process. Poll the provider periodically for recent changes as a backstop for webhooks that never arrive. Feed manual dashboard actions back through the same event path, or forbid them in favour of our own tools.

6Reporting the Exception Rate

Finally, the mismatch rate becomes a metric with an owner and a target, not a monthly surprise. I would report the daily rate of unreconciled payments after matching rules, broken down by category and provider, with a target such as under 0.01 percent and every exception resolved within three business days. Watching it daily also turns reconciliation into a monitoring tool: a sudden jump in missing-on-our-side exceptions on one provider is often the first sign of a webhook or timeout problem introduced by a deployment.

7Follow-up questions

Who should own reconciliation, finance or engineering?

Both, with clear lines. Engineering owns the reconciliation system, the matching rules and the root-cause fixes. A payments operations or finance team owns working the exception queue and deciding customer outcomes such as refunds. A shared weekly review of the categories keeps the two connected, so recurring operational exceptions turn into engineering fixes.

What would you do about the customers already affected?

Work through the backlog by category. Customers charged without an order get refunds or their orders fulfilled, according to policy, as quickly as possible, because that is the most visible harm. Orders shipped without settled money go to finance for collection or write-off. Each resolved case also confirms or refutes our cause analysis, so the backlog doubles as evidence.

8Conclusion

In this answer, we turned a 0.1 percent settlement mismatch into four categories, separated harmless timing differences by matching across a window of days, and traced the real ones to unknown states after timeouts, lost or duplicated webhooks and crashes between charging and saving. We built an automated daily reconciliation with matching rules, exception queues and owners, fixed the root causes in the platform, and made the exception rate a daily metric with a target.

What to say in the interviewAbout 100 seconds aloud

Open with

I would start by classifying the differences instead of treating 0.1 percent as one problem. I would take a month of mismatches and sort them into four groups: missing on our side, meaning the provider settled something we have no successful record of; missing on the provider's side; amount or currency mismatches; and timing differences where the transaction is on both sides but on different days.

Then, if they want more

Timing is usually the biggest group and is not really an error, so matching by provider reference across a few days removes most of it. For the real differences, I would trace a sample through logs and payment history.

The usual causes are timeouts where we marked a payment failed but the provider actually charged, webhooks that were lost during a deployment or processed twice, code that charged before saving, and refunds done manually in the provider's dashboard.

Then I would fix the process: an automated daily reconciliation job that loads each settlement file, matches it, auto-resolves known cases like an unknown payment that turns out to be settled, and puts everything else into an exception queue with an owner and a due date.

And I would fix the root causes: persist the payment before calling the provider, treat timeouts as unknown and resolve them with status queries, make webhook handling idempotent by provider event id, and poll as a backstop. Finally, the exception rate becomes a daily metric with a target, so we see regressions within a day rather than at month end.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Finance reports that your payment records and the provider's settlement reports disagree...": https://scrivio-interview-library.netlify.app/architecture/backend-system-design/d2365284fc/