| Route | Purpose |
|---|---|
GET /health |
liveness |
GET /ready |
readiness for the store, adapters and configured providers |
GET /.well-known/agent-commerce |
merchant, protocol and provider discovery |
GET /api/resources |
canonical resource list |
POST /api/resources/:id/invoke |
invoke; returns 402 when proof is absent |
GET /api/receipts, GET /api/events |
operator audit |
/mcp |
MCP Streamable HTTP when enabled |
/.well-known/agent-card.json, /a2a |
A2A discovery and JSON-RPC when enabled |
/.well-known/acp.json, /acp/checkout_sessions… |
ACP discovery and checkout when enabled |
The invoke route uses the selected rail's headers:
| Rail | Proof | Challenge on 402 | Refused proof or spent authorization (402) | Refused settlement (402) | Delivered response | Backend error after settlement |
|---|---|---|---|---|---|---|
| x402 | PAYMENT-SIGNATURE |
PAYMENT-REQUIRED |
a fresh PAYMENT-REQUIRED with error |
PAYMENT-RESPONSE with success: false |
PAYMENT-RESPONSE |
PAYMENT-RESPONSE |
| MPP | Authorization: Payment ... |
WWW-Authenticate: Payment ... |
a fresh WWW-Authenticate |
a fresh WWW-Authenticate and PAYMENT-RESPONSE with success: false |
Payment-Receipt and PAYMENT-RESPONSE |
PAYMENT-RESPONSE |
The error body carries details.challenge when the pipeline supplies a
retry challenge. Other outcomes:
- A replay returns 409 without a challenge if the first attempt is unfinished,
has the legacy
failedstatus, or its status is unavailable. Issuing another challenge could lead to a second payment for the same request. - Replay
details.networkidentifies the paid offer's network. A fresh x402 challenge on 402 uses that family's replayerror:invalid_exact_evm_nonce_already_usedon EVM,invalid_exact_near_payload_delegate_action_nonce_already_usedon NEAR, andduplicate_settlementon Solana, whose SDK has no replay code of its own. - A missing Permit2 token allowance (
permit2_allowance_required) returns 412 Precondition Failed with a freshPAYMENT-REQUIRED, per theexactEVM scheme. The buyer approves Permit2 and retries.x402HTTPClient.parsePaymentResultdecodes that header only on 402; for 412, callgetPaymentRequiredResponseor readdetails.challengein the response body. - A settlement without a verdict returns 502 with
PAYMENT-RESPONSE. Its reason issettlement_pendingwhen a transaction hash is available, orunexpected_settle_errorotherwise. - A settled
PAYMENT-RESPONSEincludesamountin base units when the provider supplies it. Paid deliveries useCache-Control: private; fresh 402 challenges useno-store.