A payment orchestration layer sits between a business and the payment providers it uses. The business integrates once; the layer decides which provider handles each payment, talks to that provider in its own dialect, and turns everything that comes back into one consistent model. That's the idea. The architecture is what makes it hold up under real traffic, real failures and real money.
This is a vendor-neutral reference for engineers and architects, whether you're building such a layer, evaluating one, or just want to understand what sits behind "one integration, many providers". It describes the components, how a payment flows through them, and the principles that keep the system correct when providers misbehave.
The architecture at a glance
Two paths run through an orchestration layer: the request path, which creates and routes payments in real time, and the event path, which brings back what providers report later.
- 1Unified APIValidates, applies idempotency, creates the payment
- 2Routing engineFilters eligible providers, ranks them, records why
- 3ConnectorTranslates to the chosen provider's API
- 4ProviderGateway, aggregator, acquirer or bank
- 5State storeRecords the attempt and its normalised status
The event path runs the other way: provider webhooks and settlement files arrive, are verified and normalised by the same connectors, update the state store, and are passed on to the business as one consistent stream of events.
The components
Each component has one job. The table summarises what goes wrong when a component is missing or weak, which is usually how teams discover they needed it.
| Component | Responsibility | Symptom if it's missing |
|---|---|---|
| Unified API and data model | One request and status model for every provider | Provider-specific code spreads through the business's systems |
| State store | Payments, attempts, refunds and their state transitions | Lost or contradictory statuses; no history for support |
| Routing engine | Chooses a provider per payment and records the decision | Static routing; no way to react to an outage or cost change |
| Connectors | Translate requests, responses, statuses and errors per provider | Every provider change becomes a business-wide change |
| Token vault | Holds card tokens or card data under strict controls | Saved cards locked to one provider; wide compliance scope |
| Retry and failover controller | Decides when a failure can be retried and where | Lost recoverable payments, or duplicate charges |
| Event ingestion | Verifies, de-duplicates and normalises provider webhooks | Missed or double-processed events |
| Reconciliation | Matches payments to settlements and bank credits | Money that can't be accounted for |
| Observability | Metrics per provider and method; decision logs | Outages noticed by customers first |
| Configuration and secrets | Provider credentials, rules and limits per environment | Test keys in production, or the reverse |
Unified API and data model
Everything else depends on getting the data model right. A good model separates the order or intent (what the customer is paying for) from payment attempts (each try with a provider), and from refunds, disputes and settlements that attach to a successful payment. It defines one set of statuses, one error format with a category and a retryable flag, and amounts as integers in minor units with an explicit currency. Our guides to storing money in code and duplicate payments go deeper on amounts and on the order-attempt split.
Routing engine
Routing is usually two stages. First, hard filters remove providers that can't take this payment at all: wrong method, currency or amount range, a provider that doesn't hold the customer's saved token or mandate, or one that's currently paused. Then the remaining candidates are ranked by rules the business sets and by live signals such as success rate, response time and cost. The engine should store its decision on the payment: which providers were considered, which were excluded and why, and which rule or score won. That record is what makes routing explainable to support teams and auditors. Our guide to smart routing explains the decision logic.
Connectors
A connector is an adapter for one provider. It turns the unified request into the provider's request, passes the idempotency key on where the provider supports one, calls the provider with the right credentials, and maps everything that comes back, statuses, error codes, references such as RRN or UTR, into the unified model. Connectors also verify that provider's webhook signatures and parse its settlement files. Keeping all of a provider's quirks inside its connector is the single most important boundary in the system: when a provider changes its API, one connector changes. Our guide to payment API versioning covers how to make connectors tolerant of provider changes.
Token vault
If customers save cards, something has to hold the reference to them. Card data is the most sensitive data in the system and brings PCI DSS scope with it, so most architectures keep it out of the orchestration layer's general systems entirely, using provider-hosted fields and network or provider tokens. In India, RBI's card-on-file rules mean merchants can't store actual card numbers at all, and card-on-file tokens are specific to a merchant and token requestor. That has a routing consequence: a saved-card or recurring payment usually has to go to the provider that holds the token or mandate. Our guide to PCI DSS SAQ types explains how these choices affect compliance scope.
Retry and failover controller
Some failures are worth retrying, on the same provider or another; many aren't. The controller classifies each failure (provider error, timeout, issuer unavailable, customer decline, risk decline), retries only recoverable categories, keeps the same idempotency key and payment reference across attempts, and never retries a payment whose outcome is unknown without first checking its status. Our guide to payment API timeouts explains why that last rule matters.
Event ingestion
Provider webhooks arrive at the connectors, are verified, stored with their event IDs, acknowledged quickly and processed asynchronously. Processing applies each event to the payment's state machine, ignoring events that would move a payment backwards, and emits a normalised event to the business. Because providers deliver at least once and not always in order, every consumer has to be idempotent. Our guide to exactly-once payment processing covers the patterns.
Reconciliation and observability
Reconciliation ingests each provider's settlement reports, whatever their format, and matches them to payments, refunds and fees, then to bank credits; our reconciliation guide explains the three-way match. Observability means metrics broken down by provider and method (success rate, response time, timeouts, pending age), plus the routing decision log. Our guide to payment success rate covers measuring it without distortion.
How a card payment flows end to end
Putting the pieces together for a single payment:
- The business calls the unified API with an amount, currency, method, its own reference and an idempotency key. The API validates the request and creates a payment and its first attempt.
- The routing engine filters and ranks providers and records its decision on the payment.
- The chosen connector sends the provider's request. The provider returns a next action, such as a 3-D Secure challenge or a UPI intent, which the API passes back to the business's checkout.
- The customer authenticates. The provider sends a webhook; the connector verifies it, and the state store moves the attempt to authorised or failed.
- If the attempt failed with a recoverable reason, the retry controller may start a new attempt on another provider, under the same payment and reference.
- The business receives one normalised event for the payment's final state, whichever provider handled it.
- Later, the provider's settlement file arrives; reconciliation matches the payment, its fees and the bank credit.
Design principles that keep it correct
Architectures like this fail in predictable ways. These principles prevent most of them:
- Idempotency end to end: from the business's request, through every retry, to the provider call and every event consumer.
- Unknown is a state: a timeout never becomes "failed" without a status check.
- One success per intent, enforced in the state store, not just hoped for.
- Record decisions, not just outcomes: why a provider was chosen or excluded.
- Isolate provider quirks in connectors, and map unrecognised statuses to "unknown", never to failed or succeeded.
- Asynchronous by default: payments finish later than requests do, so the model has to cope with that.
- Separate test and live completely: credentials, data, endpoints and webhook secrets.
- Know where data lives. If you process payments in India, RBI's 2018 direction on storage of payment system data requires that data to be stored only in India; check with your providers how it applies to your setup.
Build or buy?
The components above are individually well understood. The cost is in the long tail: keeping connectors current as providers change, mapping every provider's statuses and error codes, parsing every settlement format, and operating it all around the clock. That's the trade-off our comparison of LILPE and building in-house sets out. If you're evaluating platforms, our orchestration evaluation guide lists the questions that test each component.
LILPE's platform overview describes its own capabilities against this picture, including one integration to multiple providers, the unified API and intelligent routing.
Frequently asked questions
What is a payment orchestration layer?
A layer between a business and its payment providers. The business integrates with it once; it routes each payment to a suitable provider, translates requests and responses for each provider, and presents payments, refunds, events and settlements in one consistent model.
What are the main components of payment orchestration architecture?
A unified API and data model, a state store for payments and attempts, a routing engine, a connector per provider, a token vault, a retry and failover controller, webhook ingestion, reconciliation, observability, and configuration and secrets management.
How does a payment orchestration platform connect to providers?
Through connectors, one per provider. Each connector translates the unified request into the provider's API, maps the provider's statuses, errors and references back into the unified model, verifies its webhooks and reads its settlement files.
Can saved cards be routed to any provider?
Not always. Card tokens and recurring mandates are usually held by a specific provider, and in India card-on-file tokens are specific to a merchant and token requestor. Payments that rely on a stored token or mandate generally have to go to the provider that holds it.
Official sources
- RBI — Storage of Payment System Data (6 Apr 2018)System providers to ensure the entire data relating to payment systems operated by them is stored in a system only in India; audit by CERT-In empanelled auditors.
- RBI — Tokenisation – Card Transactions: Permitting Card-on-File Tokenisation (CoFT) Services (7 Sep 2021)
- PCI Security Standards Council — PCI DSS
- IETF — The Idempotency-Key HTTP Header Field (Internet-Draft)
Last reviewed . Examples, amounts and screens marked illustrative are not LILPE figures.




