Integrating Payment Processors: Architecture for More Than One

Contents

Share this article

Key icon representing access or security

Key Takeaways

  • The cost of a second processor integration is set during the first one. Processor vocabulary leaking into the domain model, business logic living in webhook handlers, provider SDK objects traveling through the codebase, and tokens stored only in a processor’s vault are difficult and expensive to rework.
  • The token vault is the single biggest lock-in lever we encounter. If stored card credentials live inside one processor’s vault, leaving means re-tokenizing your entire customer base.
  • Network tokens are the most portable option, auto-updating when a card is reissued and improving authorization rates on recurring payments, but portability depends on your Token Requestor ID setup.
  • Below roughly $1M in annual volume in a single market, a single well-chosen processor is usually correct, and multi-processor architecture is premature.

Integrating one payment processor is relatively simple, since you are dealing with a well-documented process.

Integrating a second is where the engineering becomes critical, and the cost of this second process is set during the first integration.

If processor-specific concepts leak into your domain model, and if your card tokens live in the processor's vault, the second integration can quickly become a full rewrite, rather than an addition.

Assuming you have come right with the first integration, the PCI trade-offs, and the webhook handling, let’s look at everything you need to know about the second, including how the cost is set almost entirely by choices made during the first.

Experienced developers who have worked on integrations in the fintech industry before can help you minimize the costs that you don’t even know about, and set you up to scale successfully in the future.

At Trio, we provide these fintech specialists at affordable rates, from nearshore regions like LATAM.

View capabilities.

The Second Processor Is Where the Engineering Is

Teams end up with more than one processor for a handful of legitimate reasons.

  • Redundancy matters because a processor outage stops revenue. A payment platform that's down for, for example, twenty minutes during a peak sales window has lost more than twenty minutes of revenue. A lot of that traffic won’t come back, and your reputation would be affected.
  • Authorization rates vary by geography and issuer, so a decline at one acquirer can be approved at another, purely because of which bank relationships a given acquirer happens to hold. A second live integration turns a rate negotiation into a credible alternative.
  • Geographic coverage often requires local acquiring or local payment methods a single global processor doesn't support well; a card-heavy US processor may simply not offer the bank transfer rails a European market expects as a default checkout option.
  • Avoiding vendor lock-in is also another common reason, but in most cases this only factors once the effects of a lock-in have actually been felt.

Realistically, if you are below roughly $1M in annual volume in a single market, a single well-chosen processor is usually the best approach. Building multi-processor architecture ahead of that need is premature.

The case for a second processor strengthens meaningfully with multi-currency operations, meaningful cross-border volume, or a false-decline rate above roughly 10%.

What the First Integration Gets Wrong

Each pattern that usually results in issues later is the fastest correct path to a working first integration.

A that does the elaborate version first for everything is over-engineering against a problem it doesn't have yet, spending real time abstracting away from a second processor that may never arrive.

The useful way to decide where to go the extra mile is to think about which choices are cheap to reverse, and which choices are expensive or effectively impossible to reverse.

  • Processor vocabulary in the domain model: Storing a field like a Stripe payment intent ID directly on an order, or persisting the processor's own status strings as-is, works fine with one processor. With two, every consumer of that field needs to know which processor produced it, and status vocabularies don't map cleanly onto each other.
  • Webhook handlers doing business logic: A processor's webhook fires and the handler updates the order, sends the confirmation email, and writes the ledger entry, all in one place. Fine with one processor. With two, there are now two handlers doing near-identical things with subtly different payloads.
  • Provider SDK objects are passed around the codebase: The processor's own SDK types travel through service boundaries and into unrelated modules. Fine with one processor. With two, every call site that touches those types becomes a conditional.
  • Tokens stored only in the processor's vault: Fine with one processor, and genuinely costly later.

The Abstraction Layer: What to Normalize, What Should Leak

A few things need to belong squarely in your own domain, and are processor-agnostic by design. One of those things is your own payment identifier, with the processor's reference stored as an attribute rather than used as the key.

Normalize your status model, a state machine you own, with each processor's specific statuses mapped into it at the boundary.

Generally, states like authorized, captured, settled, refunded, reversed, and disputed work best with the legal transitions between them defined once. 

A normalized error taxonomy is also essential, since processors express declines differently. Your retry logic should key off your own categories (retryable, hard decline, soft decline, configuration error, network failure), not theirs.

Finally, normalize idempotency keys that you generate and pass to the processor, as well as your ledger entries, which should never contain a processor-specific concept at all.

Webhooks deserve their own treatment, since they're the most under-designed part of most multi-processor integrations. They arrive at least once, sometimes out of order, occasionally duplicated, and sometimes delayed.

We recommend that you normalize webhooks into your own internal events at the boundary, and let everything downstream consume only those internal events. The handler's job is translation and idempotent recording, not business logic.

Testing gets genuinely harder across processors too.

Sandbox parity between providers is poor, and running N sandboxes means N different behaviors, test card semantics, and failure simulation approaches. Contract tests built against recorded responses from each processor tend to hold up better.

The Token Vault Is the True Lock-In Lever

If stored card credentials live inside a single processor's vault, leaving that processor without re-tokenizing your entire customer base isn't really possible.

In these cases, re-tokenizing means asking every stored-payment customer to re-enter their card. For a subscription business specifically, that's a retention event.

