“What goes into building an international payments service like Paypal?”

Ace Subido
9 min readMar 26, 2019

Someone asked this over in Hacker News. Building something in the scale of Paypal, Stripe, Transferwise is daunting; ‘daunting’ is an understatement. Having worked on a remittance startup and being exposed to bits of this undertaking, I was excited to share to him why it’s hard to dethrone the giant.

Granted, the company I work for is nowhere near the size of Paypal, I figured the outline might be helpful. Here was my reply:

Why does Paypal still exist?

They nearly charge 5% of the transaction on an average. Sometimes it’s more than the wire transfer charges. There has been always this promise of low cost international transactions but no one seems to dethrone Paypal (or is it just my bias? ).

What goes into building a international payments service like Paypal?

A combination of a lot of legal and treasury work, in other words, doing things that are hard to scale.

Let’s take, for example, one core mechanic of a payments service. Pretend you are building a payments app, and you wrote this single task in your todo-list:

Users should be able to withdraw out their USD balance to NGN.

The User story goes like this:

As a User,I can make a Withdrawal from my balance by choosing NGN, an NGN bank to payout to, by filling in the amount and bank account details.So that I can withdraw the payments I received from the app.

So, spin up a web app and add a simple form where a User can fill up a form and submit to a Database for now until you sort out your Treasury Work. Bonus points if you have an admin backend where you can see all of these requests and update some status column. Forget the javascript and U.I., because those aren’t core to a payments service: the core is to ‘actually’ transfer funds. Don’t think about API’s for now, that’s the “easy” part.

The Treasury Work

In that task you wrote, the Users want to cash out in NGN. Let’s pretend your Users already gave you 10,000USD in total or something in your Bank Of America account. Okay, now to ‘actually’ do pay them out in NGN:

To be able to pay out in Nigeria in a reasonable time, you’d have to buy a lot NGN with your USD, and keep that money in a bank account somewhere in that country.

Why? Can’t I just keep wiring out USD from my bank to their bank?

You can’t expect to keep wiring out USD to Nigeria every time a User issues a Withdrawal. If you do, you’re at the mercy of wire transfer time, the fees, and the F.X. margins of the correspondent banks. If you’re already at par with bank fees, why would they want to use you?

To give your customers a competitive rate, you determine your cost by spreading the value of the fees and sending USD at favorable USDNGN rates. To ensure reliability and consistency of them getting NGN, having local NGN decreases the risk of varying transfer durations.

If you establish this neat pipeline of funding your NGN bank account, it only means other people have also done this, that’s called a “corridor”.

Corridors with a competitive currency pair rate indicate that other people are doing this, which means your costs are predictable for you to build a transfer service. If you’re having a hard time funding your bank account, it either means you’ve hit the jackpot, since no one else is doing it, or you’re going to have a bad time, since there’s no market demand to transfer money with that corridor.

Now, you’ve established your corridor to your bank: here’s another problem, what if your Users wanted to pay out on a different bank? You’d have to maintain balance on that different bank too. The money stuck in a country is called “float”. If you’re lucky, the banks in that country are interconnected, and you can do interbank transfers easily, but if not, you’re going to have a harder time.

That’s why there’s always a “3–5 banking days on withdrawal”, it’s not because of wiring out your actual cash, companies like Paypal are trying to manage their “float”.

Wait? Why do we need money on those banks again?

Here’s why: imagine one of your Users issued an NGN Withdrawal Request. Depending on the bank where you have your float in, if they have online banking, you’ll have to actually log in on your bank account and transfer manually from your balance to your User’s bank details. Go to your app and update the status of their “Withdrawal”.

If they don’t have online banking, you’ll call them up or email them a spreadsheet of your transfers, a.k.a. “Withdrawals” on your app. They’ll reply, and you’d have to update the “Withdrawal” status manually on your app backend. The dream would be to build a generic parser to homogenize all those emails/CSV and update your Withdrawals, but you’re only focusing on this “one bank” first.

That’s most of the magic behind money transfer apps!

What? Seriously? That’s stupid; no way does that happen in real life. I’m pretty sure that’s NOT how most companies do it.

Well, yeah, you’d be surprised. For now, do that to push out your feature.

So I have to do that manually? No way, there has to be APIs for that.

There are only a handful of banks on this planet that have Transfer APIs; you’d be lucky to encounter one that is on production and not on some “Sandbox” environment. For some of these banks that have an API, to even access these coveted APIs, you’d have to be licensed, regulated, and have a good relationship. Nope, it’s not like they’re Github, where you fill up some online registration form with your email and have access to that API in 10 seconds.

Again, that’s why there are “3–5 banking days on withdrawal”. Depending on the country, sometimes companies like Paypal batch all the User withdrawals together with their payout partners and manage float.

What if the NGN withdrawal on your app was a ‘cash pick up’? You’d be also pressed to maintain a relationship or talk with those financial institutions. Another email thread for your inbox again; not every popular bank or cash pickup company has an API.

Now you might be wondering: ‘There’s gotta be a better way than this’. Depending on the country, you’d have to look for local providers called “Aggregators”. These financial institutions can be remittance or money transfer companies that handle local payouts for you.

