search

Routing Rule Configuration

 

Merchants can also configure their preferences and routing rules for distributing traffic among configured PAs through the Gateway Routing section of AI Router.

 Note: If there are no routing preferences configured then AI Router selects the gateway which will maximize the chance of making the payment successful. Historic and real-time performance of all eligible gateways are evaluated and based on that the gateway which is most likely to make the payment successful is chosen. 


Steps to configure routing logic for your payments:

 

 

  1. Click on the Gateway Routing tab under the AI Router section. 
  2. The option to set up a routing rule for both One-time and Subscription payments is available on the dashboard. 
  3. For each of the payment types, a list of supported payment options (i.e. Cards, Netbanking, UPI, etc) is available as mentioned below:

     

    Payment Type Payment Options
    One-time payments
    Subscription 
  4. You can select the payment type and payment option for which you would like to setup a routing rule and proceed by clicking on Add new routing rule.

     

Please refer below sections to understand the routing rule configuration step for each of the payment options.

 

Gateway Routing Configuration: UPI

 

For the UPI payment option, you can add routing preferences on the basis of the type of UPI flow, i.e. UPI Collect or UPI Intent. Please follow the below steps to setup the routing configurations for UPI transactions:-

  1. Select UPI as the payment option and click on the Add new routing rule. Now, Select the type of UPI flow for which you want to add the routing rule, i.e. UPI Collect or UPI Intent. A list of eligible gateways enabled for the selected flow will be displayed. 

  2. Select the Amount limit for routing, If you want to apply this for a certain transaction amount range, please enter the amount range. If no amount range is selected by default the rule will be applied for all amount ranges.

  3. Add the routing rule by allocating percentage traffic distribution among the eligible gateways.
  4. Click on Submit to save the routing configuration.

     

 

Gateway Routing Configuration: Cards

 

For card transactions, gateway routing configurations can be setup for both One-time and Subscription payments.

One-time payments: In the case of one-time card transactions, you can set up the routing rules on the basis of the following preferences: 

  • Card Attributes
  • BIN

 

  Note: In the case of Subscription transactions, routing rules can be setup only on the basis of Card Attributes.

 

Let's deep-dive into each of these routing preferences in detail:
 

Card Attributes

You can define the routing rules based on the combination of the following card attributes to distribute the traffic among eligible gateways. 

 

Card Attribute Possible Values
Card
  • All
  • Credit Card
  • Debit Card
Card Type
  • All
  • Prepaid Card
  • Corporate Card
  • International Card
Card Scheme
  • All
  • Visa 
  • Mastercard 
  • RuPay
  • American Express 
  • Diners
Issuing Bank
  • List of all the issuing banks

 

Card attributes-based routing can be configured in two ways:-

  1. Cost based routing
  2. Gateway distribution routing
     

Cost-based routing: 

 

Routing rules can be decided based on the Payment aggregator ( PA) / Payment gateway (PG) charges. Transactions can be routed purely based on the cost charged by the PA / PG. A cut-off of success rate can also be configured along with the PA / PG cost to take advantage of the best success rates with the cheapest costs.

 

Cost-based routing can be set up in two ways. Relative cost and Absolute cost, In the case of relative cost a preference for the PGs based on the cost can be provided. For Absolute cost, the exact cost charged by the PGs can be provided in the input. More on the cost-based routing configuration below:
 

 

  1. Relative cost / Preference based on Cost:


    A Relative cost of the PGs or the preference order based on the cost can be given as the input in the relative costing. This will be used as an input parameter based on which routing decision will be made. The gateway which has the lowest cost will be picked for the transaction. If a Baseline is also added, Gateway which has the lowest cost and which satisfies the Baseline / Success rate criteria will be considered for the transaction. Cost-based routing rules can be leveraged to reduce the cost incurred for the transaction.

  2. Absolute cost:

     

    The actual cost charged by the gateways can also be used for the transaction routing. Costing for a transaction can be based on a flat value, percentage, or both with multiple slab ranges based on the transaction amount and Payment option. If you want the decision-making to be precise based on the actual costing values, Absolute cost-based routing can be used.


    Please follow the below steps to define Cost based routing for Card transactions: 

     

    1. Select Card as a payment option and click on Add new routing rule. A new screen will be displayed on the dashboard. Select the Preference Type as Card Attribute

       

    2. Select at least one Card Attribute from Card, Card Type, Card Scheme, Issuing Bank, and click on Proceed.
    3. Select the Routing strategy as Cost-based routing and select the costing type as Relative cost
    4. In the Select the amount limit for routing, If you want to apply this for a certain transaction amount range, enter the amount range. If no amount range is selected, by default the rule will be applied for all amount ranges.

    5. List of eligible gateways enabled for the selected flow will be displayed.
    6. Enter the preference for the gateways as per cost and click on Submit.
    7. To provide a minimum success rate criteria for Cost-based routing, you can add the Baseline as well. When a baseline is added, routing will happen to the lowest cost gateway which has met the baseline criteria
       

    Example: 

    Let's assume there are 3 eligible PGs for the transaction and the charges for the transaction are as follows:-

    Transaction type PG Name Charges
    Credit Card - Visa scheme Paytm 1.5%
    BillDesk 1.2%
    PayU 1.8%

    Also, under the relative cost input, you can input as BillDesk, Paytm, and Pay U as 1.2,1.5 and 1.8 respectively, or 1,2,3 for BillDesk, Paytm, and PayU in the costing order of priority

     Note: 

    • If the lowest cost gateway doesn’t satisfy the Success rate criteria set using the Baseline, the cheapest cost gateway that meets the success rate criteria will be considered for the transaction.
    • For the case of subscription transactions, the mandate registration cost can be used as well for the cost-based routing preference. 

     

     

