Skip to content

Case study · Payment switch & unified API

Unified Payment Infrastructure

One API. Multiple Payment Gateways.

We engineered a centralized payment switch that connects multiple payment providers through a unified API, with gateway routing, failover support and country-based payment rules.

Contacting us by WhatsApp or email shares your number or address with us so we can reply. See our Privacy Policy.

Category
Fintech Engineering
Platform
Payment switch & unified API
Technology
Node.jsExpress.jsMongoDBAWS

At a glance

The problem

Supporting several payment providers means several separate integrations, with no single place to decide which gateway should handle a payment or what happens when one is unavailable.

Our approach

A centralized payment switch: one unified API in front of multiple payment providers, with gateway routing, failover support and country-based payment rules handled in one place.

Engineering challenge

Bringing providers with different APIs behind one consistent interface, and applying routing, failover and country rules centrally rather than in every integration.

The problem

Many providers, many integrations

Working with multiple payment providers creates complexity that grows with every gateway added.

01

One integration per provider

Each payment provider has its own API, so every additional gateway adds another integration to build and maintain.

02

No central routing decision

Without a central layer, choosing which gateway handles a payment has to be decided separately in each integration.

03

Provider availability

When a gateway is unavailable, payments need a defined fallback path.

04

Country-specific requirements

Payment rules that differ by country need to be applied consistently.

The solution

A centralized payment switch

One layer that sits between the platform and its payment providers.

Unified API

The platform works with one API for payments, instead of integrating with each provider directly.

Gateway routing

The switch routes each payment to a configured payment gateway.

Failover support

Payments can fail over to another gateway when needed.

Country-based payment rules

Payment rules are applied based on country, from one central place.

How a payment moves through the switch

  1. 01

    One API request

    The platform sends the payment to the switch through the unified API.

  2. 02

    Rules and routing

    Country-based rules and gateway routing determine which provider handles it.

  3. 03

    Failover when needed

    If needed, the switch fails over to another configured gateway.

Integrations

Payment gateway integrations

Providers connected behind the unified API.

  • Stripe
  • Braintree
  • NMI
  • Flywire
  • Google Pay

Architecture

Architecture and engineering

A layered service that keeps payment logic in one place.

  1. Layer 01

    Unified API

    A single API surface built with Node.js and Express.js that the platform uses for payments.

  2. Layer 02

    Routing & rules

    Gateway routing, failover support and country-based payment rules, applied centrally by the switch.

  3. Layer 03

    Gateway connections

    Integrations with Stripe, Braintree, NMI, Flywire and Google Pay behind the switch.

  4. Layer 04

    Data & infrastructure

    MongoDB as the data store, running on AWS.

Technology stack

Built with

  • Node.js

    Runtime for the payment switch service.

  • Express.js

    Framework for the unified API.

  • MongoDB

    Data store for the switch.

  • AWS

    Cloud infrastructure the switch runs on.

Project outcome

One integration point for payments

The platform connects to a single API, while gateway routing, failover and country-based rules live centrally in the payment switch instead of being spread across separate provider integrations.

Building payment infrastructure?

We design and build payment switches, gateway integrations and the backend systems around them.