Rule Based Routing
Route transaction through processors with advanced rules on the basis of various payment parameters
Last updated
Route transaction through processors with advanced rules on the basis of various payment parameters
Last updated
This section will guide you on how to setup Rule based routing using the Hyperswitch Control Center
A rule-based routing configuration comprises of one or more rules with each rule having a payment processor preference and a set of conditions associated with it. The implication being that if one of the conditions matches, the associated processor preference is considered for the ongoing payment. The order in which rules and conditions are evaluated is sequential from top to bottom as presented in the UI, with preference given to the first condition (and the associated preference) that's fulfilled by the current payment.
Condition: A condition is constructed with dimensions and logical operators. Routing rules can be pivoted upon numerous dimensions which include payment method, amount of payment, currency, etc. Also, there are six logical operators - equal to, greater than, lesser than, is, is not, contains, not contains, which are used to evaluate the condition.
Processor Preference: Every rule has an associated Processor Preference which dictates the processor(s) to route the ongoing payment through if the rule is fulfilled. A Processor Preference can be one of the following types:
Single choice of processor: Only a single processor should be targeted for a specific condition Eg: (Stripe)
Split payments across processors: The payment volume could be distributed across more than one processor. Eg: (Stripe: 70%, Paypal: 30%)
Single choice of processor with fallback: A single processor should be targeted for a specific condition with an option of one or more fallback processors to automatically retry the transaction through if the initial processor fails to process the payment. Eg: (Stripe, Paypal)
Step 1: Click on Setup
for Rule Based Configuration
Step 2: Save the rule name and description
Step 3: Use the no-code UI to configure your desired rules as per your business logic (an instance for configuring rule is displayed)
Step 4: Select your default preferred processors and click on Configure Rule
Step 5: In the popup, select the appropriate action based on whether you want to simply save the rule
, or save and also activate
it for all payments henceforth
Step 6: You can view your active routing algorithm as well as all previously configured algorithms on the Hyperswitch Dashboard