Decide gateway
Changed onCore 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.
Request
- Base URLhttp://localhost:8080
- URLhttp://localhost:8080/decide-gateway
- Auth
- HTTP bearer
- or API key in header x-api-key
Request body
Example request
{
"merchantId": "test_merchant",
"paymentInfo": {
"paymentId": "pay_001",
"amount": 1000,
"currency": "USD",
"paymentType": "ORDER_PAYMENT",
"paymentMethodType": "CREDIT",
"paymentMethod": "CARD",
"country": "US",
"customerId": "cust_123",
"authType": "THREE_DS",
"cardIsin": "411111",
"cardType": "CREDIT"
},
"eligibleGatewayList": [
"stripe",
"paypal",
"adyen"
],
"rankingAlgorithm": "SR_BASED_ROUTING"
}Response
Gateway decision result
Example response
{
"decided_gateway": "stripe",
"fallback_gateways": [
"adyen"
],
"gateway_priority_map": {
"stripe": 0.94,
"adyen": 0.87
},
"routing_approach": "SR_SELECTION_V3_ROUTING",
"debit_routing_output": {
"co_badged_card_networks_info": [
{
"network": "NYCE",
"saving_percentage": 1.2
}
],
"issuer_country": "US",
"card_type": "Debit"
},
"reset_approach": "NO_RESET",
"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
}
}Changes
- warning
removed the request property
/ - info
added the new optional request property
/
- warning
- breaking
removed the enum value
CARDof the request property/ - breaking
removed the enum value
CREDITof the request property/ - breaking
removed the enum value
DEBITof the request property/ - breaking
removed the enum value
NETBANKINGof the request property/ - breaking
removed the enum value
UPIof the request property/ - breaking
removed the enum value
WALLETof the request property/ - breaking
the response property
became nullable for the status - breaking
the response property
became nullable for the status - breaking
the response property
became nullable for the status - breaking
the response property
became nullable for the status - breaking
added
subschema #2to theresponse propertyoneOflist for the response status - breaking
added
subschema #2to theresponse propertyoneOflist for the response status - breaking
the
response's property type changed fromobjectto no type for status - breaking
the
response's property type changed fromnumbertointegernull, and format from no format toint64for status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
/from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
added the new
ELIMINATION_RESETenum value to theresponse property for the response status - warning
added the new
NO_RESETenum value to theresponse property for the response status - warning
added the new
SRV2_ELIMINATION_RESETenum value to theresponse property for the response status - warning
added the new
SRV2_RESETenum value to theresponse property for the response status - warning
added the new
SRV3_ELIMINATION_RESETenum value to theresponse property for the response status - warning
added the new
SRV3_RESETenum value to theresponse property for the response status - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
the request property
/became nullable - info
the request property
/became nullable - info
the request property
/became nullable - info
the request property
/became nullable - info
added the new
ATMPINenum value to the request property/ - info
added the new
CTPenum value to the request property/ - info
added the new
EMANDATE_PAYMENTenum value to the request property/ - info
added the new
EMANDATE_REGISTERenum value to the request property/ - info
added the new
FIDOenum value to the request property/ - info
added the new
MANDATE_REGISTERenum value to the request property/ - info
added the new
MOTOenum value to the request property/ - info
added the new
NETWORK_TOKENenum value to the request property/ - info
added the new
OBO_OTPenum value to the request property/ - info
added the new
OTPenum value to the request property/ - info
added the new
PARTIAL_CAPTUREenum value to the request property/ - info
added the new
PARTIAL_VOIDenum value to the request property/ - info
added the new
THREE_DS_2enum value to the request property/ - info
added the new
TPV_EMANDATE_PAYMENTenum value to the request property/ - info
added the new
TPV_EMANDATE_REGISTERenum value to the request property/ - info
added the new
TPV_MANDATE_PAYMENTenum value to the request property/ - info
added the new
TPV_MANDATE_REGISTERenum value to the request property/ - info
added the new
TPV_PAYMENTenum value to the request property/ - info
added the new
VAN_PAYMENTenum value to the request property/ - info
added the new
VIESenum value to the request property/ - info
added the new
undefinedenum value to the request property/ - info
the
/request property format was generalized fromfloattodouble - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
removed from the
response propertyallOflist for the response status
- breaking