Checkout test cases for pending payments, declines, and duplicate submits
Run five checkout test cases covering pending payments that succeed or fail, an immediate decline followed by a customer retry, overlapping submissions, and a retry after a lost response. For each case, match the status shown to the shopper against the order record, successful payment count and amount, and fulfillment job count.
Set up a checkout you can reset
Use a staging checkout backed by a payment sandbox or simulator. Use a fresh cart for each row. Add two units of the invented item QA-MUG-01 at USD 12.00 each, with USD 0.00 tax, shipping, and discounts. Configure fixtures for a delayed success, a delayed failure, an immediate decline, and a successful payment. Give the tester read access to test orders, payment results, and fulfillment records. For the duplicate cases, use a sandbox harness that can pause an in-flight checkout or drop its response after commit.
Define what each checkout state should do
For this sample shop, Pending means the shopper can reopen the checkout and see that payment is still processing. CHK-01 and CHK-02 hold the simulated payment outcome itself. During that hold both the provider simulator and the app's records must show no successful payment, and the app must create no fulfillment job. If you instead hold webhook delivery after the provider completes payment, the app can still show Pending while awaiting notification. Verify the provider and app records separately in that scenario. Failed keeps the cart available for another attempt and creates no successful payment or fulfillment job. Paid requires one confirmed payment and one fulfillment job.
Copy these five cases into a CSV
Case ID,Title,Priority,Preconditions,Test steps,Expected result CHK-01,Pending payment succeeds,High,"Fresh cart QA-101. Hold the simulated payment outcome before settlement, then release a success.","1) Submit once. 2) Reload while payment is unresolved. 3) Release the successful outcome and reload after processing.","While unresolved show Pending. Verify zero provider successes, zero successful app payments and zero fulfillment jobs. After processing show Paid with one order, one USD 24.00 payment and one fulfillment job." CHK-02,Pending payment fails,High,"Fresh cart QA-102. Hold the simulated payment outcome before settlement, then release a failure.","1) Submit once. 2) Verify Pending while payment is unresolved. 3) Release the failure and reload after processing.","While Pending and after failure verify zero provider successes, zero successful app payments and zero fulfillment jobs. After failure show Failed and offer retry with the same cart total." CHK-03,Immediate decline then retry,High,Fresh cart QA-103. Configure a decline followed by a successful payment.,"1) Submit with the declining fixture. 2) Check the failure and server records. 3) Retry with the successful fixture. 4) Check final records.",After decline show a failure message and retain the cart with zero successful payments and zero fulfillment jobs. After retry show Paid with one order and one USD 24.00 payment and one fulfillment job. CHK-04,Overlapping submits,High,Fresh cart QA-104. Use a successful payment fixture and a harness that can pause the first submit.,"1) Pause the first request after receipt. 2) Send a second submit for the same checkout while the first is in flight. 3) Confirm the server received the second before releasing the first. Let both finish. 4) Reopen checkout and inspect records.","The checkout resolves to one order ID and shows Paid. Verify one successful provider charge of USD 24.00 for the checkout, one successful app payment and one fulfillment job." CHK-05,Retry after a lost response,High,Fresh cart QA-105. Use a harness that can drop a response after the server commits a successful checkout.,"1) Submit once and drop the response after commit. 2) Record the committed order ID. 3) Retry with the original checkout operation identifier. 4) Compare the returned order ID to the recorded ID and inspect records.","The retry resolves to the original order ID and shows Paid. Verify one order, one successful provider charge of USD 24.00 across both attempts, one successful app payment and one fulfillment job."
Preview the import and run the overlap case first
Save the CSV as a UTF-8 file with comma delimiters and double-quote field quoting. In Skaybase Test Management, map Title, Priority, Preconditions, Test steps and Expected result in the import preview. Leave Case ID unmapped and use it to cross-reference the source sheet. Check all five rows before importing. Keep line breaks inside the quoted Test steps cells to import the numbered instructions as separate steps. Run CHK-04 first. Confirm both requests reached the server for the same checkout while the first was still in flight. Then compare distinct order IDs, successful payment IDs, and fulfillment job IDs. For CHK-05, keep the same operation identifier across the retry. Stripe's API documents idempotency keys for retrying a provider request. Check the app's order and fulfillment records independently, since those are separate writes. https://www.rfc-editor.org/rfc/rfc4180#section-2 https://docs.stripe.com/api/idempotent_requests
Worked example
What should CHK-04 report when two overlapping submissions target the same USD 24.00 checkout?
- Use cart QA-104 with two units of QA-MUG-01 at 1,200 US cents each. With zero tax, shipping, and discounts, 2 × 1,200 = 2,400 US cents, or USD 24.00.
- Hold the first submit after the server receives it. Send a second submit for the same checkout and confirm the server received it before releasing the first.
- Let both requests finish. Reopen checkout and look up the orders, successful payments, and fulfillment jobs linked to that checkout.
The expected result is Paid with one distinct order ID, one successful payment of exactly 2,400 US cents, and one fulfillment job. Two successful payments of that amount would total 4,800 US cents, or USD 48.00, and fail the case even if checkout shows a single confirmation.