High-volume payment switches, timeout resilience, and kiosk liquidity
Behind 6 million daily transactions at Fawry
Mostafa Elnahhas, CEO of Technology at Fawry, goes inside the engineering of Egypt's largest retail payment network: from designing for first-of-month spikes and managing mid-flight bank timeouts to understanding why neighborhood kiosks still hold onto cash.
This is the full episode as an illustrated read. Prefer to watch? Press ▶ Watch.
In this episode
- 1Built for the first of the monthBuild a payment system for payday, not for the average day.
- 2When a payment request hangs, who manages the timeout?Give every service its own timeout rule, so one slow partner cannot stall everything.
- 3The receipt says failed, but the bank texted a debitMost dropped payments are reversed in seconds, and a daily check catches the rest.
- 4Under 1% technical failure: many SIM cards and private networksTreat phone networks as unreliable, and add automatic backups.
- 5From Saudi Arabia to Egypt, where only 10% used banks: why Fawry built kiosksA payment system must fit how money really moves in the country.
- 6Why small shops still prefer cashSmall shops avoid cards because the fee can take 15% to 40% of a thin profit.
- 7400,000 card machines, yet people prefer P2P transfersWhen person-to-person transfers are cheaper than checkout, shoppers use transfers instead.
- 8IPN and InstaPay: why a mixed business protects FawryFawry builds on national payment rails and spreads into other services, so low transfer fees hurt less.
- 9Digital supply chains and credit at the moment of deliveryOffering credit at the moment of payment turns thin fees into steadier income.
- 10Engineer to engineer: scale, rules, and costly mistakesIn regulated finance, good design comes first.
Key takeaways (12)
- 01. Design for peak Size payment switches for first-of-month payroll ceilings, never daily averages.
- 02. Timeout architecture Configure distinct timeout and retry rules per service across multi-party chains.
- 03. Isolate slow nodes Fail fast when an upstream partner stalls so healthy channels stay online.
- 04. Silent reversals When a debit SMS collides with a failed POS receipt, a reversal is already in flight.
- 05. End-of-day match Twin-ledger settlement reconciliation catches dropped reversals and refunds cards.
- 06. Sub-1% tech drops Dual-SIM failover and private operator APNs keep pure technical drops under 1%.
- 07. Match cash reality In a 10% banked 2008 market, physical POS retail reached the unbanked majority.
- 08. Visible MDR math A 2% to 3% MDR takes 15% to 40% of a 5% to 10% small-shop margin until fees fall.
- 09. P2P beats QR fees Buyers and shops route around merchant QR fees via cheaper P2P wallet transfers.
- 10. Diversified mix Bills (19%), acceptance (18%), agent banking (22%), supply chain (6%), and finance.
- 11. Credit at delivery Seven-day embedded FMCG restock credit keeps merchant cash turning in the shop.
- 12. Architecture first AI speeds coding, yet upfront architecture and regulatory rigor decide survival.

انت لما بتبني سيستم يعني بيمنت سولوشن نيشن وايد، لازم تبنيه وتديزاين وتعمله انجينيرينج على البيك نمبر ترانزاكشن مش هتعمله على الفوليوم نمبر على الافريج يعني.
When you build a nationwide payment solution, you have to design and engineer it for the peak transaction load, not for the average volume.
Built for the first of the month
Build a payment system for payday, not for the average day.
Every month opens the same way in Egypt. Salaries arrive. Mobile bills come due. Millions of payments reach Fawry's network together. The network handles about 6 million transactions a day. In most apps, planning for the average day works. In national payments, it fails on payday morning.
Peak-hour payment switch load & timeout simulator
CalculatorSlide the salary-day traffic multiplier and downstream bank issuer latency to watch clean completions collide with timeout queue pressure.
Guess firstOn payday, traffic is 3.5 times normal. The bank takes 1.2 seconds to answer. About what share of payments runs into timeout trouble?
Illustrative model: demonstrates the peak-capacity rule explained at 02:12, where ~6 million daily transactions (roughly 70/sec on average) surge dramatically during first-of-month payroll and bill windows.
Mostafa Elnahhas says Fawry built five things in from day one. They are high availability (keeping the service running), scalability, performance tuning, control, and . These were not fixes added after growth. They were the starting design.
فبالتالي احنا فروم داي وان واحنا حاولنا نبني سيستم السكيلابيليتي فيه والهاي افيلابيليتي والبرفورمنس تيونينج والتايم اوت مانجمنت وريكونسيليشن مانجمنت والحاجات دي كلها فروم داي وان كأركتكتشر.
From day one we worked to build a system with scalability, high availability, performance tuning, timeout management, and reconciliation management baked into the architecture.

