Evaluate Routing Algorithm
August 3, 2026 · View on GitHub
/routing/evaluate evaluates the active routing algorithm for a payment context. It does not update SR scores.
The payment context is passed as parameters — a map of rule-builder key → typed value. Use { "type": "enum_variant", "value": "..." } for enum keys and { "type": "number", "value": ... } for numeric keys. Discover the valid keys and enum values with GET /config/routing-keys.
Request
curl --location "$BASE_URL/routing/evaluate" \
--header "$AUTH_HEADER" \
--header "Content-Type: application/json" \
--data '{
"created_by": "merchant_demo",
"payment_id": "eval_001",
"parameters": {
"payment_method_type": { "type": "enum_variant", "value": "credit" },
"payment_method": { "type": "enum_variant", "value": "card" },
"currency": { "type": "enum_variant", "value": "USD" },
"amount": { "type": "number", "value": 1000 }
}
}'
Response
{
"payment_id": "eval_001",
"status": "success",
"output": {
"type": "priority",
"connectors": [
{ "gateway_name": "stripe", "gateway_id": "mca_111" },
{ "gateway_name": "adyen", "gateway_id": "mca_112" }
]
},
"evaluated_output": [
{ "gateway_name": "stripe", "gateway_id": "mca_111" }
],
"eligible_connectors": [
{ "gateway_name": "stripe", "gateway_id": "mca_111" },
{ "gateway_name": "adyen", "gateway_id": "mca_112" }
]
}