Routing - Auth Rate Based
Create a success-based dynamic routing algorithm for a business profile.
Request
POST /account/{account_id}/business_profile/{profile_id}/dynamic_routing/success_based/create
Headers:
Content-Type: application/json
api-key:
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": 123,
"defaultBucketSize": 123,
"defaultHedgingPercent": 123,
"defaultLowerResetFactor": 123,
"defaultUpperResetFactor": 123,
"defaultGatewayExtraScore": [
{
"gatewayName": "<string>",
"gatewaySigmaFactor": 123
}
],
"subLevelInputConfig": [
{
"paymentMethodType": "<string>",
"paymentMethod": "<string>",
"latencyThreshold": 123,
"bucketSize": 123,
"hedgingPercent": 123,
"lowerResetFactor": 123,
"upperResetFactor": 123,
"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
}
}
'Response
200 — Routing Algorithm created
Authorizations
api_key (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.
api-key required in header. Keep it secret and do not expose it client-side.
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, required) — Feature to enable for success based routing. Available options:
metrics
dynamic_connector_selection
none
Body (application/json)
decision_engine_configs (object, required) — See child attributes in the request example.
defaultLatencyThreshold (number)
defaultBucketSize (number)
defaultHedgingPercent (number)
defaultLowerResetFactor (number)
defaultUpperResetFactor (number)
defaultGatewayExtraScore (array of objects)
gatewayName (string)
gatewaySigmaFactor (number)
subLevelInputConfig (array of objects)
paymentMethodType (string)
paymentMethod (string)
latencyThreshold (number)
bucketSize (number)
hedgingPercent (number)
lowerResetFactor (number)
upperResetFactor (number)
gatewayExtraScore (array of objects)
gatewayName (string)
gatewaySigmaFactor (number)
params (enum[] | null) — Available options:
PaymentMethod
PaymentMethodType
AuthenticationType
Currency
Country
CardNetwork
CardBin
config (object) — See example for fields:
min_aggregates_size (number)
default_success_rate (number)
max_aggregates_size (number)
current_block_threshold (object)
duration_in_mins (number)
max_total_count (number)
specificity_level (string) — e.g., "merchant"
exploration_percent (number)
shuffle_on_tie_during_exploitation (boolean)
Response Fields (200)
id (string) — required
profile_id (string) — required
name (string) — required
kind (enum) — required. Available options: single, priority, volume_split, advanced, dynamic, three_ds_decision_rule
description (string) — required
created_at (integer) — required
modified_at (integer) — required
algorithm_for (enum) — Available options: payment, payout, three_ds_authentication
decision_engine_routing_id (string | null)
Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v1/routing/routing--success-based.mdx Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v1/routing/routing--success-based