Fixed Stripe chokes if you line up too many subscriptions without actually subscribing

Affected version


Well-known member
Not sure if this is really a bug, but I've been designing, restyling and testing a user upgrade / membership section a lot today and after too many click's on the 'Purchase' button, where I proceed to cancel, rather than actually purchase, I'm getting errors and can't even purchase if I wanted to.

This error appears when clicking the 'Purchase' button, before the stripe CC fields appear.



Error occurred while creating Stripe subscription: Customer cus_***** already has the maximum 25 current and scheduled subscriptions.

This could confuse an incredibly tentative buyer who attempts to check out 25 times without actually buying

Not sure if this something that should be handled as I'm not sure how to clear the error to perform further testing on this account and if there's any kind of cooling off / reset period for this error for failed / abandoned subscriptions.
Last edited:


Well-known member
It looks like these are supposed to expire after 24 hours if the payment isn't received, and the status change from incomplete to incomplete_expired


According to this the one on the bottom from 29th Jan still hasn't changed to incomplete_expired, and that was 3 days ago, so 🤷‍♂️


In the meantime it doesn't look like these can be deleted, and if the user tries to keep purchasing, it will continue to add entries to this list even with the error.

Updates to incomplete and incomplete_expired subscriptions
  • incomplete subscriptions can only have their metadata and default_payment_method be updated. This is so that we can ensure the generated invoice stays in sync. If you need to make substantial modifications to a subscription in this status, consider creating a new one and letting the incomplete subscription expire.
  • incomplete_expired subscriptions cannot be updated. This is a terminal state for a subscription.

It's probably worth noting that this is all test data. If I turn live mode on I can get the card details screen to pay, and there's only currently 1 incomplete subscription for that user with live data. I'm guessing the error will appear again if I abandon 24 more subscriptions...I won't test that right now though!

I'll give it some more time and see if any of these test or live incomplete subscriptions start to expire.


Well-known member
So I spoke to Stripe about this, found out the easiest way to get it working in test mode is to just delete all your test data by going to the developers page and using the 'Delete all test data...' button at the bottom.

This deletes all the incomplete payments.

Still not sure why they're not changing status from incomplete to incomplete_expired though. The support person thought it might be to do with the invoice settings

And suggested changing the default payment terms from 30 days.

I changed it to 1 day, started some more abandoned incomplete payments and they still haven't changed status, so I'm not sure if there's still a problem on their end.

TBH it's probably not an issue when running live, I doubt someone will initiate 25 payments and fail to checkout. But if you're just testing and encounter this issue, delete your test data.

Liam W

in memoriam 1998-2020
Out of curiosity, when you clicked the purchase button, did you actually enter payment details? The flowchart you've attached seems to imply that subscriptions will only transition to the incomplete_expired state if the payment fails.

I'm not really a fan of the XF Stripe implementation (nor the payment profiles system, which I don't believe was really designed for systems like Stripe's payment intents), one of the main reasons being that it doesn't actually cancel PaymentIntent's for purchases that are abandoned.


Well-known member
Ah, no, just loaded up the modal, then clicked away from it to get ride of it.


I don't know much about how it's implemented in the back end, but FWIW I love the implementation in that you just need to put the card details, postcode and hit pay, or use apple pay. No having to type your your full name, address etc.

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.1.10).

Change log:
Avoid an error if a user has 25 incomplete subscription purchases with Stripe
There may be a delay before changes are rolled out to the XenForo Community.