Troubleshooting
Solutions to common issues when integrating x402 payments.Client Errors
User rejected the signature
Symptom: Error message contains “User rejected” or “User denied” Cause: User clicked “Reject” in their wallet when asked to sign Solution:insufficient_balance
Symptom: API returns{ "reason": "insufficient_balance" }
Cause: User doesn’t have enough of the selected token
Solution:
createBalanceSelector which automatically picks a token the user can afford.
quote_expired
Symptom: API returns{ "reason": "quote_expired" }
Cause: The DEX swap quote expired before settlement
Solution: The SDK automatically retries with fresh quotes. If persisting:
- Check network latency
- Ensure system clock is accurate
Wrong network
Symptom: Error about network mismatch or chain ID Cause: Wallet is on different network than API expects Solution:Insufficient token balance
Symptom: Transaction fails or signature rejected Cause: Wallet doesn’t have enough of the selected token Solution:Server Errors
401 Unauthorized
Symptom: All requests return 401 Cause: Invalid or missing API key Solution:- Check API key is set in environment:
- Verify key format: should start with
x402_ - Ensure Bearer prefix is included:
503 Service Unavailable
Symptom: Facilitator requests fail with 503 Cause: Facilitator service is temporarily unavailable Solution:429 Rate Limited
Symptom: Requests return 429 Too Many Requests Cause: Exceeded rate limit (1000/min per API key) Solution:- Check for request loops in your code
- Implement client-side rate limiting
- Contact support for higher limits if legitimately needed