Gateway Distribution routing: 


Please follow the below steps to define Gateway distribution routing for Card transactions: 

 

  1. Select Card as a payment option and click on Add new routing rule. A new screen will be displayed on the dashboard. Select the Preference Type as Card Attribute
  2. Select at least one Card Attribute from Card, Card Type, Card Scheme, Issuing Bank, and click on Proceed.
  3. Select Routing strategy as Gateway distribution routing and the List of eligible gateways that support these attributes will be displayed.

  4. In the Select the amount limit for routing, If you want to apply this for a certain transaction amount range, enter the amount range. If no amount range is selected, by default the rule will be applied for all amount ranges.
  5. Add the routing rule by allocating percentage traffic distribution among the eligible gateways. 
  6. Click on Submit to save the routing configuration. 

BIN-based routing 

 

In BIN-based routing, the traffic is distributed on the basis of card BINs (i.e. the first 6 digits of the card). Please follow the below steps to define the BIN-based routing rule for Card transactions (applicable only for One-time payments)

  1. Select Card as a payment option and click on Add new routing rule. A new screen will be displayed on the dashboard. Select Preference Type as BIN.

  2. Download the Sample file available. 
  3. Enter all the BIN details in the file for which you would want to define the routing rule.
  4. Upload the file on the dashboard. 

     Note: Upto 20 BINs can be entered in one file

  5. List of eligible gateways will be displayed.
  6. Add the routing rule by allocating percentage traffic distribution among the eligible gateways.
  7. Click on Submit to save the routing configuration. 

     

 

Gateway Routing Configuration: Netbanking

For the Netbanking payment option, you can add routing preferences on the basis of issuing banks. All the banks that are enabled on the merchant account will be present in the issuing bank dropdown list. 

 

Routing rules for Netbanking payment options can be configured in two ways, just like Cards.

  1. Cost based routing 
  2. Gateway distribution routing
     

Cost-based routing:

 

Please follow the below steps to define Cost based for Netbanking transactions: 

  1. Select Net banking as a payment option and click on Add new routing rule. A new screen will be displayed on the dashboard.
  2. Select a bank from the issuing bank dropdown list and click on Apply. You can also select multiple issuing banks under a single routing rule setup. 
  3. Select the Routing strategy as Cost-based routing and select the costing type as Relative cost
  4. In the Select the amount limit for routing, If you want to apply this for a certain transaction amount range, enter the amount range. If no amount range is selected, by default the rule will be applied for all amount ranges.
  5. List of eligible gateways enabled for the selected flow will be displayed.
  6. Enter the preference for the gateways as per cost and click on Submit.
  7. To provide a minimum success rate criteria for Cost-based routing, you can add the Baseline as well. When a baseline is added, routing will happen to the lowest cost gateway which has met the baseline criteria.


Example:  
 

Let's assume there are 2 eligible PGs for a Netbanking transaction and the charges for the transaction are as follows

 

Transaction type PG Name Charges
Netbanking-SBI Issuing Bank  Paytm 10 rupees / transaction
BillDesk 8 rupees / transaction

 

Here in the relative cost input merchant can give the input as BillDesk, and Paytm as 10 and 8 respectively, or  1,2 for BillDesk and Paytm in the costing order of priority.

 

 

 Note: 

  • If the lowest cost gateway doesn’t satisfy the Success rate criteria set using Baseline, the cheapest cost gateway which is meeting the success rate criteria will be considered for the transaction.
  • For the case of subscription transactions, the mandate registration cost can be used as well for the cost based routing preference. 


 

