Error Response Format
All Hixbe APIs return errors in a consistent JSON format to make error handling predictable.Standard Error Structure
Common Error Codes
Authentication Errors
| Error Code | HTTP Status | Description | Solution |
|---|---|---|---|
INVALID_API_KEY | 401 | API key is invalid or malformed | Check your API key in dashboard |
MISSING_AUTH_HEADER | 401 | Authorization header missing | Include Authorization: Bearer YOUR_KEY |
INSUFFICIENT_PERMISSIONS | 403 | API key lacks required permissions | Create key with proper permissions |
EXPIRED_API_KEY | 401 | API key has expired | Generate new key in dashboard |
INVALID_VERSION | 400 | API version not supported | Use Hixbe-Version: 2026-01-01 |
Request Errors
| Error Code | HTTP Status | Description | Solution |
|---|---|---|---|
INVALID_REQUEST | 400 | Request malformed or missing required fields | Check request format and required fields |
VALIDATION_ERROR | 400 | Field validation failed | Review field types and constraints |
RATE_LIMIT_EXCEEDED | 429 | Too many requests | Implement exponential backoff |
RESOURCE_NOT_FOUND | 404 | Requested resource doesn’t exist | Verify resource ID and endpoint |
METHOD_NOT_ALLOWED | 405 | HTTP method not supported | Use correct HTTP method |
Payment-Specific Errors
| Error Code | HTTP Status | Description | Solution |
|---|---|---|---|
CARD_DECLINED | 402 | Payment method was declined | Try different payment method |
INSUFFICIENT_FUNDS | 402 | Account has insufficient funds | Add funds or use different method |
PAYMENT_INTENT_EXPIRED | 400 | Payment intent has expired | Create new payment intent |
AMOUNT_TOO_LARGE | 400 | Amount exceeds maximum allowed | Reduce amount or contact support |
SMS-Specific Errors
| Error Code | HTTP Status | Description | Solution |
|---|---|---|---|
INSUFFICIENT_BALANCE | 402 | SMS balance too low | Top up account balance |
INVALID_RECIPIENT | 400 | Phone number format invalid | Check phone number format |
SENDER_ID_UNAVAILABLE | 400 | Sender ID not approved | Request sender ID approval |
MESSAGE_TOO_LONG | 400 | SMS exceeds character limit | Shorten message or use multiple parts |
Certification Errors
| Error Code | HTTP Status | Description | Solution |
|---|---|---|---|
CREDENTIAL_ALREADY_EXISTS | 409 | Credential ID already in use | Use unique credential identifier |
INVALID_CREDENTIAL_DATA | 400 | Credential data malformed | Validate credential format |
VERIFICATION_FAILED | 400 | Credential verification failed | Check credential authenticity |
Implementing Error Handling
Basic Error Handling
Error-Specific Handling
Retry Logic and Backoff
Exponential Backoff Implementation
Idempotency for Critical Operations
Implementing Idempotency
Rate Limiting
Understanding Rate Limits
Hixbe implements rate limiting to ensure fair usage:- Payment API: 100 requests per minute per API key
- SMS API: 50 requests per minute per API key
- Certification API: 200 requests per minute per API key
Rate Limit Headers
Handling Rate Limits
Monitoring and Alerting
Error Tracking
Best Practices
- Always check the
successfield in responses - Implement proper error logging and monitoring
- Use exponential backoff for retries
- Implement idempotency for critical operations
- Monitor rate limit headers
- Handle both expected and unexpected errors
- Test error scenarios in sandbox
- Keep error messages user-friendly
Need Help?
Troubleshooting
Common error scenarios and solutions
Best Practices
Learn more integration best practices
Webhooks
Monitor errors with webhook notifications
Support
Get help with error handling