claude-code - 💡(How to fix) Fix [BUG] Max 5x → Max 20x upgrade stuck in void_invoice loop — server returns same canceled PaymentIntent on every retry [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54204Fetched 2026-04-29 06:33:31
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×2unlabeled ×1

Error Message

Cannot upgrade my subscription from Max 5x to Max 20x on claude.ai. Every payment attempt fails with the same Stripe error referencing a canceled PaymentIntent. Stripe error response: "error": {

Error Messages/Logs

Error code: payment_intent_unexpected_state

Root Cause

{ "error": { "code": "payment_intent_unexpected_state", "message": "This PaymentIntent's mandate_data could not be updated because it has a status of canceled.", "payment_intent": { "id": "pi_3TQlueBjIQrRQnux1gqWfkg6", "status": "canceled", "cancellation_reason": "void_invoice", "last_payment_error": null, "payment_method": null, "amount": 16566, "currency": "eur", "description": "Subscription update" }, "type": "invalid_request_error" } }

Fix Action

Fix / Workaround

  1. Account has active Max 5x subscription (purchased via web ~1 month ago, working normally)
  2. Go to claude.ai Settings → Plan
  3. Click upgrade to Max 20x
  4. Submit payment with any card
  5. Observe: PUT /upgrade_to_max returns 200, then Stripe confirm returns 400 with payment_intent_unexpected_state
  6. Retry: same canceled pi_xxx returned every time
  • OS: macOS Sequoia + iOS 17
  • Browser: Chrome, Safari, Firefox, Brave (all tested)
  • Claude Code version: latest
  • Plan: Max 5x (active, attempting upgrade to Max 20x)
  • Region: France (billing) / Bali (residence)
  • Currency: EUR
  • Date: April 28, 2026

Code Example

HTTP 400 Bad Request from api.stripe.com/v1/payment_intents/pi_3TQlueBjIQrRQnux1gqWfkg6/confirm

Error code: payment_intent_unexpected_state
Type: invalid_request_error
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Cannot upgrade my subscription from Max 5x to Max 20x on claude.ai. Every payment attempt fails with the same Stripe error referencing a canceled PaymentIntent.

Each upgrade attempt:

  • PUT /api/organizations/[id]/upgrade_to_max returns 200 OK
  • POST api.stripe.com/v1/payment_intents/pi_xxx/confirm returns 400 Bad Request

The server keeps returning the same canceled PaymentIntent ID (pi_3TQlueBjIQrRQnux1gqWfkg6) on every retry, instead of generating a fresh one. Each retry creates a new Stripe request log (different req_xxx), but Anthropic always confirms the same dead pi_xxx.

The card is never charged (last_payment_error: null, payment_method: null). The PaymentIntent is voided server-side ~140 seconds after creation with cancellation_reason: void_invoice. This is a state corruption on the Anthropic backend, not a card or client issue.

Stripe error response:

{ "error": { "code": "payment_intent_unexpected_state", "message": "This PaymentIntent's mandate_data could not be updated because it has a status of canceled.", "payment_intent": { "id": "pi_3TQlueBjIQrRQnux1gqWfkg6", "status": "canceled", "cancellation_reason": "void_invoice", "last_payment_error": null, "payment_method": null, "amount": 16566, "currency": "eur", "description": "Subscription update" }, "type": "invalid_request_error" } }

Stripe diagnostic IDs:

  • PaymentIntent: pi_3TQlueBjIQrRQnux1gqWfkg6
  • Stripe account: acct_1MExQ9BjIQrRQnux
  • Latest request log: req_sm0K3k4ukXjU7I
  • Account email: [email protected]

Likely related to: #45890, #43338, #46703, #41499, #32918 (same family of Anthropic/Stripe state desync bugs).

What Should Happen?

After a PaymentIntent is voided, the server should generate a fresh PaymentIntent on the next upgrade attempt.

Instead, the canceled PaymentIntent ID is persisted indefinitely on the Anthropic backend, leaving the account in a state where no upgrade or new subscription attempt can succeed without manual intervention.

Requesting a human reset of the subscription state for this account.

Error Messages/Logs

HTTP 400 Bad Request from api.stripe.com/v1/payment_intents/pi_3TQlueBjIQrRQnux1gqWfkg6/confirm

Error code: payment_intent_unexpected_state
Type: invalid_request_error

Steps to Reproduce

  1. Account has active Max 5x subscription (purchased via web ~1 month ago, working normally)
  2. Go to claude.ai Settings → Plan
  3. Click upgrade to Max 20x
  4. Submit payment with any card
  5. Observe: PUT /upgrade_to_max returns 200, then Stripe confirm returns 400 with payment_intent_unexpected_state
  6. Retry: same canceled pi_xxx returned every time

Already ruled out client-side causes:

  • 4 browsers (Chrome, Safari, Firefox, Brave), private mode
  • Full cache + cookies + storage wipe (claude.ai, js.stripe.com, api.stripe.com)
  • 2 devices (Mac, iPhone)
  • 3 different cards (Revolut, Qonto)
  • VPN off
  • Logged out and back in
  • iOS app blocks subscription management ("purchased on another platform")
  • Cancelled Max 5x and retried — same dead PaymentIntent still returned

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

last

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • OS: macOS Sequoia + iOS 17
  • Browser: Chrome, Safari, Firefox, Brave (all tested)
  • Claude Code version: latest
  • Plan: Max 5x (active, attempting upgrade to Max 20x)
  • Region: France (billing) / Bali (residence)
  • Currency: EUR
  • Date: April 28, 2026

extent analysis

TL;DR

The Anthropic backend likely needs to be updated to generate a fresh PaymentIntent after a previous one is voided, instead of reusing the canceled ID.

Guidance

  • Verify that the issue is indeed caused by the Anthropic backend reusing a canceled PaymentIntent ID by checking the Stripe request logs for repeated use of the same pi_xxx ID.
  • Check the Anthropic API documentation for any existing endpoints or parameters that can be used to reset or update the PaymentIntent ID.
  • Consider implementing a retry mechanism with a delay to allow the Anthropic backend to update the PaymentIntent ID before attempting to confirm the payment again.
  • Review the related issues (#45890, #43338, #46703, #41499, #32918) to see if any of them provide insight into the cause of the problem or potential solutions.

Example

No code example is provided as the issue seems to be related to the Anthropic backend and Stripe integration, and without more information about the specific API endpoints and parameters used, it's difficult to provide a concrete example.

Notes

The issue seems to be specific to the Anthropic backend and its integration with Stripe, and may require changes to the backend code or configuration to resolve. The fact that the issue is reproducible across different browsers, devices, and cards suggests that the problem is indeed on the server-side.

Recommendation

Apply a workaround by requesting a human reset of the subscription state for the affected account, as the issue is likely caused by a state corruption on the Anthropic backend. This will allow the account to be upgraded to Max 20x while the underlying issue is being investigated and resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Max 5x → Max 20x upgrade stuck in void_invoice loop — server returns same canceled PaymentIntent on every retry [1 participants]