Reconciliation
Matching two sets of records, such as a payment company's ledger and a bank's, to find and fix differences.
Timeout
The longest a system waits for a reply before it gives up on a request.
When a payment request hangs, who manages the timeout?
Give every service its own timeout rule, so one slow partner cannot stall everything.
For the shopper, payment is simple. It worked or it failed. Behind the screen is a long chain. It links the card terminal, Fawry's own systems, and phone networks. It also links card schemes like Mastercard, Visa, and Meeza. At the end sits the older system of the bank that issued the card.
A request can hang anywhere on that chain. Blaming the bank or the network does not help the person at the counter. Elnahhas says each service needs its own rule. Some requests are safe to retry later. Some must never be retried. Some should fail fast. That way, one slow partner cannot drag the whole system down.
فالتايم اوت وارد ان يحصل طبعا عند اي انتيتي في الحاجات دي كلها، فاهم حاجه انت ازاي بتمانج التايم اوت اركتكتشر.
A timeout can naturally happen at any entity along that chain. What matters most is how you manage your timeout architecture.
Fast front-end vs. legacy core bottleneck
CalculatorIncrease incoming POS concurrency while toggling circuit-breaker isolation to see how buffering slow bank or biller cores stops cascading outages.
Illustrative model: reflects the upstream isolation rule discussed at 05:49, where failing fast on a downed partner protects healthy channels across the switch.

Timeout
The longest a system waits for a reply before it gives up on a request.
The receipt says failed, but the bank texted a debit
Most dropped payments are reversed in seconds, and a daily check catches the rest.
Host Sherif raises a moment every cardholder fears. At a kiosk, the receipt says the payment failed. Seconds later, the bank texts that money left the account. Elnahhas explains why both messages can look true at the same moment.
انت ككاستمر شفتها فيلير على الريسيت او عند الميرشنت وشايف اس ام اس جايه لك ان الترانزكشن سكسسفول بس اكشوالي في ريفرسال اوريدي اتبعت انت ما انتاش شايفه.
As a customer you saw a failure on the merchant receipt while receiving an SMS saying the transaction succeeded, yet in reality a reversal had already been sent out of sight.
What happens in four steps when a bank debit times out mid-flight
- 1
POS sends authorization
Fawry receives the POS sale and forwards the authorization request to the issuing bank.
- 2
Bank deducts, reply drops
The bank deducts funds and triggers the customer SMS, but its confirmation fails to reach Fawry before .
- 3
Switch fires immediate reversal
Fawry immediately dispatches a reversal transaction to cancel the debit and prints failure on the merchant receipt.
- 4
End-of-day twin-ledger match
If the bank misses even the reversal message, end-of-day settlement catches the mismatch and refunds the card automatically.
Network drop & idempotency guard simulator
CalculatorToggle idempotency protection on and off across 10,000 mobile POS transactions as wireless packet drop rises.
Illustrative model: reflects the retry and reversal discipline discussed at 03:57 to 09:11, ensuring retries never turn a timeout into a double debit.

