Rule-Based Routing
Route payments using merchant-defined conditions such as amount, currency, country, payment method, and customer context
Last updated
Was this helpful?
Route payments using merchant-defined conditions such as amount, currency, country, payment method, and customer context
Rule-Based Routing lets you configure one or more rules, where each rule has a condition and a processor preference. When a payment matches a condition, Hyperswitch uses the processor preference attached to that rule.
Rules are evaluated from top to bottom in the same order shown in the dashboard. The first matching rule is applied. If no rule matches, Hyperswitch uses your Default Fallback Routing.
Condition: A condition is built from payment dimensions and logical operators. Common dimensions include payment method, payment method type, amount, currency, country, card type, and card network. Operators include equal to, greater than, lesser than, is, is not, contains, and not contains.
Processor preference: The processor, split, or fallback list Hyperswitch should use when the condition matches.
Every rule can use one of these processor preference types:
Single choice of processor: Route matching payments to one processor, such as Stripe.
Split payments across processors: Distribute matching traffic across processors, such as Stripe: 70% and PayPal: 30%.
Single choice with fallback: Route to one processor first, with one or more fallback processors if the first processor cannot process the payment.
Use Rule-Based Routing when you need deterministic control, for example:
Route a country or currency to a local acquirer.
Send high-value payments to a processor with stronger risk handling.
Route a payment method to a processor that has better support for it.
Keep a processor preference tied to a commercial agreement.
Go to Workflow > Routing.
Click Setup for Rule-Based Routing.
Save the rule name and description.
Use the no-code UI to configure conditions for your business logic.
Select the processor preference and click Configure Rule.
In the confirmation popup, choose whether to save the rule or save and activate it for payments.
Review your active routing algorithm and previously configured algorithms on the Hyperswitch Dashboard.

Keep the most specific rules at the top and broad rules lower in the list. Always configure Default Fallback Routing so payments have a backup path when a rule output is not eligible for the payment.
Last updated
Was this helpful?
Was this helpful?

