402 challenges to settled payments, and whether the on-chain facilitator is operating normally. The same data is surfaced visually in the Meterlane dashboard under Gateway → Metrics.
GET /api/gateway/metrics
Returns aggregated usage statistics and facilitator status for your organisation.Query parameters
The time window to aggregate over. Accepted values:
24h— rolling last 24 hours7d— rolling last 7 days
Response shape
The response is a JSON object with two top-level keys:metrics and facilitator.
metrics object
Total number of requests received across all routes in the window, including both unpaid probes and paid requests.
Number of requests that returned a
402 Payment Required response. High values relative to metrics.paid may indicate agents are probing but not completing payment.Number of requests where payment was verified and the upstream was proxied successfully.
Number of requests that resulted in a server-side error (5xx status).
Average latency in milliseconds for the gateway to issue the
402 challenge response. null if no challenge requests were recorded in the window.Average latency in milliseconds for the full payment verification and settlement cycle before the upstream response is returned.
null if no paid requests were recorded in the window.Fraction of total requests that resulted in a server-side error, expressed as a decimal between
0 and 1.The time window that was aggregated:
"24h" or "7d".facilitator object
Current reachability of the x402 facilitator. Possible values:
"up", "degraded", "down".Round-trip latency in milliseconds for the most recent facilitator health probe.
ISO 8601 timestamp of when the facilitator health probe was last run.
The facilitator URL that was probed.
Example request
Example response
Interpreting the metrics
| Metric | What to watch for |
|---|---|
facilitator.status: "degraded" | Settlement is slower than normal. Requests still succeed but metrics.avgSettleMs will be elevated. |
facilitator.status: "down" | The on-chain facilitator is unreachable. Paid requests will fail until the facilitator recovers. |
metrics.avgSettleMs above 1000 ms | May indicate network congestion on the settlement chain. |
metrics.unpaid402 / metrics.totalRequests above 50% | Agents are probing but not completing payment — check client integration. |
Dashboard access
You can view these metrics without using the API directly. In the Meterlane dashboard, navigate to Gateway → Metrics and use the window selector to switch between the 24-hour and 7-day views. The dashboard also plots historical trends and breaks down traffic per route.Metrics are updated approximately every 60 seconds. There may be a short lag between a request being processed and its data appearing in the API response or dashboard.