---
title: "Routing - Evaluate"
method: POST
path: "/routing/evaluate"
tags: ["Routing"]
---

# Routing - Evaluate

`POST /routing/evaluate`

Evaluate routing rules

## Request body

- OpenRouterDecideGatewayRequest — Request to decide the optimal gateway for routing a payment
  - `paymentInfo` PaymentInfo, required — Payment information used for routing decision-making
    - `paymentId` string, required — Unique identifier for the payment transaction
    - `amount` integer, required — Payment amount in minor units
    - `currency` string, required — Currency code for the payment
    - `paymentType` string, required — Type of payment transaction being processed
    - `metadata` string, required — Optional metadata associated with the payment
    - `paymentMethodType` string, required — Specific payment method type being used
    - `paymentMethod` string, required — General payment method category
    - `cardIsin` string, required — Card Issuer Identification Number (first 6 digits of card)
  - `merchantId` string, required — Profile ID of the merchant
  - `eligibleGatewayList` string[], nullable — List of eligible gateways for routing consideration
  - `rankingAlgorithm` 'SR_BASED_ROUTING' | 'PL_BASED_ROUTING' | 'NTW_BASED_ROUTING'
  - `eliminationEnabled` boolean, nullable — Whether elimination logic is enabled for filtering gateways

## Response `200`

Routing rules evaluated successfully

- DecideGatewayResponse
  - `decided_gateway` string, nullable — The gateway decided by the routing engine
  - `gateway_priority_map` object, nullable — Map of gateways with their priority scores
  - `filter_wise_gateways` object, nullable — Gateways organized by filter criteria
  - `priority_logic_tag` string, nullable — Tag identifying the priority logic used
  - `routing_approach` string, nullable — The routing approach used for decision making
  - `gateway_before_evaluation` string, nullable — The gateway that was evaluated before the final decision
  - `priority_logic_output` PriorityLogicOutput
    - `isEnforcement` boolean, nullable — Whether enforcement mode is enabled
    - `gws` string[], nullable — List of gateways returned by the priority logic
    - `priorityLogicTag` string, nullable — Tag identifying the priority logic used
    - `gatewayReferenceIds` object, nullable — Map of gateway reference IDs
    - `primaryLogic` PriorityLogicData
      - `name` string, nullable — Name of the logic
      - `status` string, nullable — Status of the logic execution
      - `failure_reason` string, nullable — Reason for failure if the logic failed
    - `fallbackLogic` PriorityLogicData
      - `name` string, nullable — Name of the logic
      - `status` string, nullable — Status of the logic execution
      - `failure_reason` string, nullable — Reason for failure if the logic failed
  - `reset_approach` string, nullable — The reset approach applied during routing
  - `routing_dimension` string, nullable — Dimensions used for routing decision (payment type, method, etc.)
  - `routing_dimension_level` string, nullable — Level at which routing dimension is evaluated
  - `is_scheduled_outage` boolean, nullable — Indicates if routing decision was affected by scheduled outage
  - `is_dynamic_mga_enabled` boolean, nullable — Indicates if dynamic merchant gateway account is enabled
  - `gateway_mga_id_map` object, nullable — Map of gateways to their MGA IDs

## Other responses

- `400` — Request body is malformed
- `403` — Forbidden
- `404` — Resource missing
- `422` — Unprocessable request
- `500` — Internal server error

---

[API](https://skmtc.net/hyperswitch/apis/dynamic-routing-openapi-3-0.md) · [All operations](https://skmtc.net/hyperswitch/apis/dynamic-routing-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hyperswitch/dynamic-routing-openapi-3-0/versions/8fbf69ab2597/schema)
