Testing
Complete guide to testing integration. Test data, scenarios, and validation checklist.
Thoroughly test your Localpayment integration before going live. This comprehensive guide provides test data, scenarios, and validation procedures to ensure your implementation works correctly across all payment methods and edge cases.
Prerequisites
Before you begin testing, ensure you have the following configured:
Sandbox Environment
The Stage environment is a complete replica of our production system, designed specifically for testing:
Simulates actual payment flows and timing.
All transactions use test data.
All payment methods and operations are available.
Your Stage data is kept separate from production.
Test Data
Card Payments
Test credit and debit card payments with various scenarios:
| Card Number | Scenario | Expected Result | Test Purpose |
|---|---|---|---|
| 4242424242424242 | ✅ Successful Payment | Immediate approval | Basic payment flow |
| 4000000000000002 | ❌ Card Declined | Decline with reason | Decline handling |
| 4000002500003155 | 🔐 3D Secure Required | Authentication redirect | 3D Secure flow |
| 4000000000009995 | ⚠️ Processing Error | Temporary failure | Balance checks |
Standard Card Details:
- Expiry Date: Any future date (e.g., 12/2029)
- CVC: Any 3-digit number (e.g., 123) for Mastercard and Visa cards or any 4-digit number (e.g., 1234) for American Express cards.
- Cardholder Name: Any test name (e.g., "John Doe")
Error Scenario Testing
Validation Errors
- Omit required fields (paymentMethod, amount)
- Use invalid formats (wrong currency, invalid document numbers)
- Test parameter constraints (amount limits, country restrictions)
Authentication Tests
- Use expired access tokens
- Test with invalid credentials
- Verify IP whitelisting restrictions
Webhook Testing
Ensure your webhook endpoint correctly handles notifications:
Endpoint Configuration
- Verify HTTPS requirement
- Test signature verification
- Confirm immediate 200 OK response
Event Processing
- Test all event types (payins, payouts, virtual accounts)
- Verify idempotency handling
- Confirm async processing
Error Handling
- Test timeout scenarios
- Verify retry logic
- Monitor delivery failures
Validation Checklist
Before moving to production, verify:
- Payment Flows: Confirm that all payment methods behave correctly, including both success and error scenarios.
- Webhook Handling: Ensure all webhook events are received, verified, and processed as expected.
- Error Handling: Display clear error messages to users and implement proper retry logic where needed.
- Security: Enforce HTTPS, verify signatures, and ensure all sensitive data is handled securely.
- User Experience: Provide clear loading states, helpful messaging, and smooth redirect flows throughout the payment journey.
Testing Tools
Download our complete Postman collection with pre-configured test scenarios:
Updated 2 days ago
