Skip to content

Payment Gateway or Direct Integration? When Each One Makes Sense

A gateway lets you accept M-Pesa, cards and banks through one integration - for a cut of every transaction. Going direct costs less per shilling but more to build. Here is how to choose.

By Karani Geoffrey, Founder & CEO, Upeosoft
In short

A payment gateway or aggregator (Pesapal, Flutterwave, DPO, Cellulant, Kopo Kopo and others) gives you M-Pesa, cards and bank payments through a single integration and one settlement, in exchange for a fee per transaction. Direct integration wires each provider yourself - lower per-transaction cost and more control, but more to build and maintain. Choose by volume, channel mix and how much control you need.

Key takeaways
  • A gateway aggregates many payment methods behind one integration and one settlement account.
  • You pay for that convenience with a percentage or fee on every transaction, for as long as you use it.
  • Direct integration (e.g. M-Pesa Daraja, a bank API) costs less per transaction but more to build and maintain.
  • Gateways win on speed to launch, card acceptance and multi-channel breadth without PCI headaches.
  • Direct wins at high M-Pesa volume, where a percentage fee on every payment becomes real money.
  • Many businesses do both: a gateway for cards and breadth, direct M-Pesa for their highest-volume channel.

The choice underneath every 'accept payments' project

When a business decides to accept payments online or in an app, there is a fork in the road that often goes unnoticed until later: use an aggregator, or integrate the rails directly.

An aggregator - a payment gateway - lets you accept M-Pesa, cards, and sometimes bank transfers through one integration and receive one combined settlement. Direct integration means wiring each provider yourself: M-Pesa's Daraja, a bank's API, a card acquirer. Both are valid. Choosing without understanding the trade-off is how businesses end up overpaying on fees or over-building infrastructure they did not need.

What a gateway gives you

The appeal of a gateway is that it collapses a lot of complexity into one relationship.

  • One integration instead of several - M-Pesa, cards and banks behind a single API.
  • One settlement and one reconciliation stream, rather than money arriving from many sources.
  • Card acceptance without carrying the heavy PCI-DSS burden yourself.
  • Faster launch - days or weeks, not a multi-provider build.
  • The provider absorbs a lot of the reliability, compliance and rail-specific quirks.
  • Access to methods you would not integrate individually, like several banks or wallets at once.

What a gateway costs you

That convenience is not free, and the cost is recurring. A gateway takes a percentage or fixed fee on every transaction, forever. On top of that you give up some control: the checkout experience is partly theirs, the data passes through them, settlement timing is on their schedule, and you are exposed to their uptime and their decisions.

At low and moderate volume, none of this matters much - the fees are small and the time saved is large. The calculation changes as you scale. A few percent on a large monthly payment volume can quietly become one of your biggest line items, paid to a middleman for something you could operate yourself.

What direct integration gives you - and demands

Going direct means integrating each rail yourself: M-Pesa via Daraja, a bank via its API, cards via an acquirer or a card-only gateway.

The upside is lower cost per transaction - you pay only the rail's own tariff, not an aggregator's margin - and full control of the flow, the data, and the customer experience. The demand is engineering: you build and maintain each integration, handle their callbacks, reliability, reconciliation and go-live processes yourself. For a business where payments are core and volume is high, that investment pays back. For one just trying to take a few payments, it is overkill.

The volume math that usually decides it

Strip away the theory and it often comes down to arithmetic. Estimate your monthly payment volume, apply the gateway's percentage, and compare that annual figure to the one-off cost of a direct integration plus its ongoing maintenance.

At low volume, the gateway fee is a rounding error and building direct would be wasteful. At high volume, the gateway fee can dwarf the cost of building direct, and every month you delay is money handed to the aggregator. Somewhere between those is your crossover point. Knowing roughly where it sits turns this from a gut decision into a business one - and it is usually the reason growing businesses eventually bring their biggest channel in-house.

The answer is often 'both'

This is rarely all-or-nothing. A very common and sensible setup is a gateway for cards and less-common methods - where direct integration is genuinely painful - and a direct M-Pesa integration for the channel that carries most of your volume.

