Skip to main content

Error Response Format

All Xerobi APIs return errors in a consistent JSON format to make error handling predictable.

Standard Error Structure

Common Error Codes

Authentication Errors

Request Errors

Payment-Specific Errors

SMS-Specific Errors

Certification Errors

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

Xerobi 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 success field 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