How would you test an online payment flow when the payment provider is external?
Answer
Cover amount and currency, redirects or tokenization, authentication, success, decline, cancellation, timeout, duplicate submission, webhook ordering, retries, reconciliation and privacy. Use provider test modes and verify local state against provider outcomes.
Strong answer includes
- asynchronous provider outcomes
- idempotency and reconciliation
- sensitive-data boundaries
Practical example
While testing a payment flow, a QA engineer double-clicked the pay button on a slow connection and found the order was charged twice because the endpoint lacked an idempotency key; the fix required deduplicating on a client-generated request ID before the transaction was submitted to the provider.