HTTP Status Codes
The facilitator uses standard HTTP status codes to indicate request outcomes:200 OK
Request processed successfully. Check response body for actual result.Important: Most payment validation failures return 200 with
success: false in the response body. This includes signature failures, invalid amounts, wrong recipients, etc. The facilitator treats these as “successful API calls with failed payments” rather than HTTP errors.POST /accepts and GET /supported always return 200, even if handlers fail.400 Bad Request
Request-level validation failures: malformed JSON, missing required fields, invalid base64 encoding.Does NOT include payment validation errors (those return 200 with
success: false).500 Internal Server Error
Server infrastructure errors: thrown exceptions from RPC/network failures, transaction signing failures, or other unexpected server-side errors.Does NOT include blockchain transaction failures (those return 200 with
success: false).Error Response Format
For settlement errors, the response follows the standard format:Common Errors by Endpoint
POST /accepts
| Error Message Pattern | Status | Cause | Solution |
|---|---|---|---|
couldn't parse required response: ... | 400 | Request validation failed (missing/invalid fields) | Include required fields: x402Version (integer) and accepts (array) |
/accepts always returns 200. Handler failures are logged but don’t cause request errors.
POST /settle
General Errors
| Error Message | Status | Cause | Solution |
|---|---|---|---|
couldn't validate request: ... | 400 | Request validation failed | Include required fields: x402Version, paymentHeader, paymentRequirements |
couldn't validate x402 payload: ... | 400 | Payment payload validation failed | Verify payload structure and base64 encoding |
no matching payment handler found | 400 | No handler supports the payment scheme/network | Verify scheme and network are supported via /supported endpoint |
Solana Errors
| Error Message | Status | Cause | Solution |
|---|---|---|---|
Invalid transaction | 200 | Transaction validation failed | Review transaction structure, fee payer, amounts, and recipients. Response has success: false. Check server logs for specific details |
Transaction simulation failed | 200 | Transaction would fail on-chain | Response has success: false. Verify token accounts exist, have sufficient balance, and all addresses are correct |
Transaction confirmation timeout | 200 | Transaction not confirmed within 30 seconds | Response has success: false. Transaction may still confirm. Check on-chain status before retrying |
Transaction failed: ... | 200 | Transaction submitted but failed on-chain | Response has success: false. Check transaction on Solana Explorer for failure details |
"Invalid transaction" error with HTTP 200 and success: false. Specific validation details are logged server-side but not exposed in API responses.
EVM Errors
| Error Message | Status | Cause | Solution |
|---|---|---|---|
Invalid payload: ... | 200 | EVM payload validation failed | Response has success: false. Check payload structure matches EVM exact payment format |
Invalid signature | 200 | EIP-712 signature verification failed | Response has success: false. Verify EIP-712 domain, types, and message match exactly |
Invalid from address | 200 | from address is not valid Ethereum address | Response has success: false. Verify from address is valid and properly formatted |
Payment authorized to wrong address | 200 | Authorization to doesn’t match payTo | Response has success: false. Ensure authorization to field matches merchant address |
Incorrect payment amount | 200 | Authorization value doesn’t match maxAmountRequired | Response has success: false. Verify amount matches requirements exactly |
Authorization not yet valid | 200 | Current time < validAfter | Response has success: false. Wait until authorization becomes valid or create new one |
Authorization expired | 200 | Current time > validBefore | Response has success: false. Create new authorization with fresh timestamps |
Nonce already used | 200 | Nonce found in local cache (checked before on-chain) | Response has success: false. Generate new random nonce |
Authorization already used on-chain | 200 | Nonce was already consumed on-chain | Response has success: false. Generate new random nonce (32 bytes) for each payment |
Wallet client is not configured with a local account | 200 | Internal facilitator configuration error | Response has success: false. This is a server-side issue - contact facilitator operator |
Transaction failed | 200 | transferWithAuthorization call failed | Response has success: false. Check token balance is sufficient and contract supports EIP-3009 |
GET /supported
GET /supported always returns 200 with a kinds array. Handler failures are logged but don’t cause request errors. If all handlers fail, returns an empty array.
See Also
- POST /accepts - Get enriched payment requirements
- POST /settle - Execute payment settlement
- Solana Payments - Solana-specific details
- EVM Payments - EVM-specific details