v12

latestOpenAPI 3.1.0AGPL-3.0raw.githubusercontent.com2026-08-0464108237.1 KB
Analytics

Preview trace

ClickHouse-backed rule preview trace read endpoint.

get/analytics/preview-trace

Query parameters

rangestring
start_msinteger
end_msinteger
pageinteger
page_sizeinteger
payment_method_typestring
payment_methodstring
card_networkstring
card_is_instring
currencystring
countrystring
auth_typestring
gatewaystring
payment_idstring
request_idstring
routestring
statusstring
flow_typestring
routing_approachstring
exclude_routing_approachstring
error_codestring

Headers

x-tenant-idstring required

Tenant to resolve. The shipped config files define only the "public" tenant. No fallback — omitting this fails with TE_03.

Response

Decision trace

merchant_idstring
rangestring
payment_idstring nullable
request_idstring nullable
gatewaystring nullable
routestring nullable
statusstring nullable
flow_typestring nullable
routing_approachstring nullable
error_codestring nullable
pageinteger
page_sizeinteger
total_resultsinteger
total_successinteger
total_failureinteger

Example response

{
  "merchant_id": "merchant_demo",
  "range": "1d",
  "page": 1,
  "page_size": 12,
  "total_results": 1,
  "total_success": 1,
  "results": [
    {
      "lookup_key": "pay_sr_001",
      "payment_id": "pay_sr_001",
      "event_count": 2,
      "latest_status": "success",
      "latest_gateway": "stripe",
      "latest_stage": "gateway_decided"
    }
  ],
  "timeline": [
    {
      "id": "evt_...",
      "flow_type": "decision",
      "event_stage": "gateway_decided",
      "route": "decide_gateway",
      "payment_method_type": "CARD",
      "payment_method": "CREDIT",
      "gateway": "stripe",
      "status": "success",
      "score_value": 0.94,
      "created_at_ms": 1808624000000
    }
  ]
}