Gateway Decision
Decide gateway
Core routing decision API. Given a payment context and a list of eligible gateways, returns the optimal gateway to route to.
The engine applies a sequence of filters (currency, card brand, auth type, EMI, etc.) then scores remaining gateways using success rate history, elimination status, and contract obligations.
Authentication: Requires either JWT Bearer token or API Key.
post/decide-gateway
Request body
Example request
{
"merchantId": "test_merchant",
"paymentInfo": {
"paymentId": "pay_001",
"amount": 1000,
"currency": "USD",
"country": "US",
"customerId": "cust_123",
"paymentType": "ORDER_PAYMENT",
"paymentMethodType": "CARD",
"paymentMethod": "CREDIT",
"authType": "THREE_DS",
"cardIsin": "411111"
},
"eligibleGatewayList": [
"stripe",
"paypal",
"adyen"
],
"rankingAlgorithm": "SR_BASED_ROUTING"
}Response
Gateway decision result
Example response
{
"decided_gateway": "stripe",
"routing_approach": "SR_SELECTION_V3_ROUTING",
"gateway_priority_map": {
"stripe": 0.94,
"adyen": 0.87,
"paypal": 0.72
},
"debit_routing_output": {
"co_badged_card_networks_info": [
{
"network": "NYCE",
"saving_percentage": 1.2
}
],
"issuer_country": "US",
"card_type": "Debit"
},
"multi_objective_info": {
"outcome": "COST_WON",
"reason": "Promoted 'adyen' over 'stripe' on expected value — saves 80.00 bps for 3.00pp auth.",
"srHead": {
"psp": "adyen",
"authRate": 0.91,
"costBps": 100
},
"chosen": {
"psp": "adyen",
"authRate": 0.91,
"costBps": 100
},
"costSavedBps": 80,
"qualifiedCount": 3,
"margin": 0.2,
"evGapTop2": 0.00182
}
}