Dynamic Routing

Our approach

It is important to understand JusPay's implementation of dynamic routing to be able to configure gateway priorities correctly for your Merchant Account. Our approach has been to ensure maximum conversion rate and the implementation reflects this. The dynamic routing algorithm uses a non-deterministic mathematical model to rank all applicable gateways for the given transaction, using a lot of information, such as gateway health, gateway performance for a similar transaction recently, historical performance, etc.. Along with this, we take into account the priorities configured by you and arrive at the final gateway, such that the success probability is the highest.

So, please do not be surprised if a different gateway is chosen for a particular transaction which doesn't really align with your configuration. Getting you the maximum success rate is more important to us.

If a particular gateway is not applicable for a transaction, say payment mode is SBI NetBanking and gateway is HDFC PG, then that gateway will be automatically dropped by us. So, you don't have to take care of that in the priority logic.

Simple routing

Most typical routing logic would be to set up one gateway as primary and another gateway as secondary. Secondary gateway is usually used as a backup in case of primary gateway going down. However, there could be cases where a specific card BIN performs really well with the given PG and we might end up choosing the secondary gateway in such a case.

You can configure the priorities of gateways using a comma-separated string representation. For instance, say you have two gateways namely HDFC and ICICI. Now, if you need to setup HDFC as primary and ICICI as secondary, then you should configure the priorities as given below:

HDFC,ICICI

DSL

We understand that one size doesn't fit all. So, we have come up with another flexible option where you have the complete capability to dynamically set the priority.

You can describe the priority logic in Groovy code and set the priority dynamically for any given transaction. The gateways should be identified using the unique names (enumerations given below) and you are expected to setup the priority in the form of a string List. First gateway in the list has the highest priority and so will be preferred over others.

Note: Good code writing skills are necessary here. If you dont know what this is or is doubtful, please get in touch with us along with your requirement and we will help set this up for you.

Context

Transaction details are given as input to the DSL. Please see below for all the input variables that will be available to you in the DSL.

Example 1. Routing based on Channel

Example 2. Volume based routing

Example 3. Issuer based routing

Example 4. Card Brand based routing

Enforce Gateway Routing

The Enforce gateway routing can be utilised if you want to route certain set of orders/transactions to a particular payment gateway irrespective of gateway health, performance etc. For example when an offer is being provided by a certain aggregators then you would want to route transactions to that particular aggregator.

Function to be used in PL for enforcement is:
enforceGatewayPriority(["gatewayName"]);

In the above case if udf1 is passed as payu_offer then the transaction is enforced to Payu irrespective of health, score etc. Else the transaction can get routed to either Axis or Payu.

List of Gateway Ids

Scroll inside to view more
Gateway
Gateway ID
AXIS
1
HDFC
2
ICICI
3
CITI
4
AMEX
5
CYBERSOURCE
6
IPG
7
MIGS
8
KOTAK
9
EBS
11
PAYU
12
CCAVENUE
13
CITRUS
14
ATOM
15
CCAVENUE_V2
16
TPSL
17
PAYTM
18
PAYTM_V2
19
PAYPAL
20
HDFC_EBS_VAS
21
PAYLATER
22
RAZORPAY
23
FSS_ATM_PIN
24
EBS_V3
25
ZAAKPAY
26
BILLDESK
27
SODEXO
28
BLAZEPAY
29
FSS_ATM_PIN_V2
30
MOBIKWIK
31
OLAMONEY
32
FREECHARGE
33
MPESA
34
SBIBUDDY
35
JIOMONEY
36
AIRTELMONEY
37
AMAZONPAY
38
PHONEPE
39
OLAPOSTPAID
40
SIMPL
41
GOOGLEPAY
42
FREECHARGE_V2
43
ITZCASH
44
TATAPAY
46
CRED
49
STRIPE
50
AMPS
51
GOCASHFREE
70
FSSPAY
73
PINELABS
74
PAYFORT
75
MPGS
77
ONEPAY
79
EASEBUZZ
80
NOON
81
TWID
82
PAYGLOCAL
83
WORLDPAY
87
INDUS_PAYU
89
EXPRESSPG
95
FREECHARGEPG
96
IFG
97
SBIePAY
99
DUMMY
100
HDFC_IVR
201
HDFC_SMARTGATEWAY
202
CAPITALFLOAT
260
EPAYLATER
251
LAZYPAY
252
BAJAJFINSERV
254
LOANTAP
255
SHOPSE
256
SEZZLE
258
ICICIPAYLATER
259
CAPITALFLOAT
260
HDFC_FLEXIPAY
261
MOBIKWIKZIP
262
SNAPMINT
263
TATAPAYLATER
268
LOYLTYREWARDZ
273
TATANEU
274
YPP
276
AXISNB
300
HDFCNB
301
ICICINB
302
TPSL_SI
400
LOTUSPAY
401
DIGIO
402
AXIS_UPI
500
HDFC_UPI
501
INDUS_UPI
502
KOTAK_UPI
503
SBI_UPI
504
ICICI_UPI
505
VIJAYA_UPI
506
HSBC_UPI
507
YESBANK_UPI
508
PAYTM_UPI
509
AXIS_BIZ
511
CAMSPAY
513
YES_BIZ
514
RBL_BIZ
516
GPAY_IMF
517
PINELABS_ONLINE
520
HYPER_PG
555
LINEPAY
600
CHECKOUT
601
CASH
700
MORPHEUS
800
AUTHORIZEDOTNET
1000
ADYEN
1001
BRAINTREE
1002
TRUSTPAY
1004
TABBY
1005
POSTPAY
1006
KLARNA
1007
VOLT
1008
DLOCAL
1009
CAREEMPAY
1112
CASHTOCODE
1113
IATAPAY
1115
MIDTRANS
1116
BOKU
1117
XENDIT
1118
TWOC_TWOP
1119
DOKU
1120
HSBC
1121
HYPERPAY
1122
TAP
1123
FLUTTERWAVE
1124
MYFATOORAH
1125
FAWRYPAY
1126
PAYMOB
1128
TAPPAY
1129
AIRWALLEX
1130
TRIPLEA
1131
DIRECT_BANK_EMI
1132
ZAINCASH
1133
FASTPAY
1134
SIKA_SIMPL
1135
ITAU
1136
FIB
1137
EBANX
1138
CIELO
1139
FACILITAPAY
1140
PAGSEGURO
1141
OPNPAYMENTS
1142
VISA_PBW
1143
NUPAY
1144
MERCADOPAGO
1145
TAZAPAY
1146
KBANK
1147