Gateway distribution routing: 

 

Please follow the below steps to setup the Gateway  routing configurations for Netbanking transactions:

 

  1. Select Net Banking as a payment option and click on Add new routing rule. A new screen will be displayed on the dashboard. 
  2. Select a bank from the issuing bank dropdown list and click on Apply. You can also select multiple issuing banks under a single routing rule setup. 
  3. Once the issuing banks are selected, a list of eligible gateways that support the selected banks and are enabled on the merchant account will be displayed on the panel.
  4. Select the Amount limit for routing, If you want to apply this for a certain transaction amount range, please enter the amount range. If no amount range is selected by default the rule will be applied for all amount ranges.
  5. Add the routing rule by allocating percentage traffic distribution among the eligible gateways.
  6. Click on Submit to save the routing configuration

 

Example:

 

Let's assume you want to distribute 70% of Netbanking traffic from HDFC, ICICI, SBI, and Kotak Bank to Paytm and 30% of the traffic to Cashfree: 

  1. You first need to select HDFC, ICICI, SBI, and Kotak Bank from the issuing bank list. 
  2. Once you select the banks, all payment gateways that support these banks for Netbanking transactions and are currently enabled to accept Netbanking transactions, appear under the Eligible Gateway section
  3. Here you can allocate 70% of the traffic to Paytm and 30% of the traffic to Cashfree. 
  4. After the traffic distribution among eligible gateways, you can click on Submit to save the routing configuration.

 

Gateway Routing Configuration: Bank Mandates

 

For Bank Mandates, you can add routing preferences on the basis of Mandate Type. There are two possible types of mandates: Netbanking and Debit Cards. 


Steps to setup the routing configurations for Bank Mandate transactions::

 

  1. Select Bank Mandate as a payment option and click on Add new routing rule. A new screen will be displayed on the dashboard. 

  2. Select the Mandate Type as Netbanking or Debit Card.
  3. For the selected mandate type, the list of issuing banks that support mandate transactions and are enabled on the merchant account appears under the Issuing Banks dropdown list.
  4. Select the issuing banks for which you want to add the routing rule. List of eligible gateways for which these issuing banks are enabled will be displayed.

  5. Add the routing rule by allocating percentage traffic distribution among the eligible gateways.
  6. Click on Submit to save the routing configuration.

     

 

API based routing / Enforced routing

 

This feature can be used when you want to route the transaction to a specific Payment gateway based on some Business rules. This can be achieved on the transaction run time, providing total control of the routing as per your Business goals 

 

Example:

 

Assume that you are running a promotional offer on a certain Payment gateway PG1, for the cases where this promotional offer is applied you can route the transaction to the Payment gateway on which the Offer is configured


Setting up Business based routing:

 

  1. Click on the Add Enforced routing condition on the Payment option screen. A new routing rule configuration screen will be displayed on the dashboard. 
  2. Select the Amount limit for routing, If you want to apply this for a certain transaction amount range, please enter the amount range. If no value is selected by default the rule will be applied for all amount ranges.
  3. Select the Payment gateway and enter the parameter that will be passed during the transaction run time. This parameter can be passed in the Create order or Pay API 
  4. Click on Submit and the rule will be saved.

 

 

 Note: 

  • The Routing parameters for Enforced routing can be passed in the field enforcedRoutingParam of the txnRoutingParams object. 
  • If the configured rule configuration input matches with the field value passed in the Create order or Pay API, enforced routing will be followed.
  • Enforced Routing parameters can be passed in the Create order and Pay API, if different values are passed in both Pay API parameters will be considered.

 

 

Defining the Baseline 

 

Baseline protects against the scenario where one / some preferred gateways perform below par.

 

Example:

 

Suppose a merchant intends to route HDFC Visa cards to PA1 and PA2 in the ratio of 20% and 80% respectively. At some point, it might happen that PA2 starts performing badly yielding a low SR of 35%. Hence it would be better to route the transaction to PA1 or the other remaining gateways configured to process card transactions on this merchant.

 

There are two types of baselines that merchants can set:

 

  1. Static Baseline - This is a static % below which the preference will be dissolved. Hence in the above example, the merchant can set a static baseline of 60% to ensure that PA2 does get any preference.
  2. Dynamic Baseline - This is a dynamic % that sets a baseline with reference to the best-performing gateway on that type of transaction configured for the merchant. Let us assume in the above scenario, the best-performing gateway PA3 has a success rate of 80%. With a 10% dynamic baseline, the cutoff that comes out is 72%. Only the preferred gateways performing above 72% will be eligible to get the transaction.

Note: In case there are conflicting rules, the merchant can also set priority against the rules by moving them up and down.