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.adminTokento a real secretIt gates/api/receipts,/api/eventsand/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.allowedOriginsminimalAn explicit allowlist for browsers, empty by default. Agent traffic needs no entry. - Do not ship the admin token to a browserThe 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 gatewayMandatory for ACP, whose bearer token is otherwise a shared secret in the clear.
Abuse controls
- Add rate limiting at your edgeThe gateway has none. A free resource is an unauthenticated proxy to your backend at whatever rate a caller chooses.
- Keep your backend's own authenticationThe gateway does not secure your API; its credentials go in
backend.headersas${VAR}references. - Review every backend URLThere is no private-address blocklist. The gateway calls exactly what you configure.
Money
- Confirm
payTois your walletCompare the startup banner,/.well-known/agent-commerceanddoctor. A development address is refused on any public network. - Use an authenticated facilitator on mainnet
bearerneeds nothing installed;cdppulls@coinbase/x402. An unauthenticated one requiresallowUnauthenticatedFacilitator: trueand is reported as WARN. - Use a dedicated RPC endpointPublic endpoints rate-limit, and their outages become your readiness failures.
- Plan for reconciliationSettlement is final. A backend failure after payment is recorded, not rolled back; a broadcast that is never confirmed is recorded as
settlement-uncertainwith its transaction hash.
Operations
- Back up the SQLite filesReceipts, and — if enabled — the ACP idempotency and AP2 replay databases. A deleted consumed mandate becomes spendable again.
- Point probes at
/healthand/ready/readyanswers 503 until config, store, adapters and every payment provider are healthy. - Run
agent-commerce doctor --jsonafter every deployIt exits non-zero on any failure.
The full threat model is in Security model.