How We Built an Internal Payment Flow Using Our Own API at Modem Pay

If you're building payment infrastructure, here's a question for you:
Would you trust your own API to run your business?
At Modem Pay, we do. In fact, we recently built a fully functional wallet funding flow, by using the exact same payment system our merchants use.
No internal scripts. No admin overrides. Just our public SDK, payment intents, and webhooks, used exactly as any third-party merchant would.
🧠 Why We Did This
We needed a reliable way to fund merchant wallets, for funds, and early disbursements. Instead of writing new logic, we asked ourselves:
“Why reinvent the wheel when we already built a system that works?”
So we ran it through our own rails.
🛠️ How It Works: Using Modem Pay to Power Modem Pay
Here’s what we did:
Used the Modem Pay SDK to create a payment intent
Generated a checkout link like any merchant would
Processed the top-up through our existing flow
Let our webhooks handle the update
Tracked it with the same metadata and infrastructure
This wasn’t a dev-only environment. It was the real deal, production-grade Modem Pay, funding Modem Pay.
🔁 A Recursive Payment System That Just Works
This internal usage revealed something big: We’ve built a recursive payment system that can trigger itself and resolve without error.
We call this behavior the Modem Loop™, a clean, resilient loop where:
Modem Pay acts as both sender and receiver
No hidden routes or privileged logic exist
The same transaction pipeline works for us and our users
🔍 Why This Internal Flow Matters
This might sound small, but it’s a massive signal of platform maturity. Here’s why it matters:
It’s scalable No extra logic means this can scale with our merchant operations
It’s testable and traceable Webhooks, logs, and metadata are consistent
It’s resilient by design No branching code or brittle admin logic
It proves confidence in our own API We’re literally our own customer, and it just works
🔄 How to Use Your Own API Internally (Without Breaking Things)
For developers or fintech teams looking to replicate this idea, here’s what matters:
Design your API for public + internal use from day one
Avoid special logic or hardcoded exceptions for internal ops
Ensure your webhook and metadata systems are consistent
Treat yourself like your customer, same flows, same rules
🚀 What's Next for Us
Now that we’ve validated this flow, we’re exploring more Modem Loop use cases:
Running internal settlements
Recursively testing checkout, refunds, and transfers
We're building for scale, and if our system can power itself, it can power anything.
If You Can’t Use It, Don’t Ship It
The phrase “eat your own dog food” gets thrown around a lot. But this isn’t just dogfooding, it’s recursive trust.
Our platform doesn’t just serve merchants. It serves us, too, using the exact same rails.
And that’s a quiet kind of power.
Subscribe to my newsletter
Read articles from Caleb Okpara directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Caleb Okpara
Caleb Okpara
I build stuff, fix stuff, and make sure payments actually work. Mostly coding, sometimes dealing with servers, and occasionally pretending to be a business guy.