Metadata
| Field | Value |
|---|---|
| Name | x402.pay |
| Category | write |
| Required scope | x402:pay |
| Idempotency key required | yes |
Annotations
| Annotation | Value |
|---|---|
| Title | Pay x402 Endpoint |
| Read-only | no |
| Destructive | yes |
| Idempotent | yes |
| Open-world | yes |
| Requires human approval | no |
Input schema
Output schema
Auth
Caller’s grant must include thex402:pay scope. Grants whose scope set is a superset of the required scope are accepted.
Request examples
Response examples
SuccessErrors
| Code | reason_id | Meaning |
|---|---|---|
-32000 | unauthenticated | Bearer token missing or expired. |
-32001 | unauthorized | Grant does not include x402:pay. |
-32002 | policy_denied | Envelope denied the payment (amount, counterparty, velocity). |
-32004 | rate_limited | Request rate exceeded. data.retry_after_seconds present. |
-32006 | chain_tx_unverifiable | Server-side RPC returned no result for the facilitator-claimed tx. Do not retry without investigation — the funds may not have moved. |
-32602 | invalid_tx_hash_format | RPC-verified tx hash format does not match the requested chain (EVM vs Solana mismatch). |
-32602 | facilitator_tx_hash_mismatch | Facilitator’s claimed tx hash differs from the RPC-verified value. |
-32602 | facilitator_amount_mismatch | Facilitator claimed an amount different from the on-chain verified amount. |
-32602 | amount_over_max | Verified on-chain amount exceeds max_amount_cents. |
-32603 | internal_error | Transient server fault. Retry with the same idempotency key. |
on_chain_tx in the response is always the server-fetched RPC value, never the facilitator-supplied value. The facilitator receipt is used only for the x402 handshake; all money-safety fields are independently verified (PLAN.md F1).