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: All requests made with test API keys are processed in sandbox mode. No real money is moved, and you can test freely without affecting real accounts.
Test Cards
Test card numbers for simulating different payment scenarios (success, failure, 3D Secure, etc.) are available directly in your Merchant Dashboard.
Navigate to Developer → Test Cards in your Merchant Dashboard to view all available test card numbers, including success cards, failure cards, and 3D Secure test cards.
Why the Dashboard? Test card details are managed in the dashboard to ensure you always have the most up-to-date card numbers for your specific payment processor configuration.
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
- 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: In live mode, real money is processed. Start with small amounts to verify your integration before processing larger transactions.
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.
Next Steps
- Error Handling — Handle errors gracefully
- Payments — Learn about payment flows
- API Basics — Learn about idempotency and rate limits
- Authentication — Secure your API keys