Testing Guide
Comprehensive guide to testing your Uprails integration before going live.
Testing Overview
Uprails provides a complete test environment that mirrors production. Use sandbox API keys (prefixed with snd_) to simulate all payment scenarios without processing real transactions.
Test Mode
Test Card Numbers
Use these test card numbers to simulate different payment scenarios:
Success Cards
| Card Number | Brand | Behavior |
|---|---|---|
| 4242424242424242 | Visa | Always succeeds |
| 5555555555554444 | Mastercard | Always succeeds |
| 378282246310005 | American Express | Always succeeds |
| 6011111111111117 | Discover | Always succeeds |
3D Secure Test Cards
| Card Number | Behavior |
|---|---|
| 4000002500003155 | Requires 3DS authentication, then succeeds |
| 4000008260003178 | Requires 3DS authentication, then fails |
| 4000002760003184 | 3DS authentication fails immediately |
Failure Cards
| Card Number | Error |
|---|---|
| 4000000000000002 | Card declined |
| 4000000000009995 | Insufficient funds |
| 4000000000009987 | Lost card |
| 4000000000009979 | Stolen card |
| 4000000000000069 | Expired card |
| 4000000000000127 | Incorrect CVC |
| 4000000000000119 | Processing error |
For all test cards, use any valid future expiration date and any 3-digit CVC (4-digit for Amex).
Pre-Launch Checklist
Before going live, ensure you've tested these scenarios:
Payments
- Successful card payment
- Declined card payment
- 3D Secure authentication flow
- Manual capture (authorize then capture)
- Payment cancellation
- Idempotency key handling
Refunds
- Full refund
- Partial refund
- Multiple partial refunds
- Refund failure handling
Customers & Payment Methods
- Create customer
- Save payment method to customer
- Pay with saved payment method
- Update payment method
- Delete payment method
Error Handling
- Invalid API key response
- Validation error response
- Rate limit handling
- Network timeout handling
Going Live
When you're ready to go live:
- Switch to production API keys - Replace
snd_withprd_keys in your production environment - Update webhook endpoints - Point webhooks to your production URLs
- Verify processor settings - Ensure your payment processor is ready for production
- Test with real cards - Make a small real transaction to verify everything works
- Monitor your dashboard - Watch for any errors or unexpected behavior
Live Mode
Debugging Tips
Check the Dashboard
All API requests and webhook events are logged in your dashboard. Use it to inspect request/response details and event payloads.
Use Idempotency Keys
Always include idempotency keys for POST requests. This prevents duplicate payments if a request is retried due to network issues.
Log Everything
Log all API responses and webhook events. This helps diagnose issues and provides an audit trail for transactions.