POST
/
routing
/
rule
/
evaluate
Routing - Rule Evaluate
curl --request POST \
  --url https://sandbox.hyperswitch.io/routing/rule/evaluate \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "created_by": "<string>",
  "parameters": {},
  "fallback_output": [
    {
      "gateway_name": "authipay",
      "gateway_id": "<string>"
    }
  ]
}'
{
  "status": "<string>",
  "output": "<any>",
  "evaluated_output": [
    {
      "connector": "authipay",
      "merchant_connector_id": "<string>"
    }
  ],
  "eligible_connectors": [
    {
      "connector": "authipay",
      "merchant_connector_id": "<string>"
    }
  ]
}

Authorizations

api-key
string
header
required

Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.

Body

application/json
created_by
string
required
parameters
object
required

Parameters that can be used in the routing evaluate request. eg: {"parameters": { "payment_method": {"type": "enum_variant", "value": "card"}, "payment_method_type": {"type": "enum_variant", "value": "credit"}, "amount": {"type": "number", "value": 10}, "currency": {"type": "str_value", "value": "INR"}, "authentication_type": {"type": "enum_variant", "value": "three_ds"}, "card_bin": {"type": "str_value", "value": "424242"}, "capture_method": {"type": "enum_variant", "value": "scheduled"}, "business_country": {"type": "str_value", "value": "IN"}, "billing_country": {"type": "str_value", "value": "IN"}, "business_label": {"type": "str_value", "value": "business_label"}, "setup_future_usage": {"type": "enum_variant", "value": "off_session"}, "card_network": {"type": "enum_variant", "value": "visa"}, "payment_type": {"type": "enum_variant", "value": "recurring_mandate"}, "mandate_type": {"type": "enum_variant", "value": "single_use"}, "mandate_acceptance_type": {"type": "enum_variant", "value": "online"}, "metadata":{"type": "metadata_variant", "value": {"key": "key1", "value": "value1"}} }}

fallback_output
object[]
required

Response

Routing rules evaluated successfully

status
string
required
output
any
required
evaluated_output
object[]
required
eligible_connectors
object[]
required