Checks to run
GET /healthandGET /readyfor process and readiness health.GET /status.jsonforbilling_mode=mainnet-beta,mainnet_billing_enabled=true,network=eip155:8453, and Base mainnet USDC.pnpm discovery:check --baseUrl https://primitive402.devfor discovery readiness.pnpm x402:paid-route-matrix --baseUrl https://primitive402.devfor unpaid paid-route metadata across all seven routes.pnpm monitor:mainnet --baseUrl https://primitive402.devfor a concise PASS/WARN/FAIL summary.- Private
/admin/metricsforpaidX402Calls,paymentRequiredCalls, paid route errors,rateLimitedCalls,botProbeCalls, and p95 latency.
Alert signals
/readynot returning200is critical./status.jsonnot reporting mainnet beta values is critical.- Any unpaid
/x402/v1/*route returning non-402, wrong network, wrong asset, wrongpayTo, or wrong resource URL is critical. - CDP/facilitator auth, verification, settlement failure, or missing
PAYMENT-RESPONSEis critical. - Paid route errors, unexpected non-2xx paid retries, rate-limit spikes, and p95 latency above the chosen threshold are warnings unless repeated or user-impacting.
paidX402Callsunexpectedly flat whilepaymentRequiredCallsrises is a warning.botProbeCallsspikes are informational unless they affect real routes.- Database readiness failure is critical.
Optional webhooks
MONITOR_WEBHOOK_URL="https://monitor.example/webhook" \ MONITOR_ALERT_MIN_SEVERITY="warn" \ ADMIN_METRICS_TOKEN="<secret>" \ pnpm monitor:mainnet --baseUrl https://primitive402.dev
Webhook alerting is optional and env-gated. Payloads include service name, base URL, severity, timestamp, summary, and failing checks. They do not include admin tokens, CDP secrets, private keys, raw payment headers, seed phrases, or raw user input.
Railway and external monitors
- Use Railway health checks for
/readyif appropriate. - Configure Railway Observability Dashboard CPU, RAM, disk, and network monitors if available on the current plan.
- Configure Railway project webhooks for deploy failures or alerts if useful.
- Keep app-level x402 route checks separate from infrastructure monitors.
- Consider external uptime checks for
/health,/ready,/status.json, and unpaid x402 route checks.
Repository docs
Markdown source: docs/ops/mainnet-monitoring.md.