Timeout
The longest a system waits for a reply before it gives up on a request.
Reconciliation
Matching two sets of records, such as a payment company's ledger and a bank's, to find and fix differences.
Under 1% technical failure: many SIM cards and private networks
Treat phone networks as unreliable, and add automatic backups.
Card machines in shops and kiosks use mobile SIM cards. So host Sherif asks how much failure comes from weak signal. Elnahhas separates two kinds of failure. One is a business decline, like low balance or a fraud rule. The other is a real technical fault.
في النسبة مش أقل مثلاً من 3% ذا اوفر أول، التكنيكال ده مش هيزيد عن 1% البرسنتج بتاعته يعني.
Overall failures sit under roughly 3%, while pure technical failure does not exceed 1%.
Fawry keeps technical failures under 1% across hundreds of thousands of terminals. To do that, it adds backups at every layer. These are hardware, software, databases, and connections. Terminals carry several SIM cards. They switch automatically between rival mobile networks. Fawry also leases dedicated SIMs that connect through private carrier links called . These links hold the carrier to agreed service levels. They also keep the terminals off the open internet.

APN (private network)
A private mobile-network route that keeps a device off the open internet.
From Saudi Arabia to Egypt, where only 10% used banks: why Fawry built kiosks
A payment system must fit how money really moves in the country.
Before Fawry launched in 2008, Elnahhas worked on SADAD in Saudi Arabia. SADAD is a national electronic bill payment system. He saw how it changed daily life. Then Ashraf, Fawry's founder and CEO, met him in Saudi Arabia. Ashraf wanted to build the same thing in Egypt. The first plan copied SADAD, with banks connecting directly to billers.
One big difference forced a change of plan. Most people in Saudi Arabia used banks, and SADAD had government backing. In 2008, only about 10% of Egyptians used banks. Fawry launched its bank channel in late 2009. Three months later it added its retail point-of-sale network. The early years were lean, with little funding.
احنا في مصر كانت النسبة تقريباً 10% يعني أو حاجة زي كده... طب يا جماعة ده مش الماجوريتي في مصر ان بانكد... فكان لازم نفكر طب الناس الكاش كاستمر هيتعمل له هاندلينج ازاي فعشان كده جت فكرة ان احنا نعمل البوينت اوف سيل.
In Egypt only around 10% were banked at the time. Since the majority were unbanked, we had to ask how cash customers would be served, and that is how the point-of-sale model was born.

Why small shops still prefer cash
Small shops avoid cards because the fee can take 15% to 40% of a thin profit.
When this was recorded, in Egypt had reached 79%. There were more than 57 million mobile wallets. Even so, about 70% of in-store sales were still paid in cash. So were about 40% of online orders. Elnahhas explains why small shopkeepers resist digital payments.
هو طبعاً بيبقى بيفضل الكاش عشان هو شايف الكاش قدامه، بس هو الكاش ليه كوست، هو فيه هيدن كوست وهو مش شايفها.
A merchant naturally prefers cash because they can see it right in front of them, yet cash carries hidden costs they do not see.
There are two reasons. First, wholesale suppliers still demand cash on delivery. If a shop takes digital payments, its money gets stuck. It cannot pay the supplier. Second, card costs are easy to see. A terminal costs about $150. The (MDR) shows on the invoice. It is the fee a shop pays on each card sale. It is under 1.5% for large retailers, 1.5% to 2% for mid-sized shops, and 2% to 3% for small shops. The biggest share goes to the bank that issued the card, not the payment provider. Cash costs feel invisible.
لو انا تاجر والبروفيت مارجن بتاعي 5 تو 10% وتقول لي انا هاخد 2 إلى 3% على كل ترانزاكشن، فانت كده بتتكلم 15 لـ 40% من البروفيت بتاعي انت هتاخده.
If I am a merchant earning a 5% to 10% profit margin and you take 2% to 3% on every transaction, you are taking 15% to 40% of my profit.
Neighborhood kiosk margin & MDR pressure model
CalculatorAdjust daily kiosk card sales and the Merchant Discount Rate (assuming a 7.5% retail gross margin) to see why international card pricing drives small shops back to cash, and how lower local-scheme fees change the math.
Guess firstA kiosk earns a 7.5% profit on each sale. A card fee takes 2.5% of each sale. How much of the profit does the fee take?
Illustrative model: anchored directly to the 5% to 10% merchant margin and 1.5% to 3% MDR range explained at 19:55 to 21:49.

