Skip to main content

Testing & Sandbox

Comprehensive testing guide for Caibo H2H integration with test data, scenarios, and sandbox configurations.

Sandbox Environment

  • Base URL: https://sandbox-api.caibo.com
  • Purpose: Safe testing environment with simulated responses
  • Features: Test payment methods, webhook testing, 3DS simulation

Environment Differences: Test vs Production

  • The only difference between environments is the number of enabled H2H payment methods.
  • Endpoints, request/response schemas, and error codes are identical in Test and Production.
  • Production method availability depends on your tenant’s configuration and compliance enablement.

Test Credit Cards

Successful Payments

Failed Payments

3D Secure Testing

Test UPI IDs

Successful UPI Payments

Failed UPI Payments

Google Pay Testing

Sandbox Setup

  1. Use Google Pay test environment
  2. Configure test merchant ID
  3. Use test card tokens

Test Payment Tokens

Apple Pay Testing

Sandbox Configuration

  1. Use Apple Pay sandbox certificates
  2. Configure test merchant identifier
  3. Test with iOS Simulator

Webhook Testing

Test Webhook Payloads

Successful Payment

Failed Payment

Webhook Signature Testing

Test Scenarios

End-to-End Payment Flow

  1. Create Payment Request
  2. Simulate Payment Completion
    • Use test card: 4111111111111111
    • Expected webhook: status: "completed"
  3. Verify Payment Status

Error Handling Tests

Invalid API Key

Missing Required Fields

Invalid Amount

Load Testing

Rate Limit Testing

Webhook Testing Tools

ngrok for Local Testing

Webhook Testing Server

Testing Checklist

Pre-Production Testing

  • API Authentication
    • Valid API key works
    • Invalid API key returns 401
    • Missing API key returns 401
  • Payment Creation
    • Successful payment with valid data
    • Failed payment with invalid card
    • Validation errors for missing fields
  • Webhook Handling
    • Webhook signature verification
    • Handle successful payment webhook
    • Handle failed payment webhook
    • Webhook retry mechanism
  • Payment Status
    • Status check with valid ID
    • Status check with invalid ID
    • Status updates in real-time
  • Error Handling
    • Network timeout handling
    • Rate limit handling
    • Invalid response handling

Performance Testing

  • Load Testing
    • Handle expected traffic volume
    • Graceful degradation under load
    • Rate limit compliance
  • Stress Testing
    • System behavior at limits
    • Recovery after overload
    • Error rate monitoring

Monitoring & Debugging

Logging Best Practices

Debug Mode

Next Steps

Error Handling

Handle errors and troubleshooting

Production Deployment

Deploy to production environment

Webhooks Guide

Advanced webhook configuration

API Reference

Complete API documentation