---
title: "Verify checkout revalidates a price changed after cart creation"
description: "Change a test product price between cart creation and final submission, then verify the application follows its disclosed price-lock or reconfirmation policy."
canonical_url: "https://vostride.com/agent-library/checkout-payments/price-change-before-payment.md"
md_url: "https://vostride.com/agent-library/checkout-payments/price-change-before-payment.md"
content_kind: "recipe"
topic: "checkout-payments"
---

# Verify checkout revalidates a price changed after cart creation

Change a test product price between cart creation and final submission, then verify the application follows its disclosed price-lock or reconfirmation policy.

## Risk

Prices can change while a shopper holds a cart. The application must either honor an explicit price lock or disclose the revised amount before charging; silently charging a different total violates the checkout contract this test records.

## Fixtures

- A test product with an initial price and a distinct replacement price under sandbox control.
- A test cart created before the change and the documented price-lock or revalidation rule.
- Product-price, order-line, and payment hooks plus independent expected totals for both possible contract states.

## Steps

1. Add the product at its initial price and verify the cart line and total match the initial fixture calculation.
2. Change the product price through the supported fixture hook while keeping the checkout open.
3. Proceed to final review or submit according to the product revalidation point and verify the declared price-lock behavior or an explicit revised-price notice.
4. If reconfirmation is required, verify payment cannot complete until the changed amount has been shown and deliberately accepted.
5. Complete the sandbox payment and inspect order and payment records to verify the charged unit price and total match the amount authorized under the documented policy.

## Expected results

- The application applies its stated price-lock or price-refresh contract consistently.
- A changed payable amount is disclosed before authorization when required.
- Stored order lines and captured payment agree with the accepted checkout total.

## False-pass traps

- Always expecting the latest price is incorrect when the product offers a valid cart price lock.
- A updated product page does not prove an already-open checkout revalidated its own amount.

## Cleanup

- Restore the product initial price and cancel or refund the sandbox order.

## 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)
