Payment routing is the logic that decides which payment gateway processes each online payment. Instead of sending every transaction to one gateway, a routing layer picks a gateway based on rules such as payment method, amount and recent success rates, and can retry through another gateway when the first one fails.

If you have ever watched your payment dashboard during a big sale, you know the feeling. Orders are coming in, and then for twenty minutes the UPI success rate drops off a cliff. Nothing changed on your side. The problem sat somewhere between your gateway, the bank and the UPI app, and you had no way to send customers anywhere else.

Payment routing exists for exactly that moment. This guide explains what it is, the main types of routing, and the practical things to get right before you switch it on.

What does payment routing mean?

Payment routing is the decision about which payment gateway, or which acquiring path, a transaction should go through. When a business has only one gateway, there is nothing to decide. Once you connect two or more, every payment can be sent to the one that is most likely to succeed, or the one that is cheaper for that payment method.

The routing layer sits between your checkout and your gateways. Your website or app talks to that layer once, and the layer talks to the gateways. That is the basic idea behind a multi PG payment gateway setup.

How does payment routing work, step by step?

  1. The customer chooses a payment method, say UPI or a credit card, and taps Pay.
  2. Your checkout creates the payment through the routing layer instead of calling a gateway directly.
  3. The routing layer looks at its rules and the data it has: payment method, amount, card network or bank, and how each gateway has been performing recently.
  4. It sends the payment to the chosen gateway, which takes the customer through the usual UPI, OTP or net banking screen.
  5. If the gateway returns a clear technical failure, the routing layer can offer the customer a retry through a different gateway.
  6. The final status comes back through the gateway's webhook, and your order is marked paid or failed.

What are the main types of payment routing?

1. Rule-based routing

You write the rules and the system follows them. All UPI to gateway A, all cards above ₹10,000 to gateway B, international cards to gateway C. It is predictable and easy to explain to your finance team. The weakness is that the rules do not notice when gateway A is having a bad afternoon.

2. Success rate based (smart) routing

Here the routing layer keeps watching success rates over a short window, often per payment method and sometimes per bank, and shifts traffic towards whichever gateway is doing better right now. This is what most people mean when they say smart routing or dynamic routing.

3. Cost-based routing

Fees are not identical across gateways or methods. Cost-based routing sends a payment to the cheaper option when performance is roughly equal. Used alone it can backfire, because a cheaper gateway that fails more often costs you more in lost orders than it saves in fees.

4. Failover routing

Failover is the simplest form and often the most valuable. One gateway is primary and another is the backup. If the primary is down or timing out, new payments go to the backup until things recover.

5. Volume split

Some businesses split traffic by percentage, for example 70 to 30, to keep both gateway relationships active and to compare them on real data. It also helps when you are negotiating pricing.

Does smart routing actually improve payment success rates?

It improves the part of your failures that comes from the gateway side: outages, slow responses, and gateways that happen to perform poorly for a certain bank or method. It does nothing for a customer who has insufficient balance or types the wrong UPI PIN. So before you expect a big jump, split your failed payments into those two groups. Our guide on why online payments fail walks through how to do that.

In practice, the gain is largest for businesses with high volume, heavy UPI usage and sales peaks, because that is where a short gateway problem turns into a lot of lost orders.

What should you get right before turning on routing?

  • Unique order references for every attempt. If a payment is retried on a second gateway, each attempt needs its own reference so you never confuse two attempts for one payment.
  • Do not retry pending payments. A payment that is still pending at the bank may complete a minute later. Retrying it on another gateway is how customers end up charged twice. Check the status first.
  • One place for webhooks. With more than one gateway, callbacks arrive in different formats from different systems. Collect them in one place and log them, so support can answer "where is my payment" quickly.
  • Reconciliation by gateway. Each gateway settles its own payments on its own cycle. Your finance team needs a view that matches orders to the right settlement.
  • Measure the right success rate. Count successful payments divided by payment attempts that reached the gateway. If you include people who closed the checkout before choosing a method, the number will hide real gateway problems.

For a full list of rules with examples and the order to apply them, see payment routing rules.

Payment routing at a glance

Routing type How it decides Best for Watch out for
Rule-based Fixed rules by method, amount or card type Simple, predictable setups Does not react to live problems
Smart (success rate) Recent success rates per gateway High volume, mixed payment methods Needs enough traffic to measure well
Cost-based Lowest fee for the method Businesses with thin margins Cheaper can mean more failures
Failover Backup gateway when primary is down Everyone with two gateways Backup must be live and tested
Volume split Fixed percentage per gateway Comparing gateways, keeping both active Ignores which one is performing better

Where JustPe fits

JustPe Multi PG gives you one integration in front of multiple payment gateways, so you can set a primary and backup gateway per payment method and receive every gateway's callbacks in one place. If you are still deciding whether you need more than one gateway at all, read single vs multiple payment gateways first, or talk to our team about your volumes.

Frequently asked questions

What is payment routing in simple words?

Payment routing means choosing which payment gateway should process a particular payment. A business connected to more than one gateway uses routing rules to send each transaction to the gateway most likely to complete it, or the one that costs less for that payment method.

What is the difference between rule-based and smart routing?

Rule-based routing follows fixed rules you set, for example all UPI payments go to gateway A. Smart or dynamic routing changes its choice based on live data such as success rates over the last few minutes, so traffic moves away from a gateway that is struggling.

Can payment routing cause double charges?

It can if retries are handled badly. A good routing setup only retries when the first attempt has clearly failed, uses a unique order reference for every attempt, and checks the status of pending payments before trying another gateway.

Do I need multiple payment gateways to use payment routing?

Yes. Routing only has something to choose between when you have at least two gateways or two acquiring paths connected. With a single gateway, the gateway itself may route internally between banks, but you do not control it.

Keep reading

Ready to get started?

It only takes a few minutes to register yourself as a JustPe agent.

Be a JustPe Agent