Payment audit
Changed onClickHouse-backed payment audit read endpoint.
Request
- Base URLhttp://localhost:8080
- URLhttp://localhost:8080/analytics/payment-audit
- Auth
- HTTP bearer
- or API key in header x-api-key
Query parameters
Only payments whose latest Decide Gateway or Hybrid Routing connector differs from a reported update connector in the selected window. Compares connector names without case or account suffixes. Keeps complete payment summaries and timelines; ignored for exact ID lookup.
Payment audit: comma-separated to match payments that went through any of them.
Payment audit: comma-separated to match payments that went through any of them.
Matches payments with an event of exactly this status (e.g. FAILURE, CHARGED; success / failure also match routing calls). To filter by what happened to the payment, use outcome.
The payment's outcome from its reported statuses: success (any attempt succeeded), failure (failed terminally, never succeeded) or pending (no terminal status yet). Comma-separated to match any of several, e.g. failure,pending.
Payment audit only: payments whose routed amount is at least this. Like currency, payment_method, payment_method_type, card_network and auth_type (which on the payment audit take comma-separated values and match any of them, case-insensitively), it matches the whole payment by its routing decision.
Payment audit only: payments whose routed amount is at most this.
Payment audit only: a JSON object of payment field names to values; a payment must carry every value, matched case-insensitively. A field is a routing key from /config/routing-keys (other than a numeric one) or metadata.<key>, read from every endpoint's stored request. An unknown field returns 400.
Payment audit: comma-separated to match payments that hit any of these error codes.
Which audit kinds to read: all (default, merged per payment), dynamic, or preview.
List only payments whose trail holds this kind of event (the dashboard's Routing type filter): multi_objective (/decide and /routing/hybrid), auth_rate (/decide-gateway without debit routing), rule_based (/routing/evaluate) or debit_routing. hybrid, the older name, reads as multi_objective.
Headers
Tenant to resolve. The shipped config files define only the "public" tenant. No fallback — omitting this fails with TE_03.
Response
Payment audit
Example response
{
"merchant_id": "merchant_demo",
"range": "1d",
"page": 1,
"page_size": 20,
"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",
"experiments": [
{
"experiment_id": "routing_dd6ec3ad-aac4-4c8c-b6f7-03c732163f90",
"arm": "variant",
"endpoint": "hybrid_routing"
}
]
}
],
"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
}
]
}Changes
- info
added the new optional
queryrequest parameterpayment_fields - info
added the new enum value
auth_rateto thequeryrequest parameterrouting_kind
- info
- info
added the new optional
queryrequest parameterconnector_mismatch
- info