Skip to main content
POST
/
account
/
{account_id}
/
business_profile
/
{profile_id}
/
dynamic_routing
/
success_based
/
create
Routing - Auth Rate Based
curl --request POST \
  --url https://sandbox.hyperswitch.io/account/{account_id}/business_profile/{profile_id}/dynamic_routing/success_based/create \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '
{
  "decision_engine_configs": {
    "defaultLatencyThreshold": 90,
    "defaultBucketSize": 100,
    "defaultHedgingPercent": 5,
    "defaultLowerResetFactor": 0.5,
    "defaultUpperResetFactor": 1.5,
    "defaultGatewayExtraScore": [
      {
        "gatewayName": "<string>",
        "gatewaySigmaFactor": 123
      }
    ],
    "subLevelInputConfig": [
      {
        "paymentMethodType": "card",
        "paymentMethod": "credit",
        "latencyThreshold": 90,
        "bucketSize": 100,
        "hedgingPercent": 5,
        "lowerResetFactor": 0.5,
        "upperResetFactor": 1.5,
        "gatewayExtraScore": [
          {
            "gatewayName": "<string>",
            "gatewaySigmaFactor": 123
          }
        ]
      }
    ]
  },
  "params": [
    "PaymentMethod"
  ],
  "config": {
    "min_aggregates_size": 1,
    "default_success_rate": 123,
    "max_aggregates_size": 1,
    "current_block_threshold": {
      "duration_in_mins": 1,
      "max_total_count": 1
    },
    "specificity_level": "merchant",
    "exploration_percent": 123,
    "shuffle_on_tie_during_exploitation": true
  }
}
'
{
  "id": "routing_abc123",
  "profile_id": "profile_123",
  "name": "india_card_routing",
  "kind": "single",
  "description": "Volume split routing for domestic transactions",
  "created_at": 1718000000000,
  "modified_at": 1718050000000,
  "algorithm_for": "payment",
  "decision_engine_routing_id": "de_route_456"
}

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.

Path Parameters

account_id
string
required

Merchant id

profile_id
string
required

Profile id under which Dynamic routing needs to be created

Query Parameters

enable
enum<string>
required

Feature to enable for success based routing

Available options:
metrics,
dynamic_connector_selection,
none

Body

application/json
decision_engine_configs
object
required

Configuration for Decision Engine success rate based routing

params
enum<string>[] | null
deprecated
Available options:
PaymentMethod,
PaymentMethodType,
AuthenticationType,
Currency,
Country,
CardNetwork,
CardBin
config
object

Response

Routing Algorithm created

Metadata record representing a stored routing configuration.

Used in routing dictionary listings.

id
string
required

Unique identifier of the routing configuration.

Example:

"routing_abc123"
Example:

"routing_abc123"

profile_id
string
required

Profile ID associated with this routing configuration.

Example:

"profile_123"
Example:

"profile_123"

name
string
required

Name of the routing configuration.

Example:

"india_card_routing"
Example:

"india_card_routing"

kind
enum<string>
required
Available options:
single,
priority,
volume_split,
advanced,
dynamic,
three_ds_decision_rule
description
string
required

Description of this routing configuration.

Example:

"Volume split routing for domestic transactions"
Example:

"Volume split routing for domestic transactions"

created_at
integer<int64>
required

Creation timestamp (milliseconds since epoch).

Example:

1718000000000

modified_at
integer<int64>
required

Last modification timestamp (milliseconds since epoch).

Example:

1718050000000

algorithm_for
enum<string>
Available options:
payment,
payout,
three_ds_authentication
decision_engine_routing_id
string | null

Associated Decision Engine routing identifier (if applicable).

Present when routing is linked to an external decision engine.

Example:

"de_route_456"
Example:

"de_route_456"