Configure SR Dimensions

August 3, 2026 ยท View on GitHub

Use case

Configures success-rate routing dimensions used for score lookup and aggregation.

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 /config-sr-dimension
  • Parameters: none.
  • Body: JSON body with merchant_id and a paymentInfo object holding udfs and fields. Valid fields values are currency, country, auth_type, card_is_in, and card_network.

Example

Configure SR dimensions

curl --location "$BASE_URL/config-sr-dimension" \
  --header "$AUTH_HEADER" \
  --header "Content-Type: application/json" \
  --data '{
  "merchant_id": "merchant_demo",
  "paymentInfo": {
    "udfs": [],
    "fields": ["currency", "country", "auth_type"]
  }
}'

Response

"SR Dimension configuration updated successfully"

Notes

  • Use only dimensions supported by /config/routing-keys.
  • Changing dimensions affects how future score snapshots are grouped.