Merchant setup

Go-live checklist

What to set, check and put in front of the gateway before anyone else can reach it.

The demo binds everything to 127.0.0.1. Before the gateway is reachable by anyone else, work through this list.

Access

  • Set server.adminToken to a real secret
    It gates /api/receipts, /api/events and /api/events/stream — payer addresses, amounts and settlement hashes. Without it they return 404, and you cannot read your own ledger over HTTP.
  • Keep server.allowedOrigins minimal
    An explicit allowlist for browsers, empty by default. Agent traffic needs no entry.
  • Do not ship the admin token to a browser
    The demo dashboard inlines it via VITE_ADMIN_TOKEN, which makes it public to anyone who loads the page. Never point a real token at it.
  • Terminate TLS in front of the gateway
    Mandatory for ACP, whose bearer token is otherwise a shared secret in the clear.

Abuse controls

  • Add rate limiting at your edge
    The gateway has none. A free resource is an unauthenticated proxy to your backend at whatever rate a caller chooses.
  • Keep your backend's own authentication
    The gateway does not secure your API; its credentials go in backend.headers as ${VAR} references.
  • Review every backend URL
    There is no private-address blocklist. The gateway calls exactly what you configure.

Money

  • Confirm payTo is your wallet
    Compare the startup banner, /.well-known/agent-commerce and doctor. A development address is refused on any public network.
  • Use an authenticated facilitator on mainnet
    bearer needs nothing installed; cdp pulls @coinbase/x402. An unauthenticated one requires allowUnauthenticatedFacilitator: true and is reported as WARN.
  • Use a dedicated RPC endpoint
    Public endpoints rate-limit, and their outages become your readiness failures.
  • Plan for reconciliation
    Settlement is final. A backend failure after payment is recorded, not rolled back; a broadcast that is never confirmed is recorded as settlement-uncertain with its transaction hash.

Operations

  • Back up the SQLite files
    Receipts, and — if enabled — the ACP idempotency and AP2 replay databases. A deleted consumed mandate becomes spendable again.
  • Point probes at /health and /ready
    /ready answers 503 until config, store, adapters and every payment provider are healthy.
  • Run agent-commerce doctor --json after every deploy
    It exits non-zero on any failure.

The full threat model is in Security model.