Skip to content

fix(payments-next): UpdateStripeProcessingCartError: Stripe checkout cart state not changed to processing: Cart version mismatch#20640

Open
elizabeth-ilina wants to merge 1 commit into
mainfrom
PAY-3654-update-stripe-processing-cart-error
Open

fix(payments-next): UpdateStripeProcessingCartError: Stripe checkout cart state not changed to processing: Cart version mismatch#20640
elizabeth-ilina wants to merge 1 commit into
mainfrom
PAY-3654-update-stripe-processing-cart-error

Conversation

@elizabeth-ilina
Copy link
Copy Markdown
Contributor

@elizabeth-ilina elizabeth-ilina commented May 22, 2026

Because

  • When a customer updates their tax location on checkout, sees that tax location has been updated successfully message, but CheckoutForm may still be re-rendering with the older cart version. If the customer clicks Subscribe before the new cart version finishes re-rendering, a cart version mismatch occurs and an UpdateStripeProcessingCartError is thrown.

This pull request

  • Adds a shared client state between SelectTaxLocation and CheckoutForm, tracking whether a cart-mutating action is in progress.
  • Disables the Subscribe button and defers the "Your location has been updated" banner until the client's cart version advances.

Issue that this pull request solves

Closes: #PAY-3654

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

STRs:

  1. Make an account, be on checkout
  2. Fill in card details, don't click on subscribe yet
  3. Update postal code, click Save, and very quickly press subscribe after you see "Your location has been updated"

Before:

Screen.Recording.2026-05-22.at.11.39.27.AM.mov

Admin Panel, very similar carts to affected prod customers:
image

image

After:

Screen.Recording.2026-05-22.at.11.45.37.AM.mov
  • Key files/areas to focus on:
  • Suggested review order:
  • Risky or complex parts:

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@elizabeth-ilina elizabeth-ilina marked this pull request as ready for review May 22, 2026 19:46
@elizabeth-ilina elizabeth-ilina requested a review from a team as a code owner May 22, 2026 19:46
…cart state not changed to processing: Cart version mismatch

Because:
* When a customer updates their tax location on checkout, sees that tax location has been updated successfully message, but CheckoutForm may still be re-rendering with the older cart version. If the customer clicks Subscribe before the new cart version finishes re-rendering, a cart version mismatch occurs and an UpdateStripeProcessingCartError is thrown.

This commit:
* Adds a shared client state between SelectTaxLocation and  CheckoutForm, tracking whether a cart-mutating action is in progress.
* Disables the Subscribe button and defers the "Your location has been updated" banner until the client's cart version advances.

Closes: #[PAY-3654](https://mozilla-hub.atlassian.net/browse/PAY-3654)
@elizabeth-ilina elizabeth-ilina force-pushed the PAY-3654-update-stripe-processing-cart-error branch from 9bd281a to 235df97 Compare May 22, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant