Skip to main content

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

Authentication Errors

error
Solution: Include your API key in the Authorization header of your request.
error
Solution: Check that you’re using the correct API key. Make sure you’re not mixing test and live keys.
error
Solution: Verify that your API key has the necessary permissions for the operation you’re trying to perform.
error
Solution: Include your private key in the X-Grant header for sensitive operations.

Resource Errors

error
Solution: Check that the ID or reference you’re using exists and belongs to your account.
error
Solution: Use a unique reference for each payment or other resource you create.

Validation Errors

error
Solution: Check your request parameters and make sure they match the API documentation.
error
Solution: Ensure your request body contains valid JSON.
error
Solution: Check the errors object for specific validation errors and fix them in your request.

Rate Limiting & Server Errors

error
Solution: Implement exponential backoff and respect the Retry-After header in the response.
error
Solution: This is a server-side error. If it persists, contact Notch Pay support with details about your request.

Payment-Specific Errors

error
Solution: Ensure the payment amount meets the minimum requirement for the selected currency.
error
Solution: Break down large payments into smaller transactions or contact support to increase your limit.
error
Solution: Use one of the supported currencies.
error
Solution: Provide at least an email or phone number for the customer.
error
Solution: Provide a valid email address for the customer.

Transfer-Specific Errors

error
Solution: Add funds to your Notch Pay account before attempting the transfer.
error
Solution: Ensure the beneficiary exists and is correctly specified.
error
Solution: Verify the beneficiary’s account information.

Troubleshooting Tips

1

Check Request Format

Ensure your request is properly formatted and includes all required parameters. Use the API reference to verify the correct format.
2

Verify Authentication

Make sure you’re using the correct API key and that it’s properly included in the Authorization header.
3

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.
4

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.
5

Review Logs

Check your application logs for any additional information about the request that might help identify the issue.
6

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.
For more detailed information about specific API endpoints and their potential errors, refer to the documentation for each endpoint.
Need more help? Contact our support team with details about the error you’re encountering.