Skip to main content

Errors & Troubleshooting

Comprehensive error handling guide for Caibo H2H integration with error codes, causes, and solutions.

Error Response Format

All API errors follow this consistent format:

HTTP Status Codes

Authentication Errors

401 Unauthorized

Cause: Invalid or missing API key
Solutions:
  • 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
Solutions:
  • Contact support to verify account permissions
  • Check if feature is enabled for your account

Validation Errors

400 Bad Request - Missing Fields

Solutions:
  • Include all required fields
  • Verify field names match API specification

400 Bad Request - Invalid Format

Common Format Issues:
  • 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

Common Decline Codes:

Invalid Card Details

Solutions:
  • Verify card number passes Luhn check
  • Check expiry date format (MM/YY)
  • Validate CVV length (3-4 digits)

3D Secure Errors

Solutions:
  • Customer should retry with correct 3DS credentials
  • Ensure browser supports 3D Secure
  • Check if card is enrolled for 3DS

UPI Errors

Invalid UPI ID

Solutions:
  • Validate UPI ID format: username@bankcode
  • Check for valid bank codes (paytm, googlepay, etc.)

UPI Transaction Failed

Common UPI Error Codes:

Webhook Errors

Invalid Signature

Solutions:
  • Verify webhook secret is correct
  • Check HMAC SHA512 signature calculation
  • Ensure raw request body is used for signature

Webhook Timeout

Solutions:
  • Ensure webhook endpoint responds within 30 seconds
  • Return HTTP 200 status code
  • Process webhook asynchronously if needed

Rate Limiting

429 Too Many Requests

Solutions:
  • 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

  1. Check API Response
    • Verify 200 status code
    • Check paymentRequestId is returned
  2. Verify Webhook Setup
    • Confirm webhook URL is accessible
    • Test signature verification
    • Check webhook logs
  3. Monitor Payment Status
    • Poll status endpoint
    • Check for status updates
    • Review error messages

Webhook Not Received

  1. Verify Webhook URL
  2. Check Firewall/Security
    • Ensure webhook URL is publicly accessible
    • Check firewall rules
    • Verify SSL certificate
  3. Test Signature Verification

High Error Rate

  1. Analyze Error Patterns
    • Group errors by type
    • Identify common causes
    • Check error frequency
  2. Review Request Data
    • Validate input formats
    • Check required fields
    • Verify data quality
  3. 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@caibo.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:

Next Steps

FAQ

Frequently asked questions

Testing Guide

Test error scenarios

Webhooks

Advanced webhook handling

API Reference

Complete API documentation