Analytics Decisions
August 3, 2026 ยท View on GitHub
Use case
Returns decision volume time series and routing approach totals for the selected window.
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>"
export TENANT_HEADER="x-tenant-id: public"
# Sandbox only:
# export BASE_URL=https://sandbox.hyperswitch.io
# export FEATURE_HEADER="x-feature: decision-engine"
Request
- Method and path:
GET /analytics/decisions - Parameters:
x-tenant-id(header, required, string) โ see Environment setup.range(query, optional, string)start_ms(query, optional, integer)end_ms(query, optional, integer)page(query, optional, integer)page_size(query, optional, integer)payment_method_type(query, optional, string)payment_method(query, optional, string)card_network(query, optional, string)card_is_in(query, optional, string)currency(query, optional, string)country(query, optional, string)auth_type(query, optional, string)gateway(query, optional, string)payment_id(query, optional, string)request_id(query, optional, string)route(query, optional, string)status(query, optional, string)flow_type(query, optional, string)routing_approach(query, optional, string)exclude_routing_approach(query, optional, string)error_code(query, optional, string)
- Body: Optional query parameters include
range,routing_approach,exclude_routing_approach,gateway, and routing dimensions.
Example
Decision activity
curl "$BASE_URL/analytics/decisions?range=1h" \
--header "$AUTH_HEADER" \
--header "$TENANT_HEADER"
Exclude debit routing
curl "$BASE_URL/analytics/decisions?range=1d&exclude_routing_approach=NTW_BASED_ROUTING" \
--header "$AUTH_HEADER" \
--header "$TENANT_HEADER"
Response
{
"merchant_id": "merchant_demo",
"range": "1d",
"tiles": [
{ "label": "Decisions", "value": "42", "subtitle": "Failures: 3" },
{ "label": "Error rate", "value": "7.14%", "subtitle": "From recorded decision events" }
],
"series": [
{ "bucket_ms": 1808624000000, "routing_approach": "SR_SELECTION_V3_ROUTING", "count": 10 }
],
"approaches": [
{ "rule_name": "SR_SELECTION_V3_ROUTING", "count": 42 }
]
}
Notes
- Analytics reads are ClickHouse-backed and merchant-scoped by the authenticated context.
- Use
range=15m|1h|12h|1d|1worstart_msplusend_msfor a custom window. - Use this for route volume charts; use gateway scores for auth-rate score percentages.