Testing & Sandbox
Comprehensive testing guide for Cyrexa H2H integration with test data, scenarios, and sandbox configurations.Sandbox Environment
- Base URL:
https://gateway.cyrexa.comp/ipg/2.0/
- 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
Card Number | Brand | CVV | Expiry | Expected Result |
---|---|---|---|---|
4111111111111111 | Visa | 123 | 12/25 | Success |
5555555555554444 | Mastercard | 123 | 12/25 | Success |
378282246310005 | Amex | 1234 | 12/25 | Success |
6011111111111117 | Discover | 123 | 12/25 | Success |
Failed Payments
Card Number | Brand | Expected Result |
---|---|---|
4000000000000002 | Visa | Declined |
4000000000000119 | Visa | Processing Error |
4000000000000127 | Visa | Incorrect CVC |
4000000000000069 | Visa | Expired Card |
3D Secure Testing
Card Number | 3DS Outcome |
---|---|
4000000000003220 | 3DS Authentication Required |
4000000000003238 | 3DS Authentication Failed |
4000000000003246 | 3DS Authentication Unavailable |
Test UPI IDs
Successful UPI Payments
UPI ID | Expected Result |
---|---|
success@paytm | Payment Success |
test@googlepay | Payment Success |
demo@phonepe | Payment Success |
Failed UPI Payments
UPI ID | Expected Result |
---|---|
failure@paytm | Payment Failed |
insufficient@paytm | Insufficient Funds |
timeout@paytm | Transaction Timeout |
invalid@paytm | Invalid UPI ID |
Google Pay Testing
Sandbox Setup
- Use Google Pay test environment
- Configure test merchant ID
- Use test card tokens
Test Payment Tokens
Apple Pay Testing
Sandbox Configuration
- Use Apple Pay sandbox certificates
- Configure test merchant identifier
- Test with iOS Simulator
Webhook Testing
Test Webhook Payloads
Successful Payment
Failed Payment
Webhook Signature Testing
Test Scenarios
End-to-End Payment Flow
-
Create Payment Request
-
Simulate Payment Completion
- Use test card:
4111111111111111
- Expected webhook:
status: "completed"
- Use test card:
-
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