---
title: "Verify cancelling a payment challenge leaves the order unpaid"
description: "Use a sandbox payment method that requires an additional challenge, cancel it, and verify checkout offers a safe retry with no paid order or captured funds."
canonical_url: "https://vostride.com/agent-library/checkout-payments/payment-challenge-cancellation.md"
md_url: "https://vostride.com/agent-library/checkout-payments/payment-challenge-cancellation.md"
content_kind: "recipe"
topic: "checkout-payments"
---

# Verify cancelling a payment challenge leaves the order unpaid

Use a sandbox payment method that requires an additional challenge, cancel it, and verify checkout offers a safe retry with no paid order or captured funds.

## Risk

A challenge step introduces an external cancellation branch after the customer submits payment. The application must reconcile that outcome instead of assuming submission means payment success or keeping the order in an endless loading state.

## Fixtures

- A sandbox product and test customer with a known checkout total.
- A provider-supported challenge-required payment fixture with a documented cancel option.
- Hooks for payment authorization, capture status, and order state plus a bounded challenge-return expectation.

## Steps

1. Complete checkout details and submit with the challenge-required sandbox method; verify the challenge is for the expected merchant and amount.
2. Cancel through the sandbox challenge control and verify the browser returns to a stable application checkout state.
3. Verify the interface explains the incomplete payment and provides a usable retry or alternate-method control.
4. Inspect payment and order hooks and verify no captured payment or paid order exists for this attempt.
5. Retry with a successful fixture method, verify the order confirmation, and reconcile exactly one captured payment against the resulting order.

## Expected results

- Challenge cancellation cannot produce a paid order.
- The application resolves the cancellation into an actionable checkout state.
- A deliberate successful retry completes one purchase without capturing the cancelled attempt.

## False-pass traps

- An authorization object can exist without captured funds, so payment states must be read precisely.
- A provider challenge page disappearing is not evidence that the application processed its cancellation result.

## Cleanup

- Cancel or refund the completed sandbox order and remove outstanding challenge fixture state.

## Use with agent-qa

Adapt this test design to your application's acceptance criteria and configured target using the [recipe execution guide](/agent-library/software-factory/turn-a-recipe-into-an-agent-qa-test.md). External fixture setup and non-UI checks require your own supported hooks or test tooling. Validate the authored test, execute it, and inspect the completed evidence; this recipe is not a recorded test result.

## References

- [agent-qa test](/docs/agent-qa/configuration/test.md)
- [agent-qa hooks](/docs/agent-qa/guides/hooks.md)
- [agent-qa auth state](/docs/agent-qa/guides/auth-state.md)

- [Checkout and payment QA recipes](/agent-library/checkout-payments.md)
- [Software factory QA library](/agent-library.md)
