Payment integration testing is one of the most underinvested areas of WooCommerce development. Developers test the happy path, a successful card payment, but miss the edge cases that cause real problems: partial captures, failed refunds, 3DS challenge flows, expired card handling, and webhook failures. Comprehensive payment testing before launch prevents revenue loss, customer frustration, and operational fire drills after go-live.
Sandbox Environment Testing
Every serious payment processor provides a sandbox (test) environment that mirrors production behavior without real transactions. Use the sandbox for all development and QA work. Key principles:
- Use the processor’s official test card numbers — don’t create your own. Test cards simulate specific scenarios: successful authorization, insufficient funds, card decline, 3DS required, and network errors.
- Test with a representative variety of cards: Visa, Mastercard, Amex (if you accept it). Each network has different behavior and interchange.
- Verify that sandbox webhooks fire correctly and your application handles them, not just that transactions appear to succeed in the UI.
The Test Scenarios That Matter
Happy Path Tests
- Successful card payment (domestic Visa, domestic Mastercard)
- Successful Apple Pay payment (on mobile)
- Successful Google Pay payment
- Successful 3DS authenticated payment
Decline and Error Scenarios
- Insufficient funds decline
- Do-not-honor decline
- Expired card decline
- Invalid card number
- CVV mismatch
- AVS (billing address) mismatch
- Network timeout / gateway error
Refund and Adjustment Scenarios
- Full refund on settled transaction
- Partial refund on settled transaction
- Refund on order with multiple items
Subscription / Recurring Scenarios
- Initial subscription charge
- Renewal charge on stored card
- Failed renewal (simulated decline)
- Dunning logic: retry on day 3, day 7
- Card expiry handling (network token auto-update)
Webhook and Integration Tests
- Payment authorized webhook received and order status updated
- Payment captured webhook received and order completed
- Refund initiated webhook received and order refund recorded
- Chargeback notification webhook received and support ticket triggered
- Webhook delivery retry on temporary failure
Pre-Launch Checklist
- All happy path scenarios pass in sandbox
- All decline scenarios surface appropriate error messages to customers
- Webhooks are received and processed correctly
- Order statuses update correctly on authorization, capture, refund, and dispute
- PCI scope reviewed — card data is not logged anywhere in your stack
- SSL certificate valid and enforced on checkout pages
- Mobile checkout tested on actual devices (iOS and Android)
- Transaction monitoring set up (someone will see if authorization rates drop)
Post-Launch Monitoring
Testing doesn’t end at launch. Set up alerts for: authorization rate drops below your established baseline; chargeback rate above 0.5%; webhook processing errors; and transaction volume anomalies (sudden spikes or drops) that could indicate fraud or technical failure.
ConvesioPay provides a sandbox environment with test cards that simulate all major scenarios, plus webhook testing tools and real-time monitoring in the production dashboard. Flat rate: 2.9% + $0.30, no monthly fees.
Ready to get started? Learn more about ConvesioPay or view pricing.