Use case · Fintech
Card authorisation stand-in
A card is tapped and the bank has a few seconds to answer. Watch one approval, see an outage decline every card, then let a small second platform answer instead.
Used by apps like Monzo, Revolut, Starling Bank, Chime and Nubank
Happy path · break it · fix it
Card authorisation stand-in: sequence diagram
Card authorisation stand-in, shown as messages between Network (The shop's card terminal and the card network that carries its request to the bank), Gateway (The bank's authorisation gateway, which receives requests from the card network and returns the answer), Primary (The bank's primary platform, which owns the ledger and normally decides every payment), Stand-in (A second, much smaller platform with its own copy of balances that can decide payments when the primary cannot).
Happy path: 8 steps.
- Network → Gateway: authorise £12. A card is tapped; the network asks the bank to approve £12 and starts a strict clock.
- Gateway → Primary: approve £12?. The gateway only carries messages, so it asks the primary platform to decide.
- Primary: card OK, £80 in. The primary checks the card is not frozen and the account has enough money.
- Primary: hold £12. It sets £12 aside in the ledger, so the same money cannot be spent twice.
- Primary → Gateway: approved (reply). The decision goes back to the gateway a fraction of a second later.
- Gateway → Network: approved (reply). The answer reaches the network well inside its deadline, and the till says approved.
- a day or two later. The shop sends the final amount for settlement later, not at the moment of the tap.
- Primary: hold becomes debit. The hold turns into a real debit in the ledger and the reserved £12 is used up.
Result: Approved in well under a second, with the money set aside.
Break it: 9 steps.
- Network → Gateway: authorise £12 (many at once). Cards from this bank are tapped in shops everywhere, each with the same strict clock.
- Gateway → Primary: approve £12? (many at once). The gateway passes every request to the primary platform, as it always does.
- Primary: database not answering. The primary is in trouble: the database behind the ledger has stopped answering.
- Gateway: waits for primary. The gateway has nowhere else to ask and no time limit of its own, so it waits.
- Primary → Gateway: no answer (never arrives) (reply) (many at once). No decision comes back for any of the payments.
- Gateway → Network: too late (never arrives) (reply) (many at once). The network's clock runs out first; an answer after this moment would not count.
- Network: declined at the till. With no answer and nobody to decide for the bank, each payment is refused.
- Network → Gateway: tap again (many at once). Shoppers try the card again, and new shoppers keep arriving.
- Gateway → Primary: approve £12? (never arrives) (many at once). Every attempt goes to the same broken platform and ends the same way.
Result: Every card from this bank is declined until the primary is back.
Fix it: 10 steps.
- Network → Gateway: authorise £12 (many at once). The same outage, the same shoppers, the same strict clock.
- Gateway → Primary: approve £12? (never arrives) (many at once). The gateway still asks the primary first, but gives it far less time than the network gives.
- Gateway: no answer in 1s. One second passes with no answer: the gateway stops waiting, with four seconds to spare.
- Gateway → Stand-in: approve £12? (many at once). It sends the payments to the stand-in, a small platform that shares nothing with the primary.
- Stand-in: copy: £80, cap £100. The stand-in decides from its own recent copy of the balance, and only up to a small cap.
- Stand-in: hold £12, log it. It sets the money aside in its own records and writes each decision to a durable log.
- Stand-in → Network: approved (reply) (many at once). The answer reaches the network in time, so the till says approved during the outage.
- the primary is back. The primary recovers and takes over again, but it knows nothing of these payments yet.
- Stand-in → Primary: replay log. The logged decisions are replayed into the primary, in whatever order they arrive.
- Primary: applied, not re-judged. Each is applied as decided, even if the real balance was lower: the reason the cap is small.
Result: Shoppers paid as normal and the ledger caught up afterwards.
step 1 of 8
A card is tapped; the network asks the bank to approve £12 and starts a strict clock.
- request
- success
- held / reserved
- waiting / retrying
The happy path, step by step
- A shopper taps a card and the terminal sends an authorisation request through the card network.
- The network forwards it to the bank that issued the card and starts a short deadline: no answer in time counts as no approval.
- The bank's gateway receives the request and asks the primary platform to decide.
- The primary checks the card and the account: not frozen, open, enough money.
- It places a hold for the amount in the ledger, so the money cannot be spent twice.
- The approval goes back through the gateway to the network, well inside the deadline.
- The terminal shows approved.
- A day or two later the shop's settlement arrives and the hold becomes a debit.
The failure
What breaks and why
A card authorisation has a deadline set by the card network, and the bank cannot extend it. If the bank's primary platform is down or merely slow, the gateway in front of it waits, the network's clock runs out, and the shopper is declined at the till even though the account is full. A late answer is worth nothing. Since every authorisation takes the same path to the same platform, this is not one unlucky customer: every card the bank has issued stops working until the primary is healthy, and repeated taps only add load to it.
Before / after
The fix
Keep a second, deliberately small platform that can answer card authorisations by itself: separate software, plus its own copy of the few facts a decision needs, such as a recent balance and the card's status, fed continuously from the primary. The gateway gives the primary a time budget much shorter than the network's deadline; on a timeout, or when the primary is marked unhealthy, it routes to the stand-in. The stand-in approves within conservative limits and writes every decision to a durable log. When the primary returns, the log is replayed into the ledger and applied as decided, so a payment the primary would have refused can leave an account overdrawn. The limits bound that risk.
# the card network allows about 5 s in total
on authorisation(req):
reply = primary.decide(req) # no timeout
return reply
# primary slow or down:
# the network's clock runs out first
# -> declined, for every customerPRIMARY_BUDGET = 1s # well inside the network's 5 s
on authorisation(req):
if primary.healthy:
try:
return primary.decide(req, timeout=PRIMARY_BUDGET)
catch Timeout, Unavailable:
primary.mark_unhealthy() # probe it later
d = standin.decide(req, limits=SMALL) # own data copy
sync_log.append(d) # durable, replayed to the ledger
return d.replyBoss fight
A related pattern in a real outage
Related pattern
Based on reporting, no official postmortemThis card is not an outage of this exact flow. It shows the same mechanism failing in another product.
Card payments across a continent start failing on a Friday afternoon, at a rate that swings between 7% and 35%. There are two data centres and a spare for every part. Why did the spare not help?
Fight the related boss90 seconds · the company is revealed after you answer
From their own write-ups
How real companies approach it
Monzo describes Monzo Stand-in as a separate set of systems on a different cloud provider from its primary platform, running its own services and holding only minimal state such as balances and card details, kept up to date from the primary's events. It says this costs about 1% of the primary platform to run.
Monzo: Tolerating full cloud outages with Monzo Stand-in (2025) ↗Monzo says Stand-in decides a card payment with independently written checks run in parallel, compared against the primary's decisions on a share of live traffic. Each decision is sent back as an advice message that the primary applies without deciding again, in whatever order the messages arrive.
Monzo: Processing payments in Monzo Stand-in (2025) ↗Monzo says engineers switch Stand-in on with tooling (automation is described as future work), that a small number of customers always use it as a test, and that in August 2024 it was enabled for all customers during an outage of about an hour. It notes that applying decisions as made could overdraw an account.
Monzo: Tolerating full cloud outages with Monzo Stand-in (2025) ↗
How this comes up in interviews
"Design card authorisation for a bank so that customers can still pay at the till when the bank's main platform is down or slow."
Then they ask
- The stand-in decides on a balance copy that is slightly old. What can go wrong, and how do you bound it?
- The primary comes back. How do the stand-in's decisions reach the ledger, and what if the primary would have refused one?
- How do you know the stand-in will work on the day you need it?
A strong answer covers
- The card network's deadline is fixed and a late answer is worth nothing, so the gateway gives the primary a much shorter time budget.
- A second, deliberately small platform answers alone: separate software and its own copy of balances and card status, fed from the primary.
- On a timeout, or when the primary is marked unhealthy, the gateway routes to the stand-in.
- The stand-in approves within conservative limits and writes every decision to a durable log.
- On recovery the log is replayed and applied as decided. An overdraft is possible, and the limits bound that risk.
Points to cover, not a script. Say them in your own words and tie them to a system you have worked on.
Your turn
What would you do?
A bank's ledger database stalls for 40 minutes. The card network allows 5 seconds per authorisation, the gateway waits on the primary platform, and every card payment is declined. Which change keeps cards working in the next outage like this?
Related
Card authorisation stand-in questions
- What is stand-in processing for card payments?
- It is a second way to answer a card authorisation when the system that normally decides cannot answer in time. A simpler backup makes the decision from limited data and rules, records it, and passes the outcome to the main system later. This page shows a bank running its own stand-in platform.
- Why are card payments declined when a bank has an outage?
- The card network gives the bank a short, fixed time to answer each authorisation request. If the bank's systems are down or slow, no approval arrives before that time is up, so the payment is not approved, whatever the balance. It affects every customer, since all authorisations take the same path.
- What happens if a stand-in approves a payment the customer could not afford?
- The approval stands: the shop was told yes. When the main platform returns, the decision is applied to the ledger as it was made, which can leave the account overdrawn. Designs limit this with a frequently updated balance copy and conservative limits. Monzo's write-up says this case is possible in its system but extremely unlikely.
Sources: Monzo: Tolerating full cloud outages with Monzo Stand-in (2025) ↗ · Monzo: Processing payments in Monzo Stand-in (2025) ↗ · Monzo: We had issues with Monzo on 29th July. Here's what happened, and what we did to fix it (2019) ↗ · Computer Weekly: Visa reveals 'rare' datacentre switch fault as root cause of June 2018 outage (press report of the company's letter) ↗ · Report a problem
A typical design, informed by public write-ups, not any one company's exact system. Diagrams are our own. Numbers in the simulation are illustrative. All wording is original and paraphrases the linked sources.