Errors & Troubleshooting
Comprehensive error handling guide for Cyrexa H2H integration with error codes, causes, and solutions.Error Response Format
All API errors follow this consistent format:HTTP Status Codes
Status | Meaning | Action Required |
---|---|---|
200 | Success | Continue processing |
400 | Bad Request | Fix request parameters |
401 | Unauthorized | Check API key |
403 | Forbidden | Check permissions |
404 | Not Found | Verify endpoint/resource |
429 | Rate Limited | Implement backoff |
500 | Server Error | Retry with backoff |
Authentication Errors
401 Unauthorized
Cause: Invalid or missing API key- Verify API key is correct
- Check
X-API-Key
header is present - Ensure using correct environment (sandbox/production)
403 Forbidden
Cause: API key lacks required permissions- Contact support to verify account permissions
- Check if feature is enabled for your account
Validation Errors
400 Bad Request - Missing Fields
- Include all required fields
- Verify field names match API specification
400 Bad Request - Invalid Format
- Email: Must be valid email format
- Phone: Include country code (+1234567890)
- Amount: Positive number with max 2 decimals
- Currency: 3-letter ISO code (USD, EUR, etc.)
Payment Errors
Card Declined
Code | Reason | Customer Action |
---|---|---|
05 | Do Not Honor | Try different card |
51 | Insufficient Funds | Add funds or use different card |
54 | Expired Card | Use valid card |
57 | Transaction Not Permitted | Contact bank |
61 | Exceeds Withdrawal Limit | Contact bank |
Invalid Card Details
- Verify card number passes Luhn check
- Check expiry date format (MM/YY)
- Validate CVV length (3-4 digits)
3D Secure Errors
- Customer should retry with correct 3DS credentials
- Ensure browser supports 3D Secure
- Check if card is enrolled for 3DS
UPI Errors
Invalid UPI ID
- Validate UPI ID format:
username@bankcode
- Check for valid bank codes (paytm, googlepay, etc.)
UPI Transaction Failed
Code | Reason | Action |
---|---|---|
U30 | Invalid PIN | Customer retry with correct PIN |
U16 | Risk threshold exceeded | Contact bank |
U66 | Device not registered | Register device with bank |
U69 | Collect request declined | Customer declined payment |
Webhook Errors
Invalid Signature
- Verify webhook secret is correct
- Check HMAC SHA512 signature calculation
- Ensure raw request body is used for signature
Webhook Timeout
- Ensure webhook endpoint responds within 30 seconds
- Return HTTP 200 status code
- Process webhook asynchronously if needed
Rate Limiting
429 Too Many Requests
- Implement exponential backoff
- Respect
Retry-After
header - Distribute requests over time
Network Errors
Connection Timeout
Cause: Network connectivity issues or slow response Solutions:- Increase timeout values
- Implement retry logic
- Check network connectivity
DNS Resolution Failed
Cause: Unable to resolve API hostname Solutions:- Check internet connectivity
- Verify DNS settings
- Try different DNS servers (8.8.8.8, 1.1.1.1)
Troubleshooting Playbooks
Payment Not Processing
-
Check API Response
- Verify 200 status code
- Check
paymentRequestId
is returned
-
Verify Webhook Setup
- Confirm webhook URL is accessible
- Test signature verification
- Check webhook logs
-
Monitor Payment Status
- Poll status endpoint
- Check for status updates
- Review error messages
Webhook Not Received
-
Verify Webhook URL
-
Check Firewall/Security
- Ensure webhook URL is publicly accessible
- Check firewall rules
- Verify SSL certificate
-
Test Signature Verification
High Error Rate
-
Analyze Error Patterns
- Group errors by type
- Identify common causes
- Check error frequency
-
Review Request Data
- Validate input formats
- Check required fields
- Verify data quality
-
Monitor System Health
- Check API response times
- Monitor error rates
- Review system logs
Error Monitoring
Logging Best Practices
Error Alerting
Set up alerts for:- High error rates (>5%)
- Authentication failures
- Webhook delivery failures
- Rate limit violations
- Payment decline spikes
Getting Help
Support Channels
- Technical Support: support@cyrexa.com
- Documentation: Browse our guides and API reference
- Status Page: Check system status and incidents
- Community: Developer community forum
When Contacting Support
Include:- Error code and message
- Request ID from error response
- Timestamp of the issue
- Steps to reproduce
- Code samples (remove sensitive data)
Emergency Contacts
For critical production issues:- Phone: +1-XXX-XXX-XXXX
- Emergency Email: emergency@cyrexa.com
- Response Time: Within 1 hour