This guide covers how to build payment routing rules from scratch, in the order a payments team does it. The method works on any platform that lets you set rules outside your own code. Each step ends with something you can see, such as a table, a rule or a report.
01Before you start
Routing rules are only as good as the data behind them. Pull these items together before you write a single rule.
| What you need | Who owns it | Where it comes from |
|---|---|---|
| Transaction history per provider for at least a few months | Payments analyst | Each provider's portal or your own database |
| The fees and settlement terms of each provider | Head of payments | Your signed agreements |
| A list of the providers and MIDs you can send traffic to | Payments engineer | Your account settings at each provider |
| The countries, currencies and methods you sell in | Commercial lead | Your product and sales plan |
| A person who can approve a rule change | Payments lead | Your own change policy |
Note that you don't need a perfect data set. A rough table that a person has read beats a precise one nobody opened.
02How to route payments: step by step
01 Measure each provider as it behaves today
For each provider, count what happened over a fixed period. You want the share of payments approved, the share declined and the reason groups behind the declines, and the typical time to an answer. Add the cost of a transaction on each, taken from your agreements.
Don't mix methods or currencies in one number, because an average across a mixed set hides the very differences routing exists to use. What you see after this step is a table with a provider on each row and a few honest figures in each column.
02 List the things a rule can look at
A rule needs inputs available when the payment arrives. The common ones are the card's BIN, the card type, the currency, the amount, the customer's country and the payment method. Your platform may offer more, so read its documentation before you assume.
Write your list next to the table from step 1. Then mark each input as "known at request time" or "known only afterward". Only the first kind can drive a rule. The second kind, such as how a payment ended, belongs in your reports.
03 Write each rule as a plain sentence first
Before you open any dashboard, write rules in words. "Euro card payments from German cards go to acquirer A." "Payments above a set amount go to the acquirer with the best record on large tickets." "Everything else goes to acquirer B."
A sentence that can't be written plainly can't be tested either. Keep the first set short. Five rules that your whole team understands are easier to test than twenty that only the author can read.
04 Order the rules and name a default
Rules overlap. A German euro payment above a set amount may fit two sentences, so you need to know which wins. Ask the platform how it evaluates rules, and write the order on your sheet from most specific to most general.
Then name a default route for any payment that matches nothing. A missing default is a common reason some payments fail with no clear cause. The default should be your safest, best-known provider. You can see it working when a test payment that fits no rule still reaches that provider.
05 Decide what happens when the chosen provider says no
A route is a first choice. It isn't a promise. Decide, for each rule, whether a soft decline or a timeout should try another provider within the same payment, and which one. Keep hard declines, such as a stolen card, out of that retry path.
Cascading has its own mechanics, and the cascade rules page covers them. For this guide it's enough to write one fallback beside each rule, so that every row of your rule sheet has a "then" and an "else".
06 Enter the rules in the layer and check them one by one
Now move the sentences into the rules section of your platform. Enter them in the order from step 4 and save the set. Then send a test payment for each rule in the sandbox and check where it went.
Don't batch the checks. Test one rule, read the result, then test the next, so that a typo in rule three isn't discovered at rule nine. Keep a column on your sheet for "tested, date, by whom".
07 Start with a small share of traffic
Don't switch the whole business at once. Choose one merchant, one country or a small slice of traffic, apply the new rule set there and keep the rest on the old path. If your platform can split traffic by percentage or by merchant, use that. If it can't, split by country or merchant yourself.
Run it long enough to cover a normal week and a month-end. You'll read the result in the same table you built in step 1, now with a second set of rows for the new rules.
08 Review, change one thing, and record why
After a few weeks, compare the new numbers with your baseline. Change one rule at a time, so you can tell which change did what. Each edit gets a date, a name and a reason in your change log.
A rule set is never finished. Cards, issuers and providers change, and last quarter's best route drifts. A fixed review date keeps the rules current.
03Testing before real traffic
Run these checks in the sandbox before any rule touches live payments.
- A payment that matches exactly one rule goes where that rule says.
- A payment that matches two rules goes where your order says.
- A payment that matches no rule goes to the default provider.
- A simulated soft decline triggers the fallback you wrote, and a simulated hard decline doesn't.
- A rule change is saved with a date and a name, and you can see who made it.
- The route taken is visible afterward in a report or log, for each test payment.
Walk through the list with someone who didn't write the rules. They will find the ambiguity you stopped seeing.
04Rolling back, and what goes wrong
One rule sends too much to one provider. Volume limits, risk limits and agreement terms can all cap what a provider accepts. Check each provider's limits before you route a rule at it, and watch the volume on the first day.
Approval gets worse after a change. Revert to the last rule set that behaved, then look at the segment that moved. A single rule can look fine in the totals and hurt a currency or a card type. Segment before you decide.
Two teams edit rules at the same time. Without an owner, one person's cleanup is another's outage. Give rule changes an approver and, where the platform supports it, use roles to limit who can edit.
A rule depends on data that isn't there. If a rule looks at an input that arrives empty on some channels, those payments fall to the default and your numbers drift. Compare the share of payments that hit the default with what you expected, and fix the input, not the rule.
05Where the platform does these steps
The platform keeps the rules in one place and applies them to every connected provider, so your checkout makes one call whichever acquirer takes the payment. You set cost-based, BIN-based and performance-based rules in the dashboard, and trusted, high-value or recurring customers can be sent to selected MIDs.
Analytics show approval rates, declines, latency and route efficiency, so you can compare each route against the step 1 table after a change. The rule types the platform reads are listed on the routing engine page.
06FAQ
How to route payments intelligently across gateways?
Write rules that look at what you know when the payment arrives, such as card, currency, amount and country. Send each group to the provider that has served it best, and give every rule a fallback and a default. Then measure and adjust one rule at a time.
How to set up smart routing for payments without writing code?
Use a layer where rules are set in a dashboard, so a rule is a setting and not a release. You still need the baseline data, the written rules and the test plan from the steps above. The dashboard only removes the deployment step.
How do I monitor payment success rates across providers?
Use one dashboard or export that carries every provider's transactions in the same shape. Split the results by provider, currency, card type and decline reason. A total hides which rule is working.
How long does it take to route payments through a new rule set?
Writing the rules takes days. Testing them carefully and running a small slice of traffic usually takes longer than the writing, so plan the calendar around the testing and the review period.