Mock responses
KwikPaisa Neo Bank Sandbox environment provides mock responses to help merchants simulate different transaction scenarios during integration and testing. Mock responses allow developers to:- Test successful transactions
- Simulate failed payments
- Validate payout failures
- Test webhook handling
- Verify retry mechanisms
- Build reconciliation workflows safely
Why Mock Responses are Important
During development, merchants need to test:- Success scenarios
- Failure handling
- Timeout workflows
- Retry mechanisms
- Webhook processing
- Edge cases
Supported Mock Scenarios
Payment Gateway
Payout APIs
Example Payment Gateway Response
- Success
- Failed
- Processing
Example Payout Response
- Success
- Failed
- Insufficient Funds
- Transaction Not Found
Webhook Mock Testing
Sandbox webhooks can also simulate:- Payment success events
- Payment failures
- Payout success notifications
- Payout failures
- Duplicate webhook events
- Signature verification
- Retry handling
- Idempotent processing
- Webhook logging
Recommended Testing Checklist
Before production deployment, verify:- Payment success handling
- Payment failure handling
- Processing state retries
- Payout success flow
- Payout failure flow
- Insufficient balance handling
- Webhook verification
- Retry workflows
- Duplicate transaction protection
Important Notes
- Mock responses are for testing only
- Sandbox responses do not represent real settlements
- UTR numbers in Sandbox are simulated
- Banking confirmations are mocked in test mode
Best Practices
- Test both success and failure scenarios
- Validate retry handling properly
- Verify webhook security
- Handle all API status codes safely
- Maintain test transaction logs
Security Recommendations
- Never expose Sandbox credentials publicly
- Validate webhook signatures even in test mode
- Use separate environments for testing and production
- Avoid mixing Sandbox and production credentials
