Payout 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.
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 YESNODAL_IMPS and YESNODAL_NEFT. Now, if you need to setup YESNODAL_IMPS as primary and YESNODAL_NEFT as secondary, then you should configure the priorities as given below:
YESNODAL_IMPS,YESNODAL_NEFT
Configure Priority Logic
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.
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.
1. Sample payout priority logic for account based routing
2. Card brand and Issuer Bank based routing
3. Beneficiary transfer type based routing
Configure Priority Logic
Setup the Priority logic on Juspay Payouts Dashboard with the below steps
Login to Juspay Payouts Dashboard > Navigate to Gateways > Priority Logic > Click on Create Priority Logic
Select Simple Priority Logic/ Custom Priority Logic based on the business usecase.
- Have questions?
- Need help? Contact support
- LLM? Read llms.txt

