Payment middleware is the layer between the businesses that take payments and the providers that process them. Merchants connect to it once, and it handles every acquirer, PSP and payment method behind that connection, translating each provider's protocol, status codes and quirks into one consistent API.
Our gateway works as that layer, with one REST API in front of 700+ connectors. Below, you'll find what payment middleware takes off your developers' hands, how merchants connect, how statuses and notifications stay consistent, and how to move onto it from direct integrations.
What payment middleware handles
Without middleware, every new provider is a new integration: its own API, its own test environment, its own way of saying "declined". With it, that work happens once, inside the layer, and your merchants never see it.
The layer takes on four jobs. It translates requests into each provider's format and the answers back into one status model. It routes each payment to a provider under your rules. It keeps card data in a vault and passes tokens around instead of card numbers. And it sends merchants one stream of notifications, whichever provider handled the payment.
How well a layer does the first of those jobs decides how painful a migration is, and it's where payment middleware platforms differ most.
How merchants connect to the payment integration layer
Merchants pick the connection that fits their stack, and all of them reach the same middleware. The table shows the options.
| Connection | How it works | Who it suits |
|---|---|---|
| Hosted checkout | The merchant redirects to a payment page on your domain | Merchants who want the least PCI scope and work |
| JS SDK | Card fields embedded in the merchant's own page | Merchants who want their own checkout design |
| Host-to-host | The merchant's server calls the API directly | Merchants with their own PCI DSS compliance and engineers |
| CMS plugins | Ready plugins for common store platforms | Small merchants on off-the-shelf store software |
| iOS and Android SDKs | Payments inside the merchant's mobile app | App-first businesses |
Most PSPs offer all five and let merchants choose. A merchant can also start on the hosted page and move to the SDK later without changing providers.
Consistent statuses and notifications
The hardest part of connecting many providers is reading what comes back. One acquirer's "pending" is another's "approved with review", and a timeout can mean either a failure or an approval that never reported back.
The middleware maps each provider's answers to one set of statuses, and APIs and webhooks carry them to the merchant.
The safe rule for an unclear answer is to treat it as unresolved until it's confirmed, never to guess it's a failure, because guessing wrong is how a customer gets charged twice. Write this into your merchant documentation, since a merchant who understands your status model opens far fewer support tickets.
Moving onto middleware from direct integrations
A merchant with direct provider integrations doesn't have to rebuild everything at once. Protocol emulation lets a merchant change an endpoint and keep the same connection and tokens, so the switch can happen behind the existing integration.
Migrations run in phases with a route back to the previous platform. Move one stream of traffic, watch it, then move the next, and keep the old route ready in case something needs fixing. Stored cards move separately, by token type: acquirer tokens with their MID data, customer tokens with the card number, and network tokens with the token requestor behind them.
Middleware, gateway or orchestration?
The words overlap, and vendors use them loosely. Payment middleware describes the position, between merchants and providers. A gateway is the same layer seen from the merchant's side, as the thing they integrate. Orchestration describes what the layer does with several providers: routing, cascading and failover. Our platform is all three at once, with one API for merchants and payment routing, cascading and failover behind it.
Questions
What is payment middleware?
It's software that sits between merchants and payment providers, giving merchants one API while it connects to many acquirers and payment methods behind it.
Is payment middleware the same as a payment gateway?
They overlap. A gateway connects merchants to payment processing, and when it connects to many providers through one API, it works as middleware.
Do merchants need to change their integration to use middleware?
Not always. With protocol emulation, a merchant can point an existing integration at a new endpoint, and its connection and tokens carry over.
How does middleware handle a provider's unclear response?
A well-built layer treats the payment as unresolved until the outcome is confirmed, instead of guessing, so a payment isn't retried or reported as failed when it was actually approved.