List of card brands:

  • VISA

  • MASTERCARD

  • MAESTRO

  • RUPAY

  • AMEX

  • DINERS

  • DISCOVER

List of card types:

  • CREDIT

  • DEBIT

Configure priority

Please refer to this guidelink icon to configure gateway priority logic.

Special rules

In addition to the routing logic explained above, we have also provided you with the ability to define specific rules to assign different gateway priorities for a given card BIN or card issuer bank. For instance, if you have negotiated special rates for HDFC cards on HDFC PG, then you can configure this on the dashboard.

ISIN & Issuer rules

ISIN stands for Issuer Identification Number which is card BIN (Bank Identification Number). For, a given ISIN and given Gateway, you can setup a priority score. If you wish to setup a rule for a particular card issuer bank, that can be configured too.

Scroll inside to view more
ISIN
Gateway
Score
524368
HDFC
1.1
447746
ICICI
1.1

Score

The score is expected to be in the range of 0.0 - 2.0 (decimals are allowed). Giving a value of 2.0 will increase the priority of the gateway by 2x. A value of 0.5 will reduce the priority score by 50%. A score of 1.0 will make the rule neutral.

Issuer Routing
The issuer typically refers to the bank which has issued the credit or debit card. In some countries, even credit unions or prepaid card providers can also issue cards. You can set up rules to specify dynamic scoring for a particular issuer and a gateway

Card Brand Routing
Card Brands include VISA, MASTERCARD, MAESTRO, AMEX, RUPAY, DISCOVER, DINERS, JCB. Setup your scoring to route based on a card brand and a gateway

Dynamic Routing based on High Failures

AI-ML algorithm constantly monitor and learn high payment failures across payment ecosystem along with merchant-context and make fully automatic routing decisions

  • Granular: Router takes into account high payment failures of all possible combinations of payment gateways and payment methods

  • Platform level: Looks at global information on the Juspay platform across merchants

  • Real-time: Identifies potential downtimes in near real-time, many times within a minute

  • Accurate: Looks at a series of payment failures consecutively across board yield very high accuracy

  • Contextual: When downtimes are not global and very much specific to the merchant level, Router uses merchant-level patterns and makes routing decisions

  • Configurable: You configure thresholds of failures at your merchant account level, payment method level, and enable/disable payment methods to be a part of the routing algorithm.Workslink icon in conjunction with, health-based routing and static routing rules

Score
The score is expected to be in the range of 0 to 1. Algorithm maintains the score per gateway and payment method combination per 30 minute time-window. It reduces score when transaction starts and increase scores when transaction succeeds.

Whenever score falls below configured threshold, gateway decider service would look for another gateways supporting that payment method with better score.

Last updated 7 months ago