Bonus points: they’re usually tech-savvy and almost always have an API. But underneath the hood, depending on the maturity of a country’s banking system, it’s the same “phone the bank, CSV email” or “login to an online banking portal” method that they’ve done for you.

If a country has 20+ banks and 4+ cash pickup companies, you wouldn’t want to maintain balance, relationships and have email threads with most of them, right? “Aggregators” are a payments service lifesaver, since they’ve done the legwork on wiring up all the banks and cash pickups, plus they’re usually fully licensed. You maintain balance with only them, and they take care of the ‘Last Mile’ of paying out to most of the banks/cash-pickups in the destination country.

Aggregators charge very competitive fees. Depending on Paypal or Transferwise, if they use an aggregator, they pass those fees under that 2.9% mask to homogenize the payout options.

If you see a specific payout on Paypal that promises “Instant” or “1–2 banking days” that pretty much means they’re riding on a beautiful “corridor” in a country with an interconnected banking ecosystem. Most probably, they have API access or in a relationship with multiple efficient aggregators.

A side note: USDNGN has a black market rate that’s way better than the banks. Maintaining balance with a bank might be less competitive vs. finding an aggregator that can offer you USDNGN black market rates.

The Legal Work

Well, first off, to start the treasury work, you’ll have to actually open a bank account.

You may get away with a personal bank account and do that as an M.V.P., but no one would recommend that, especially when your volume picks up.

Also, if you’re a local e-commerce shop paying out local sellers via transfers, the regulations may be a lot easier. If you’re funding the account from the U.S… you’re facilitating Money Transfer in a sense.

You’ll have to get the relevant permits/licenses in-line with Money Services Businesses, or depending on the country, some other license. Otherwise, they’ll shut down your bank accounts or penalize you based on their laws.

Depending on the speed of the government processes, you’d have to bake in legal fees and months of back and forth with government agencies to open a bank account and operate legally. After getting the necessary licenses as a financial institution, the real work begins: you’re a regulated entity, so you need to keep in line with KYC and AMLA regulations of the country.

That’s not all; you’ll also need to maintain a good relationship with your bank(s). Even if you’re in line with regulations, they will throw your bank accounts under the bus, immediately, if their risk and compliance department flagged you. Banks would prefer to get better ratings with the Central Bank than risk having you.

If your account doesn’t align with their risk model (ex: this guy is transferring too much USD with this pattern, the business doesn’t have the $FOO_TYPE License they’re still working on it, etc.), then you’re out of luck.

Work out that relationship; in the most desperate of cases, people would advise you to charter your bank or buy out a rural bank. Weigh the cost: chartering or owning a bank is not an easy task. It’s a lifetime’s worth of capital and regulatory effort; even Paypal does not want to aspire to be a bank.

Well then, I’ll use an aggregator

No way around it: Aggregators are financial institutions that need to comply with the regulations, too, so you get bonus points to your relationship with them if you’re licensed and regulated on your end. They’ll drop you or severely limit your transactions if you don’t hold up your end of the regulation dance.


To sum up; I have just described Withdrawals.

I haven’t even begun to describe the hardship of replicating Paypal’s “User can accept credit card payments” feature. If you do that, you’re in-line with being a quasi-bank at that point, which has another set of licenses, permits, fees, and other legal work. For Treasury Work, you’d also need to scope out a deposit, transfer limits, and to handle cases or risks of fraud.

Take note: this is just for entering 1 country.

Every country has it’s own quirks, what you did for Nigeria cannot be replicated to paying out in K.R.W. or IDR. They will have different licenses, legal fees, aggregators, banks, cash pickups, bank account limits/thresholds; for some countries, they might even ask to charter yourself as a bank.

To even mildly add some scale into your effort, you’ll have to scope out common efforts to help you strategize how quickly you can enter a country. All that effort to add one currency on the dropdown in your form from the beginning of this article.

Once you’re in, it doesn’t stop there. The real work begins: you are now a licensed and regulated financial institution embedded in a country facilitating payments for their citizens. You currently have to keep tabs of changes in regulation, submit reports to the central bank, comply with audits, keep track of national holidays, and the changes in a bank/aggregator’s policies.

Hopefully, this has outlined why Paypal cannot be dethroned easily. Transferwise and Stripe are getting there. The next time you see Stripe says ‘support for your country coming soon!’, you now have a glimpse of the problems they’d face to be able to cater to your country.

As for your ‘payments app’, you’d have to legally embed yourself, have enough float and resilient corridors in 100+ territories to even go toe-to-toe with Paypal or Western Union in their own game.

Note: If you’re a CTO, a VP of Engineering, or a developer looking to implement/M.V.P. a PHP remittance feature, you can do so with us via API. No CSV emails and such. Drop an email at hello@bloom.solutions. Our company, Bloom Solutions, is a licensed and regulated financial institution (aggregator) in the Philippines that can payout to, as of writing, 36 commercial banks and 4,700 cash pick up points across the Philippines.



Ace Subido

Father. Husband. Likes video games. Software Engineer @ Shopify. I like writing notes to myself.