Error Codes
This page documents all error codes returned by the TxnCheck API, along with their meanings and recommended solutions.Error Response Format
All errors follow a consistent JSON format:HTTP Status Codes
| Status Code | Meaning |
|---|---|
200 | Success |
202 | Accepted - Request queued |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
402 | Payment Required - Insufficient balance |
403 | Forbidden - Access denied |
404 | Not Found - Resource doesn’t exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Authentication Errors
Missing API Key
| HTTP Status | 401 |
| Message | Missing X-API-Key header |
| Cause | No X-API-Key header was provided |
| Solution | Include the X-API-Key header in your request |
Invalid API Key
| HTTP Status | 401 |
| Message | Invalid API key |
| Cause | The provided API key is incorrect or doesn’t exist |
| Solution | Verify you’re using the correct API key from your dashboard |
Merchant Deactivated
| HTTP Status | 403 |
| Message | Merchant account is deactivated |
| Cause | Your merchant account has been deactivated |
| Solution | Contact support to reactivate your account |
Invalid Signature
| HTTP Status | 401 |
| Message | Invalid request signature |
| Cause | The HMAC signature doesn’t match the expected value |
| Solution | Verify your signature calculation (see Authentication docs) |
Expired Timestamp
| HTTP Status | 401 |
| Message | Request timestamp expired (signature older than 5 minutes) |
| Cause | The X-Timestamp header is more than 5 minutes old |
| Solution | Use the current timestamp when signing requests |
Authorization Errors
Method Not Allowed
| HTTP Status | 403 |
| Message | Access to method '' is not allowed |
| Cause | Your merchant account doesn’t have access to this verification method |
| Solution | Contact your account manager to enable the method |
IP Not Whitelisted
| HTTP Status | 403 |
| Message | Request from non-whitelisted IP |
| Cause | Your request came from an IP not in your whitelist |
| Solution | Add the IP to your whitelist in the dashboard |
Payment Errors
Insufficient Balance
| HTTP Status | 402 |
| Message | Insufficient wallet balance |
| Cause | Your merchant account doesn’t have enough balance for this request |
| Solution | Top up your account balance in the dashboard |
Validation Errors
Invalid Mobile Number
| HTTP Status | 400 |
| Message | Mobile must be in format +91XXXXXXXXXX (Indian number) |
| Cause | The mobile number doesn’t match the required format |
| Solution | Use Indian mobile format: +91 followed by 10 digits |
Invalid VPA Format
| HTTP Status | 400 |
| Message | Each VPA must be in format username@bank |
| Cause | One or more VPAs don’t match the required format |
| Solution | Use format username@bank (e.g., user@upi) |
VPA Array Size
| HTTP Status | 400 |
| Message | At least one VPA is required / Maximum 100 VPAs allowed per request |
| Cause | The VPA array is empty or exceeds the maximum size |
| Solution | Provide between 1 and 100 VPAs per request |
Resource Errors
Request Not Found
| HTTP Status | 404 |
| Message | Request not found |
| Cause | The request ID doesn’t exist or doesn’t belong to your merchant |
| Solution | Verify the request ID is correct |
Rate Limit Errors
Rate Limit Exceeded
| HTTP Status | 429 |
| Message | Too Many Requests |
| Cause | You’ve exceeded the rate limit for this endpoint |
| Solution | Implement exponential backoff and retry |
| Endpoint Type | Limit |
|---|---|
| Verification endpoints | 100 requests/minute |
| Status endpoints | 300 requests/minute |
| Bulk endpoints | 10 requests/minute |
Request Status Error Classes
When a verification request fails, theerror field contains details:
| Error Class | Description | Recoverable |
|---|---|---|
VALIDATION_ERROR | Input validation failed | Fix input data |
AUTH_ERROR | Authentication/authorization issue | Check credentials |
PROVIDER_TEMPORARY | Temporary provider issue | Retry later |
PROVIDER_BUSINESS_ERROR | Provider rejected the request | Check input data |
Example Failed Request
Server Errors
Internal Server Error
| HTTP Status | 500 |
| Message | Internal server error |
| Cause | An unexpected error occurred on our servers |
| Solution | Retry the request. If the issue persists, contact support. |
Error Handling Best Practices
Log All Errors
Log error responses with request IDs for debugging
Retry with Backoff
Implement exponential backoff for 429 and 5xx errors
Validate Before Sending
Validate inputs client-side before API calls
Handle Gracefully
Show user-friendly messages, not raw API errors