This is a big reason why so many merchants stay with a processor despite high rates.

This is an easy trap to fall into since, at first integration, the processor's own vault is the obvious, free, well-documented default.

Four options exist for you to consider:

  1. A processor vault is simplest, carries the lowest PCI scope for you directly, and creates maximum lock-in.
  2. An independent or neutral vault, a third-party vault or orchestration layer that holds credentials and can present them to multiple acquirers, buys genuine portability at the cost of another vendor sitting in the payment path and typically a per-transaction fee.
  3. Your own vault gives full control and takes on full PCI scope directly, rarely the right answer unless card data handling is genuinely part of your product. PCI scope covers what that scope actually means in practice.
  4. Network tokens, issued directly by the card networks (Visa, Mastercard, and others) rather than by any individual processor, are portable across the acquiring ecosystem and update automatically when the underlying card is reissued, which also tends to improve authorization rates on recurring payments specifically.

There are many reasons why network tokens are one of the most popular options.

Visa's own published research puts the global authorization lift at 4.6% for tokenized transactions versus raw PAN.

One caveat that matters here is that a network token is bound to a Token Requestor ID, so genuine portability depends on that binding being releasable.

The single most useful question is: "If we leave, what happens to our stored credentials?" Ask it during processor selection.

Build, Buy, or Rent: By Layer

"Should we build orchestration or buy it?" is the wrong question on its own because, as we have already established, orchestration isn't one thing.

It splits into four layers that can be owned or rented independently:

Layer What It Is Default Recommendation
Token vault Where stored credentials actually live Own it, or keep it portable. This is the lock-in lever.
Routing logic Which processor handles each transaction Own it. Your approval rate and cost data are proprietary, earned one transaction at a time.
Connectivity The integrations, certifications, network mandates themselves Usually rent. A decaying layer requires constant maintenance for no lasting differentiation.
Compliance and fraud tooling Screening, chargeback handling, PCI scope Usually rent. Specialist, heavily regulated, expensive to build well from scratch.

We always recommend that our clients try to own the layers that hold switching cost and proprietary data. They can then rent the layers that decay and require ongoing certification maintenance regardless of who operates them.

Payment orchestration diagram for integrating payment processors: own the token vault, routing logic, and connectivity, but rent compliance and fraud to own the switching cost

Failover Is Not Just for Outages

There are two types of failover that you need to understand:

  • Hard failover covers a processor being genuinely down, among other things. These can’t be retried.
  • Soft-decline retry covers a transaction declined for reasons that aren't really a hard no. Retrying through a second acquirer before the customer sees an error recovers revenue.

This second case is both more common and more valuable in practice, since you could still complete the transaction.

Both cases, however, share the same underlying requirements.

Idempotency has to hold across processors. A retry through processor B must not double-charge if processor A's original response simply arrives late.

Token portability is a precondition either way, too. If a credential only works with processor A, failover to processor B is theoretical.

Finally, health check thresholds need to be tuned to actual traffic patterns, not left at whatever defaults shipped with the tooling.

Reconciliation Across Multiple Processors

Each processor sends its own settlement file, in its own format, on its own schedule, with its own fee structure and timing.

Your ledger has to reconcile against all of them and roll up into one coherent view.

The different categorizations mean you could struggle with transactions attributed to the wrong processor inside your own records. Fee normalization across processors is also what actually makes cost-based routing decisions possible in the first place.

The reconciliation architecture itself doesn't fundamentally change. The processor's settlement file is still the source of truth, and your own database is still an opinion.

What changes is that there are now several sources of truth, and they don't agree with each other on format, timing, or vocabulary. Payment reconciliation systems are essential.

Who Builds This

Unfortunately, a lot of these mistakes are completely invisible at code review.

A processor-specific field on a domain object, a webhook handler quietly doing business logic, and a vault decision made once inside a contract negotiation all pass review comfortably, but can cause major issues during migrations later.

The value of prior experience is that developers know which of today's reasonable shortcuts are genuinely cheap to undo later and which ones are effectively permanent.

When hiring, you need to look for someone who has run a processor migration or operated a live multi-processor setup.

To vet for this, ask directly what they'd do about stored credentials when switching processors.

At Trio, we place payments engineers who've operated multi-processor architecture in production.

Request a consult.

Frequently Asked Questions

Subscribe to our newsletter

Related
Content

Illustration of blockchain integration with financial technology, represented by cubes, dollar signs, and code symbols.

Web3, Blockchain Adoption, and DeFi: A CTO’s Guide to the Future of Fintech

Web3, blockchain, and decentralized finance (DeFi) are playing a major role in fintech innovation, and even...

Illustration of a card payment terminal and credit card with a cloud symbolizing cloud-based payment processing.

Payment Gateway Integration: A 7 Step Guide

Payment gateway integration is an absolutely essential feature for even the most basic MVP. If done...

Woman selecting a smiley-face box from an AI model vending machine stocked with LLM, vision, audio, and code options, illustrating what Hugging Face is

What Is Hugging Face?

Nvidia has reportedly agreed to pay $12.9 billion for a company most people outside AI development...

Man Interacting with FinTech Features

Overcoming Fintech App Development Challenges

Fintech apps fail more often than non-financial apps because the challenges they face come from more...

Continue Reading