Simple Membership Plugin › Forums › Simple Membership Plugin › Stripe payment renewing without payment Customer gets a free month after failed
- This topic has 16 replies, 4 voices, and was last updated 8 months, 2 weeks ago by
filipvisnjic.
-
AuthorPosts
-
February 21, 2024 at 12:09 am #27737
Ron
ParticipantStripe creates an invoice and renews the subscription without payment (Why?). Failed payment is retried and fails 5 times. The subscription is deleted within stripe. Webhook is sent (customer.subscription.deleted – Response HTTP status code 200 (OK)). The subscription is still active with an expiry date from the invoice with the failed payment. The customer ends up getting 1 month free after a failed payment unless I manually set it to expired. What am I missing here?
February 21, 2024 at 1:39 am #27740The Assurer
ModeratorAccording to ChatGPT, the number of failed payment retries is adjustable, from within your Stripe account.
February 21, 2024 at 2:59 am #27741Ron
ParticipantThanks for the quick reply but the setting doesn’t really matter. The membership remains active even after all of the payments have failed and the (customer.subscription.deleted) webhook is sent. It should only renew after a successful payment, not after the invoice is created.
February 22, 2024 at 12:54 am #27743The Assurer
ModeratorHow do you have that membership setup? And do you have SWPM debug logs showing the renewal taking place?
February 22, 2024 at 2:16 pm #27746Ron
ParticipantSorry debugging was not turned on. I have the Stripe event log when the invoice was created and the membership was renewed. Here is the part where it sets “status”: “active”,. Let me know if you need all of the log.
If you need the SWPM log I will have to turn it on and wait for another payment to fail.customer.subscription.updated
“quantity”: 1,
“schedule”: null,
“start_date”: 1705028216,
“status”: “active”,
“test_clock”: null,
“transfer_data”: null,
“trial_end”: null,
“trial_settings”: {
“end_behavior”: {
“missing_payment_method”: “create_invoice”I am having another issue where after login in any page that was visited when logged out needs to be refreshed to show the logged in version. I am using W3 Total Cache and have tried all of the suggested settings. I can make a new post about this if needed.
Other than that everything works great.
Thanks!
February 23, 2024 at 1:45 am #27749The Assurer
ModeratorPlease turn on the SWPM debug log. We need to know what happens on the SWPM side, when a renewal is processed.
March 8, 2024 at 5:31 pm #27776Ron
ParticipantHere is the log from the latest failed sritripe payment.
Thanks.[2024/03/07 10:51:29] – SUCCESS: Stripe subscription webhook received: customer.subscription.updated. Checking if we need to handle this webhook.
[2024/03/07 10:51:29] – SUCCESS: Stripe customer.subscription.updated webhook status: past_due
[2024/03/07 10:51:29] – SUCCESS: Stripe customer.subscription.updated webhook status is not “active” or “trialing”. Ignoring this webhook.March 9, 2024 at 2:47 am #27781The Assurer
ModeratorWell, it says the payment was successful. Is this a payment that eventually fails on the Stripe end?
March 9, 2024 at 4:03 pm #27782Ron
ParticipantThat’s the problem, the payment was not successful but the membership still renewed. The status in the webhook is past_due. Even after stripe fails to collect the payment the membership is not canceled.
March 10, 2024 at 10:01 pm #27785The Assurer
ModeratorI will refer this to the developer.
March 11, 2024 at 12:57 am #27786admin
KeymasterI will try to explain how it works below. I have tested this myself with our latest version of the plugin:
Our plugin listens to the
customer.subscription.deletedwebhook, it will adjust the account status according to the membership level configuration (the various conditions are outlined in our following documentation):
https://simple-membership-plugin.com/what-happens-when-paypal-subscription-cancelled/Upon receiving a customer.subscription.updated webhook, the plugin checks the status within the webhook. If the status is not “active” (for example, “past_due”), the plugin will disregard the update, meaning it will not change the account status to active unless the webhook explicitly indicates an active status.
After a subscription has been marked as deleted, you typically would not receive a customer.subscription.updated event for that specific subscription because it’s considered to be in a terminal state from which it cannot transition back to an active or updated state. The customer.subscription.deleted event is effectively a final state change for that subscription object. So are you saying that for your Stripe account you are receiving a
customer.subscription.updatedwebhook for a subscription that has been deleted (it already sent thecustomer.subscription.deletedwebhook already)? This means that your Stripe account might be behaving differently than what we consider to be standard operation or there is some other external conflict that we don’t understand.Do you by any chance have multiple user accounts that were created using a manual process (example: database importing) whereby it has the same email address or subscriber ID and that is causing things to behave abnormally.
It will be good to do the following basic test to establish a base line:
1) Reset the debug log file so there is a clean capture for the test.
2) Create a completely NEW user account using the plugin’s registration form (or admin dashboard).
3) Then go through subscription payment process for this user. Check that everything works.
4) Then cancel the subscription (it will send the subscription deleted webhook).
5) Check that the plugin processed this webhook and the account status is set according to the membership level as outlined below:
https://simple-membership-plugin.com/what-happens-when-paypal-subscription-cancelled/You can share the log of the above mentioned test if there is something unexpected there.
March 11, 2024 at 1:41 pm #27790Ron
ParticipantThanks for the response. The problem has nothing to do with the customer deleting or canceling the membership.
Let me clarify.
The customer signs up for a monthly subscription with a 7 day free trial
After the 7 day trial has ended Stripe created an invoice and try’s to process the payment. When the invoice is created in Stripe, the plugin renews the membership for 30 days.
If the payment fails the invoice is marked past_due but the subscription remains active.
Stripe will try to collect the payment 3 more times over the following week.
If all attempts to collect the payment fail Stripe will mark it as uncollected but the membership stays active for the full 30 day cycle.Is it possible to set the subscription to expired when the webhook “SUCCESS: Stripe customer.subscription.updated webhook status: past_due” is sent or not renew the subscription until the payment is successful in Stripe?
March 11, 2024 at 10:51 pm #27797admin
KeymasterWhat is the duration setting for the membership level? Is it set to 30 days?
Our system employs a straightforward Stripe subscription model, which offers certain benefits but also comes with limitations. Our plugin operates on a cautious principle, maintaining user access until a “subscription has failed completely” webhook is received from Stripe.
Given these constraints, achieving the specific functionality you described for the trial subscription may not be feasible. It might be advisable to consider another plugin that can accommodate your requirements.
August 14, 2025 at 9:26 am #30863filipvisnjic
ParticipantHi Admin, this problem still seems to persist and to be honest I am not sure why it hasn’t been addressed yet. Here is what is happening to me also, luckily I dont have that many members using Stripe (mostly PayPal) so I tend to resolve it manually.
1. User signs up using Stripe
2. Account is created for one year (annual membership)
3. Expire After is set to 367 days (adde 2 extra days)
4. Card fails on 365th day
5. Stripe send customer.subscription.updated
6. Customer subscription is extended for another year (PROBLEM).
7. Stripe attemps a card re-try – failed
8. Stripe send customer.subscription.updated (nothing happens becuse the account is already extended)
9. Stripe attemps a card re-try – failed
10. Stripe send customer.subscription.updated (nothing happens becuse the account is already extended)
9. Stripe attemps a card re-try – failed
10. Stripe deletes subscription
11. Stripe send customer.subscription.deleted (nothing happens becuse the account is already extended and will now expire after 365 days)
12. User gets free 365 days.
13. I have to manually correct the above and change user to expired and backdate subscription start date to previous year.In other words, what is happening is that when the payment fails, no hook should be sent and the account should expire by itself. Instead Stripe send the updated event and Simple Membership extends the account for another year. The customer updated event awards the account for another year even though the payment has not been recieved. What should happen is that the account should only be updated when the payment is recieved, and Simple Membership should take care of expiration naturally. If the retries fail, SM should not be updating the account.
Please help, I can send the logs but you’d be just seeing the same as the person above. This is not the problem in the setup, this is the issue with how the plugin deals with Failed stripe payments. Instead of letting the account expire naturally when payment fails, it awards it.
Thank you for all your hard work. Love the plugin and all that you do!
FAugust 15, 2025 at 2:51 am #30985admin
KeymasterThanks for the detailed post — this kind of clarity helps us investigate effectively.
Just a general reminder for others following along or experiencing similar issues:
Stripe frequently updates its platform, including how webhook events are structured and what data is included. A webhook payload from an earlier version may look different or behave differently than one in a newer version. These kinds of changes can impact how our plugin interacts with Stripe over time.
Additionally, how your membership level is configured matters a lot. For example, the “No Expiry or Until Cancelled” option (which was the originally supported method for subscriptions in our plugin) works reliably with Stripe’s subscription deletion webhook — when the subscription is cancelled, the membership is cancelled too. However, the “Access for X days/months” setup was added later, and some edge cases may still need refinement. It’s likely that this newer scenario requires more checks or adjustments.
So when you’re posting about issues, please include:
- Clear steps to reproduce the behavior
- How your membership level is configured
- Whether you’re using live or test mode
- Any relevant debug log entries or screenshots
We’re a small team maintaining a free plugin, so we rely on detailed and constructive reports to fix things quickly and reliably.
Your post includes clear steps — thank you for that. I’ll replicate your setup on a test site over the next few days using the latest Stripe API version and see if I can reproduce it. If I do, I’ll be sure to follow up here with an update.
-
AuthorPosts
- You must be logged in to reply to this topic.