API Errors
Understand and troubleshoot common Notch Pay API errors
API Errors
This guide helps you understand and troubleshoot common errors you might encounter when using the Notch Pay API.
Error Response Format
Common Error Codes
Validation Errors
400 - Bad Request
400 - Bad Request
422 - Unprocessable Entity
422 - Unprocessable Entity
Solution: Check the errors
object for specific validation errors and fix them in your request.
Rate Limiting & Server Errors
Payment-Specific Errors
Invalid Amount
Invalid Amount
Currency Issues
Currency Issues
Solution: Use one of the supported currencies.
Invalid Amount
Invalid Amount
Currency Issues
Currency Issues
Solution: Use one of the supported currencies.
Invalid Payment Status
Invalid Payment Status
Payment Channel Issues
Payment Channel Issues
Solution: Use one of the supported payment channels.
Solution: Provide the required data for the selected payment channel.
Transfer-Specific Errors
Insufficient Balance
Insufficient Balance
Solution: Add funds to your Notch Pay account before attempting the transfer.
Troubleshooting Tips
Check Request Format
Ensure your request is properly formatted and includes all required parameters. Use the API reference to verify the correct format.
Verify Authentication
Make sure you’re using the correct API key and that it’s properly included in the Authorization
header.
Inspect Error Messages
Pay attention to the specific error message and the errors
object in the response, which often contains detailed information about what went wrong.
Check Environment
Ensure you’re using the right environment (test or live) for your needs. Test API keys won’t work in the live environment and vice versa.
Review Logs
Check your application logs for any additional information about the request that might help identify the issue.
Contact Support
If you’re still having trouble, contact Notch Pay support with:
- The full error response
- Your request details (excluding sensitive information like API keys)
- Any steps you’ve already taken to troubleshoot
Error Handling Best Practices
Implement Retry Logic
For transient errors (like network issues or rate limiting), implement retry logic with exponential backoff.
Graceful Error Handling
Present user-friendly error messages to your customers while logging detailed error information for debugging.