More detail
By the time of the conversation, financial inclusion in Egypt reached 79% with more than 57 million mobile wallets in circulation, yet roughly 70% of physical retail transactions and 40% of e-commerce orders still settled in cash. Elnahhas breaks down why small shopkeepers resist digital acceptance even when tools exist.
First, if a shopkeeper accepts digital payments while wholesale suppliers demand paper cash at delivery, the merchant's liquidity gets stranded. Second, while a POS terminal costs around $150 and cash costs feel invisible, the Merchant Discount Rate (MDR) sits right on the invoice: under 1.5% for large retailers, 1.5% to 2% for mid-sized merchants, and 2% to 3% for small shops, with the issuing bank's interchange taking the largest share rather than the payment provider.
Financial inclusion
The share of people who use formal financial services, such as bank accounts or mobile wallets.
Merchant discount rate (MDR)
The fee a shop pays, as a percent of each card sale.
400,000 card machines, yet people prefer P2P transfers
When person-to-person transfers are cheaper than checkout, shoppers use transfers instead.
Across Egypt, physical card machines won. More than 400,000 shops run Fawry devices. Payments by QR code and by , which turns a phone into a card reader, spread less than in other African markets. Elnahhas notes that the same machine already takes cards, QR codes, and wallet payments confirmed with a one-time code (OTP).
الوالت أكسبتنس على الفيزيكال ما انتشرش بشكل كبير ليه؟ لأن غالباً الناس بتستخدم بي تو بي ترانزاكشن... هعمل لك بي تو بي ترانزاكشن وهشتري آخد منك برودكت بدل ما أعمل بيرشيز وأدفع عليها فيز.
Wallet merchant acceptance did not spread widely because people mostly use P2P transfers: I transfer to your wallet and take the product rather than running a purchase transaction with fees.
The problem was not hardware. It was price and behavior. Sending money person to person, called , costs less than a formal shop payment. So buyers and shops use P2P transfers for purchases. That holds back QR codes and SoftPOS.
SoftPOS
Software that turns a phone into a card payment terminal.
P2P transfer
Money sent directly from one person to another.
IPN and InstaPay: why a mixed business protects Fawry
Fawry builds on national payment rails and spreads into other services, so low transfer fees hurt less.
InstaPay is now common for everyday transfers. Its fees are near zero. Host Sherif asks if that squeezes companies like Fawry. Elnahhas separates two things. IPN is Egypt's Instant Payment Network, the system underneath. InstaPay was the first consumer app built on it. Fawry has been connected to IPN for years. He expects shop payment services to grow across banks and payment providers.
خلينا نفرق بين آي بي إن اللي هو إنستانت بيمنت نتورك وإنستاباي، إحنا عندنا سكيم في مصر اللي هو الآي بي إن... وكان أول أبليكيشن ليها اللي هو إنستاباي.
Let us separate IPN, the Instant Payment Network, from InstaPay: in Egypt we have the IPN scheme, and InstaPay was simply its first application.
Fawry also no longer depends on one kind of transaction. Elnahhas gives the split. Bill payments are about 19% of business. InstaPay has little effect on them. Online and in-person acceptance is 18%. It lost some volume to transfers. Agent banking through Fawry Plus is 22%. It covers cash-in, cash-out, and checks done for financial institutions. supply chain is 6%. Financial services are a major growth area. They include lending, cards, savings, and insurance.
KYC (Know Your Customer)
The checks a finance company must run to confirm who a customer really is.
FMCG
Fast-moving consumer goods: everyday products like food, drinks, and soap.
Digital supply chains and credit at the moment of delivery
Offering credit at the moment of payment turns thin fees into steadier income.
Supply-chain payments are only 6% of Fawry's business. That looks small on a pie chart. But it solves the cash trap that corner kiosks face, described earlier. Fawry connects directly to big consumer-goods suppliers. Delivery staff and shops settle payments in real time. That shortens the time cash is tied up for distributors.
دلوقتي جاي يحول الفلوس بتاعة البضاعة اللي جت له من الإف إم سي جي، أنا دايركت أقول له تحب أحولها لك من كريديت خلال سبعة أيام ويبقى مثلاً هامش ربح بسيط عليها، فهو ممكن يقول آه طب أنا الفلوس دي ممكن آخدها أشغلها في حاجة تانية.
When a merchant goes to pay for delivered FMCG goods, I can offer right at the transaction to fund it via seven-day credit for a small margin, freeing their cash to turn other inventory.
Raw transaction fee vs. embedded financial services
CalculatorCompare thin per-transaction switching fees against offering instant 7-day working-capital credit on a merchant's monthly FMCG restocks.
Illustrative model: demonstrates the strategic shift described between 27:15 and 30:22, turning payment rails and supply-chain data into embedded lending.
Engineer to engineer: scale, rules, and costly mistakes
In regulated finance, good design comes first.
Host Sherif closes by asking what habits payment startups should drop. Elnahhas says AI speeds up writing code. But the basics stay the same. Build small services that each scale on their own. Use an enterprise service bus (ESB) to connect outside partners cleanly. Build security in from the start. And spend real time on design before writing production code.
عشان تعمل إنتربرايز سوليوشن لازم تاخد وقت كافي في الأركتكتشر، وده أهم حاجة... أهم من الإمبليمنتيشن.
To build an enterprise solution, taking enough time on architecture is the most important thing, even more important than implementation.
No team builds a perfect system on day one. So Elnahhas stresses fast feedback and learning loops. They help find faults as traffic grows. Sherif ends with the key rule of financial software. It is a regulated industry. One design mistake can have severe consequences.
Elnahhas's six-point payment-switch readiness test
0 to 2 in place: Fragile under load. A single first-of-month spike or slow issuing bank can trigger cascading timeouts and reconciliation backlogs. (4 unchecked)
Key takeaways
01. Design for peak
Size payment switches for first-of-month payroll ceilings, never daily averages.
02. Timeout architecture
Configure distinct timeout and retry rules per service across multi-party chains.
03. Isolate slow nodes
Fail fast when an upstream partner stalls so healthy channels stay online.
04. Silent reversals
When a debit SMS collides with a failed POS receipt, a reversal is already in flight.
05. End-of-day match
Twin-ledger settlement reconciliation catches dropped reversals and refunds cards.
06. Sub-1% tech drops
Dual-SIM failover and private operator APNs keep pure technical drops under 1%.
07. Match cash reality
In a 10% banked 2008 market, physical POS retail reached the unbanked majority.
08. Visible MDR math
A 2% to 3% MDR takes 15% to 40% of a 5% to 10% small-shop margin until fees fall.
09. P2P beats QR fees
Buyers and shops route around merchant QR fees via cheaper P2P wallet transfers.
10. Diversified mix
Bills (19%), acceptance (18%), agent banking (22%), supply chain (6%), and finance.
11. Credit at delivery
Seven-day embedded FMCG restock credit keeps merchant cash turning in the shop.
12. Architecture first
AI speeds coding, yet upfront architecture and regulatory rigor decide survival.
Sources
More episodes
Mohamed Aladdin · DPI
When the currency halves, did the company grow?
+40% in Pounds · -50% in Dollars
Read episode →Mohamed Negm · Valu
When a loan clears in three minutes, who stops the thief?
180-Second Approval · 15% Cash-Out Cut
Read episode →Galal Elbeshbishi · Synapse Analytics
AI underwriting at 35% inflation: when the models break
35% Inflation · Live Model Drift
Read episode →