Get Active Routing Rule

August 3, 2026 ยท View on GitHub

Use case

Fetches the currently active routing algorithm for a creator/merchant scope.

Authentication

Protected. Send either Authorization: Bearer <jwt_token> or x-api-key: <api_key>. In sandbox, also send x-feature: decision-engine.

For local development, start with:

export BASE_URL=http://localhost:8080
export AUTH_HEADER="Authorization: Bearer <jwt_token>"
# Sandbox only:
# export BASE_URL=https://sandbox.hyperswitch.io
# export FEATURE_HEADER="x-feature: decision-engine"

Request

  • Method and path: POST /routing/list/active/{created_by}
  • Parameters:
    • created_by (path, required, string)
  • Body: Path parameter created_by; request body can be {}.

Example

Get active rule

curl --location "$BASE_URL/routing/list/active/merchant_demo" \
  --header "$AUTH_HEADER" \
  --header "Content-Type: application/json" \
  --data '{}'

Response

Returns an array of the currently-active routing algorithms (each the full rule object). Empty array [] when none is active.

[
  {
    "id": "routing_e641380c-6f24-4405-8454-5ae6cbceb7a0",
    "created_by": "merchant_demo",
    "name": "priority rule",
    "description": "try stripe before adyen",
    "algorithm_data": {
      "type": "priority",
      "data": [
        { "gateway_name": "stripe", "gateway_id": "mca_111" },
        { "gateway_name": "adyen", "gateway_id": "mca_112" }
      ]
    },
    "algorithm_for": "payment",
    "created_at": "2026-04-26 10:00:00.000000",
    "modified_at": "2026-04-26 10:00:00.000000"
  }
]

Notes

  • The dashboard uses this before volume/rule evaluations.
  • A missing active rule means the explorer should ask the operator to configure routing first.