The way to keep this flexible is architectural: put every payment provider behind one internal interface in your system, so your application asks 'take this payment' without caring whether M-Pesa, a bank or a gateway fulfils it. Then you can add, drop or switch providers as your volume and costs evolve, without rewriting your app each time.

How Upeosoft helps you decide and build

We start with your numbers - volume, channel mix, growth - and tell you honestly whether a gateway, direct integration, or a blend serves you best, rather than defaulting to whichever is easiest to sell. Then we build it behind a clean provider-agnostic layer, so your payment stack can evolve as you grow without a rewrite.

If you are choosing a gateway, outgrowing one, or want to bring your highest-volume channel in-house, talk to Upeosoft and we will design a payment setup that fits your economics, not just your launch date.

Frequently asked questions

What exactly is a payment gateway or aggregator?

It is a service that sits between you and the underlying payment rails. Instead of integrating M-Pesa, cards and banks separately, you integrate the gateway once, and it routes each payment to the right rail and settles the combined money to you. Pesapal, Flutterwave, DPO Group, Cellulant (Tingg), Kopo Kopo, iPay and Paystack are examples operating in Kenya. You trade some margin and control for a lot less integration work.

Is a gateway more expensive than going direct?

Per transaction, usually yes - a gateway takes a percentage or fixed fee on top of the underlying rail's cost. Direct M-Pesa, for instance, only carries Safaricom's own tariff. But 'expensive' depends on volume. At low volume, a gateway's fee is trivial next to the cost of building and maintaining several direct integrations. At high volume, that same percentage can exceed a developer's salary, which is when direct starts to pay for itself.

Do I need a gateway to accept card payments?

Practically, for most businesses, yes. Accepting cards directly means dealing with an acquiring bank and PCI-DSS compliance, which is heavy. A gateway handles the card acquiring and keeps sensitive card data off your servers, dropping your PCI burden to the simplest level. So even businesses that integrate M-Pesa directly often still use a gateway specifically for cards, and wire M-Pesa themselves.

Can I switch from a gateway to direct later?

Yes, and many businesses do exactly that as they grow. The usual path is to launch fast on a gateway, prove the model, then move your highest-volume channel - typically M-Pesa - to a direct integration once the transaction fees justify the build. The key is to design your system so the payment provider is swappable behind a clean internal interface, so switching later is a configuration change, not a rewrite.

How do I choose between them?

Weigh four things: volume, channel mix, control, and time. High M-Pesa volume pushes towards direct; needing cards and many methods fast pushes towards a gateway. If you need to launch next month, a gateway wins on speed. If payments are your core and you want full control of the flow, data and cost, direct is worth the investment. Most mature setups are a deliberate blend of both.

Karani Geoffrey
Karani Geoffrey
Founder & CEO, Upeosoft

Karani Geoffrey is the Founder & CEO of Upeosoft, a software and automation company rooted in Kenya. He builds custom software, AI systems, and production-grade ERPNext for businesses across East Africa, and writes about the Kenyan realities - eTIMS, M-Pesa, SHIF, unreliable internet and power - that make or break real systems.

Next step

Want this working in your business?

Upeosoft builds and hardens the systems behind this article - for real Kenyan operations, with eTIMS, M-Pesa and offline realities handled.

Keep reading

Kenyan Compliance and Integrations

Accepting Card Payments Online in Kenya: PCI-DSS, 3D Secure and Liability

Cards reach customers M-Pesa cannot - diaspora, corporate and international buyers. But card acceptance brings PCI-DSS, 3D Secure and chargebacks. Here is what you take on and how to keep it light.

7 min readRead article →
Kenyan Compliance and Integrations

How to Integrate the M-Pesa Daraja API Into Your System

The Daraja API is Safaricom's official gateway to M-Pesa. This is the practical path from developer credentials to a live, reconciling integration - and the pitfalls along the way.

6 min readRead article →
Kenyan Compliance and IntegrationsBuyer's guide

What Payment Integration Really Costs: Fees, Setup and Hidden Charges

The sticker price of a payment integration is the small part. The real cost is the percentage skimmed from every transaction, forever - plus the charges nobody mentions until they hit your statement.

7 min readRead article →