Reab · Case study
Phone credit for family and friends, at home or abroad, from inside a social app
- Industry
- Mobile top-ups in a social app
- Platforms
- iOS, Android
- Year
- 2026
Outcome
30,000
The problem
People using Reab, a social app, wanted to send phone credit to family and friends, in their own country or abroad, without leaving the app. Real money was involved, so every top-up had to end with a clear answer: the credit arrived, or the money came back.
What I built
- An airtime top-up flow that sends phone credit to numbers at home or abroad, paid by card, Apple Pay or Google Pay
- A waiting screen that shows each stage of a top-up and tells the user what happened to their money
- Recurring top-ups, charged on a schedule to a saved payment method
- Subscription screens and in-app purchases through Apple and Google, for the premium courses and certificates in a separate module of the Reab platform

Engineering notesConstraints, architecture, decisions and tradeoffs, for engineering readers.
Constraints
- Only reachable destinations. The app only offers numbers a top-up can actually reach: countries and operators come from an up-to-date airtime provider.
- Several ways to pay. Users pay by card, Apple Pay or Google Pay. Airtime counts as a real-world good, which allows payment outside the App Store and Google Play billing systems. Apple Pay and Google Pay still had to follow each store’s branding rules.
- Pricing with many inputs. The price depends on the user’s local currency, minimum and maximum amounts, taxes, fees and discount codes.
- No charge without delivery. A user should never pay for credit that didn’t arrive, or pay twice for one top-up.
- Scale. The whole app, of which top-ups are one part, makes more than 20 million API requests a month.
Architecture
- The app asks the backend to start a top-up and gets back a payment to confirm.
- It confirms that payment with Stripe’s SDK, including the bank’s 3D Secure check when one is needed. At this point the card is only authorized, not charged.
- The backend sends the top-up to the mobile operator, and the app polls its status periodically.
- The backend decides when a top-up has succeeded. The success screen appears only once the operator confirms delivery, not when the payment goes through.
Decisions and alternatives
Authorize first, charge after delivery
Authorizing the card first and charging it only once the operator delivers is the main safeguard against charging for nothing. The rest of the flow is built around never charging twice:
- One payment per attempt. Each attempt creates its own payment, which can be confirmed only once. A lost response or an abandoned attempt never turns into a charge.
- Retry only before money moves. Retry is offered only when the payment step itself failed.
- No guessing. If the connection drops while the app is checking the status, it says it can’t confirm the result and points the user to their order history.
- One top-up at a time. The waiting screen stays up until the top-up finishes, and no second payment can start behind it.
A waiting screen that says what’s happening
After paying, the user sees a confirmation sheet that moves through clear stages: “Preparing top up…”, then “Top up in progress”, then “Taking a bit longer than usual” if it’s still pending after a set time. On success, the bar fills, the phone gives haptic feedback, and “They received the top up” appears before the completion screen and receipt.
The progress bar follows a planned timeline, anchored to real events in the payment. It holds near the start while the payment is set up, moves into the processing stage only when the payment goes through, and reaches 100% only when the operator confirms delivery. Only the movement between those events is planned: fast at first, slowing at checkpoints, and stopping just short of full before confirmation.
The alternative was to estimate that movement from real delivery times. That would have needed delivery-time percentiles, such as p70 and p90, for every operator and country, plus the work of collecting and maintaining them. The planned timeline gives users the same reassurance, and when a top-up runs past the usual time, it says so honestly.
When a top-up fails
Each failure tells the user what happened to their money:
- Declined card: “Couldn’t top up”, with Retry and Cancel.
- Paid, but the top-up failed: the card was only authorized. The hold is released, or the money refunded, automatically. The app says so, explains that the timing depends on their bank, and takes them back to the dashboard.
- Status unknown: the app says it can’t reach the status check, and points to the order history.
Order history and downloadable receipts give users a record of every completed top-up.
Recurring top-ups on a saved payment method
Recurring top-ups started on a subscription-style payment model. Within days I moved them to a saved payment method that the backend charges on schedule, which was simpler and more reliable. Discount codes were deliberately left out of recurring orders.
Subscriptions through Apple and Google
Premium courses and certificates are sold as subscriptions through the App Store and Google Play. They follow the standard in-app purchase pattern: the server validates each store receipt, and users can restore their subscription on a new phone.
Testing and release
- Three builds: dev, staging and production, each with its own payment and Firebase setup. Dev and staging only ever see test payments.
- Test payments: Stripe’s test mode, with standard test cards for successful, declined and 3D Secure payments, and Google Pay’s test environment outside production.
- Real money before launch: the top-up option stayed hidden from users in production while the team made real payments end to end, through the real card networks and mobile operators.
- Releases ship from versioned release branches, and the app can make older versions update.
What I’d do differently
As the pricing rules kept changing, with fees, country taxes and discounts arriving over months, I pushed for the backend to return a single quote with the full breakdown, leaving the app to show the price rather than calculate it. When business rules are still changing, I now put them behind the server from the start, where a change needs no app release.
I’d also map the whole payment lifecycle with the backend first, including the failure and refund paths. Late surprises then become an agreed list before any screen depends on them.