If you already use more than one payment gateway, or are about to, routing rules are where the real gains come from. The trick is not to use every rule. It is to pick the few that match where your payments actually fail. Wondering how this compares to AI routing? See AI payment routing explained. For the basics, start with what is payment routing.

14 payment routing rules you can use

1. Route by payment method

Example: All UPI payments to Gateway A, all cards to Gateway B.

When to use it: The simplest rule and the right first step when your gateways are clearly stronger on different methods.

2. Route by transaction amount

Example: Payments above ₹10,000 go to Gateway B; smaller ones to Gateway A.

When to use it: High-value payments are where a failure hurts most, so send them to the gateway with the best record for large tickets.

3. Route by card network

Example: RuPay cards to Gateway A, Visa and Mastercard to Gateway B.

When to use it: Useful when gateways differ in network support or pricing for a particular network.

4. Route by card type

Example: Credit cards to Gateway B, debit cards to Gateway A, prepaid cards to Gateway A.

When to use it: Credit and debit cards often carry different fees and approval patterns.

5. Route by issuing bank (card bin)

Example: Cards issued by one bank go to the gateway that has the better success rate for that bank.

When to use it: Worth it at higher volume, once you have enough data per bank to see a real difference.

6. Route by upi flow

Example: UPI intent on mobile to Gateway A, UPI collect and QR to Gateway B.

When to use it: Intent, collect and QR flows behave differently, and gateways are not equally good at all three.

7. Route by domestic vs international

Example: International cards to the gateway that supports international payments.

When to use it: Often a hard requirement, because not every gateway account is enabled for international cards.

8. Route by time of day or sale window

Example: During a planned sale, split traffic across both gateways instead of loading one.

When to use it: For flash sales and festive offers where traffic arrives in a short burst.

9. Route by success rate threshold

Example: If Gateway A's UPI success rate in the last 15 minutes falls below your threshold, move UPI to Gateway B.

When to use it: Turns fixed rules into smarter, self-correcting routing.

10. Route by failover on downtime

Example: If Gateway A is down or timing out, send everything to Gateway B until it recovers.

When to use it: Every business with two gateways should have this rule, whatever else it uses.

11. Route by cost

Example: When two gateways perform about the same for a method, use the cheaper one.

When to use it: Good as a tie-breaker. Dangerous as the only rule, because a cheaper gateway that fails more costs you orders.

12. Route by volume split

Example: 70% of card traffic to Gateway A, 30% to Gateway B.

When to use it: To keep both gateways warm, compare them on live data, and strengthen your hand in pricing talks.

13. Route by retry on another gateway

Example: If the first attempt fails with a technical error, the customer's retry goes through the other gateway.

When to use it: Recovers payments without the customer doing anything differently. Never retry a payment that is still pending.

14. Route by recurring payments and mandates

Example: Keep subscription renewals on the gateway where the customer's mandate was created.

When to use it: Mandates and saved card tokens are usually tied to the gateway that created them, so these payments should not be routed elsewhere.

In what order should routing rules run?

Rules can conflict. A ₹15,000 UPI payment might match an amount rule and a method rule at the same time. Decide the order up front:

  1. Hard requirements: international cards, mandates and saved tokens that must stay on one gateway.
  2. Health: never send traffic to a gateway that is down or below your success threshold.
  3. Preference rules: method, amount, card type, bank, UPI flow.
  4. Tie-breakers: cost and volume split.
  5. Retry: if the attempt fails with a technical error, the retry goes to the other gateway.

Example rule set for a growing online business

Here is a simple setup for a business with two gateways that takes most of its payments through UPI:

PriorityRuleRoute to
1Subscription renewal (existing mandate)Gateway that created the mandate
2Primary gateway down or below success thresholdBackup gateway
3UPI (intent, collect, QR)Gateway A
4Credit cards and international cardsGateway B
5Everything elseGateway A
6Technical failure on first attemptRetry on the other gateway

Run it for a few weeks, compare success rates per method on each gateway, and only then add amount or bank rules where the data shows a clear gap.

Common mistakes with payment routing rules

  • Too many rules too early. Without enough data per bank or amount band, detailed rules just add noise.
  • Routing on cost alone. Saving a fraction of a percent in fees is not worth a lower success rate.
  • Retrying pending payments. A pending payment can still succeed. Retrying it on another gateway risks charging the customer twice.
  • Forgetting refunds. Refunds must go back through the gateway that took the payment, so store which gateway handled each order.
  • No failover rule. Even if you use nothing else, set a backup gateway. See backup payment gateway.

Setting up routing rules with JustPe

JustPe Multi PG gives you one integration in front of your payment gateways, with a primary and backup gateway for each payment method and every gateway's callbacks in one place. Tell us your payment mix and the gateways you use, and our team will help you work out which of these rules are worth setting up for your traffic.

Want to see what this would look like for your business? Share your monthly payment volume and the gateways you use today, and we will suggest a setup. Talk to the JustPe team.

Frequently asked questions

What is rule-based payment routing?

Rule-based payment routing sends each online payment to a payment gateway according to rules you define, such as payment method, amount, card type or issuing bank. It is predictable and easy to audit, and it is usually the first step before adding success-rate based smart routing.

Which routing rule should I start with?

Start with two rules: route by payment method, and fail over to a backup gateway when the primary is down. Together they cover most of the benefit. Add amount, card type or bank rules later, once you have a few weeks of data from both gateways.

In what order are routing rules applied?

Hard requirements come first, such as international cards or recurring mandates that must use a specific gateway. Then failover, so a down gateway is never chosen. Then your preference rules like method, amount or bank. Cost and volume split come last as tie-breakers.

Is rule-based routing better than smart routing?

Neither is better in every case. Rules are transparent and work with little data. Smart routing reacts to live success rates but needs enough volume to measure well. Many businesses use rules for the structure and a success-rate threshold rule to handle bad patches.

Ready to get started?

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

Be a JustPe Agent