v1

latestOpenAPI 3.0.02026-07-26168846732.2 KB
Routing

Routing - Evaluate

Evaluate routing rules

post/routing/evaluate

Request body

merchantIdstring required

Profile ID of the merchant

eligibleGatewayListstring[] nullable

List of eligible gateways for routing consideration

rankingAlgorithm'SR_BASED_ROUTING' | 'PL_BASED_ROUTING' | 'NTW_BASED_ROUTING'
eliminationEnabledboolean nullable

Whether elimination logic is enabled for filtering gateways

Example request

{
  "paymentInfo": {
    "paymentId": "pay_12345",
    "currency": "USD",
    "paymentType": "ORDER_PAYMENT",
    "metadata": "metadata",
    "paymentMethodType": "upi",
    "paymentMethod": "upi",
    "cardIsin": "424242"
  },
  "merchantId": "pro_aMoPnEkgCVnh2WVsFe32",
  "eliminationEnabled": true
}

Response

Routing rules evaluated successfully

decided_gatewaystring nullable

The gateway decided by the routing engine

gateway_priority_mapobject nullable

Map of gateways with their priority scores

filter_wise_gatewaysobject nullable

Gateways organized by filter criteria

priority_logic_tagstring nullable

Tag identifying the priority logic used

routing_approachstring nullable

The routing approach used for decision making

gateway_before_evaluationstring nullable

The gateway that was evaluated before the final decision

reset_approachstring nullable

The reset approach applied during routing

routing_dimensionstring nullable

Dimensions used for routing decision (payment type, method, etc.)

routing_dimension_levelstring nullable

Level at which routing dimension is evaluated

is_scheduled_outageboolean nullable

Indicates if routing decision was affected by scheduled outage

is_dynamic_mga_enabledboolean nullable

Indicates if dynamic merchant gateway account is enabled

gateway_mga_id_mapobject nullable

Map of gateways to their MGA IDs

Example response

{
  "decided_gateway": "stripe:mca1",
  "gateway_priority_map": {
    "adyen:mca2": 1,
    "stripe:mca1": 1
  },
  "routing_approach": "SR_SELECTION_V3_ROUTING",
  "gateway_before_evaluation": "adyen:mca2",
  "priority_logic_output": {
    "gws": [
      "stripe:mca1",
      "adyen:mca2"
    ],
    "primaryLogic": {
      "name": "success_rate_logic",
      "status": "success",
      "failure_reason": "insufficient_data"
    },
    "fallbackLogic": {
      "name": "success_rate_logic",
      "status": "success",
      "failure_reason": "insufficient_data"
    }
  },
  "reset_approach": "NO_RESET",
  "routing_dimension": "ORDER_PAYMENT, UPI, upi",
  "routing_dimension_level": "PM_LEVEL"
}