Error Handling
Handle payment errors gracefully in your integration.
Common Errors
Payment Rejected
Cause: Customer rejected transaction
State: -1 (Failed)
Action: Allow customer to retry
Insufficient Balance
Cause: Customer doesn't have enough tokens
State: -1 (Failed)
Action: Show clear error message
Network Error
Cause: Network connectivity issue
State: Varies
Action: Retry transaction
Wrong Network
Cause: Customer on wrong blockchain
State: Payment blocked
Action: Prompt network switch
Error Handling Best Practices
- Clear Messages: Provide user-friendly error messages
- Retry Options: Allow customers to retry
- Support Contact: Provide support contact info
- Logging: Log errors for debugging
Next Steps
- Troubleshooting: Common issues and solutions
- API Reference: Error code reference
Handling errors? Check Troubleshooting →