Gateway Routing
How Nile Pay routes payments to payment providers
Nile Pay routes each transaction to the optimal payment provider based on multiple factors. The routing behavior is configured at the merchant level through the dashboard.
Routing Modes
auto
The system selects the best gateway using an algorithm that considers current gateway health, historical success rates, latency, transaction cost, and provider capabilities.
Auto mode provides the highest success rates and adapts to real-time provider conditions without merchant intervention.
preferred
Your preferred gateway is attempted first. If it becomes unavailable or the transaction is likely to fail, the system falls back to other configured gateways.
Use preferred mode when you have a primary provider relationship but want resilience against outages.
exclusive
Transactions route exclusively to a single specified gateway with no fallback. This mode requires a direct agreement with the provider and is used when merchant-specific pricing or terms apply.
Exclusive mode offers no automatic failover. If the gateway is down, transactions will fail.
Routing Algorithm
When routing decisions are made, the system evaluates:
| Factor | Description |
|---|---|
| Gateway health | Real-time availability status |
| Success rates | Historical transaction success percentages |
| Latency | Average response time from provider |
| Cost | Transaction fee for the provider |
| Capabilities | Supported payment methods and currencies |
The algorithm weighs these factors differently based on transaction characteristics, such as payment method, amount, and currency.
Configuration
Routing mode is configured in the Nile Pay dashboard under merchant settings. The SDK submits transactions without specifying routing preference, routing decisions are made server-side based on your merchant configuration.
If you need to route specific transactions differently, contact support to discuss custom routing rules.