v12

latestOpenAPI 3.1.0AGPL-3.0raw.githubusercontent.com2026-08-0464108237.1 KB
Routing Rules

Evaluate routing rule

Evaluate the active routing rule for a merchant against a payment context. Returns the ordered list of gateways selected by the rule without consuming SR data.

post/routing/evaluate

Request body

created_bystring required

Merchant that owns the routing rule.

payment_idstring nullable
parametersobject required

Map of rule-builder key to typed value. A null value means the key is present but unset.

Example request

{
  "created_by": "merchant_demo",
  "payment_id": "rule_decision_001",
  "fallback_output": [
    {
      "gateway_name": "stripe",
      "gateway_id": "mca_111"
    }
  ],
  "parameters": {
    "payment_method_type": {
      "type": "enum_variant",
      "value": "credit"
    },
    "amount": {
      "type": "number",
      "value": 1000
    }
  }
}

Response

Evaluation result with ordered gateway list

payment_idstring nullable
statusstring
outputobject

Raw output of the matched rule, tagged by algorithm type (priority, single, volume_split, advanced).

Example response

{
  "status": "success",
  "evaluated_output": [
    {
      "gateway_name": "stripe",
      "gateway_id": "mca_111"
    }
  ],
  "eligible_connectors": [
    {
      "gateway_name": "stripe",
      "gateway_id": "mca_111"
    }
  ]
}