This page is part of the REST API Guides. Using the JavaScript library instead? See Payments Library Guides.
Why Use Multi-Gateway Failover
Without Orchestra, a provider outage means lost transactions. With multi-gateway failover, your payment flow stays resilient:- Provider downtime — If Stripe is down, transactions automatically route to Adyen
- Regional issues — Network problems in one region don’t affect your entire payment flow
- Rate limiting — Exceed limits on one provider, overflow to another
- Business continuity — Maintain high payment availability
How It Works
Add afallbackUpgs array to your charge or authorize request. Each entry specifies a backup Payment Gateway Account to try if the primary fails:
paymentGatewayAccountName). If it fails with a recoverable error, Orchestra tries each fallback in order until one succeeds.
Basic Example
The fallbackUpgs Array
Each entry in the fallbackUpgs array has these fields:
| Field | Type | Required | Description |
|---|---|---|---|
paymentGatewayAccountName | string | Yes | The name of the backup Payment Gateway Account |
paymentGatewayCertName | string | No | Client certificate name, if the gateway requires one |
Failover Logic
Orchestra tries each gateway in order:- Primary attempt — Transaction sent to the gateway specified in
paymentGatewayAccountName - Check result — If successful, return immediately
- Evaluate failure — If the failure is recoverable, try the next gateway in
fallbackUpgs - Repeat — Continue until success or all gateways exhausted
- Final result — Return success from the first working gateway, or the last failure
What Triggers Failover
Orchestra attempts the next gateway when the primary fails with a recoverable error:- Gateway returns an error response (500, 503)
- Gateway is unreachable (network timeout)
- Gateway temporarily rejects the transaction
What Doesn’t Trigger Failover
Orchestra does NOT fail over when the failure is non-recoverable:- Card declined by the issuing bank (legitimate decline)
- Invalid card number or CVV
- Card expired
Works With Charge and Authorize
ThefallbackUpgs parameter is available on both operations:
- Charge (
POST /PaymentGateway/charge) — Immediate payment with failover - Authorize (
POST /PaymentGateway/authorize) — Authorization hold with failover
Authorize with Failover
Configuration Strategies
Primary + Backup
Most common setup: one primary provider, one backup for emergencies.Geographic Routing with Failover
Combine BIN-based routing with failover. Use the card’s issuer country to pick the primary gateway, and add regional backups:With Client Certificates
Some gateways require client certificates. UsepaymentGatewayCertName in the fallback entry:
Response
The response includes which gateway processed the transaction. Use thegatewayName field to identify which provider succeeded:
- Cost analysis per provider
- Performance monitoring
- Ensuring subsequent operations (capture, void, refund) go to the correct gateway
Testing Failover
Test your failover configuration using mock gateways. See Mock PSPs for setup details.Best Practices
Order by Preference
List fallback gateways in order of preference — lowest cost or best performance first.
Monitor Usage
Track which gateways are being used. High failover rates indicate issues with the primary.
Test Regularly
Verify failover works by simulating primary gateway failures in sandbox.
Geographic Alignment
Use providers with strong presence in your target markets as primary for those regions.
Related
How Orchestra Works
Understanding Orchestra’s architecture
Payment Gateway Accounts
Configure multiple providers
Charge Payments
Basic charge operation
Card Metadata Lookup
Get card issuer country for BIN-based routing