Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] Stripe. Subscription payment not processed, account on the website renewed

Simple Membership Plugin › Forums › Simple Membership Plugin › Stripe. Subscription payment not processed, account on the website renewed

  • This topic has 16 replies, 3 voices, and was last updated 3 years, 4 months ago by admin.
Viewing 15 posts - 1 through 15 (of 17 total)
1 2 →
  • Author
    Posts
  • May 4, 2023 at 1:43 pm #26054
    mrcmrb
    Participant

    Hello,

    I have a monthly subscription website. If the user doesn’t have money on the card, and the payment is rejected via stripe, the account on the website will have a fresh new month of subscription. In this way, on the website, users that don’t pay are still active paying members. How is it possible? And how can I fix it?

    Kind Regards

    Marco

    May 4, 2023 at 11:03 pm #26055
    The Assurer
    Moderator

    I have a monthly subscription website.

    For clarification: For payments, are you using recurring subscription payments for your memberships; or are you requiring members to (manually) renew their membership every month?

    Also, How is the affected membership level configured?
    https://simple-membership-plugin.com/adding-membership-access-levels-site/

    May 9, 2023 at 5:55 pm #26102
    mrcmrb
    Participant

    Yes, recurring monthly subscription payments
    Expire After 32 Days

    Should I change the expiration? On stripe it’s monthly

    May 9, 2023 at 10:32 pm #26103
    The Assurer
    Moderator

    When you say “not being processed,” does that mean Stripe register the payment as taking place; but nothing happens on your site?

    Please turn on the debug logs, and make sure that IPN are being accepted & processed.

    Also, does your site have a valid SSL certificate?

    May 10, 2023 at 8:46 am #26104
    mrcmrb
    Participant

    No, when the payment fails for insufficient Funds, the member get a new month of subscription.

    Stripes tries for three days to charge the money. If the payment is successful, they get a new month. If it fails, they still get a new month.

    Ok enabled debug

    IPN are being accepted & processed. In the membership payments, there are payments that were successful (but there are not failed ones)

    May 10, 2023 at 9:17 am #26105
    mrcmrb
    Participant

    In the Webhook Endpoint, are you sure I should add only:

    Customer
    Charge
    invoice.paid

    https://simple-membership-plugin.com/sca-compliant-stripe-subscription-button/

    Because I saw that there are also available:

    invoice.payment_failed
    invoice.payment_succeeded

    May 10, 2023 at 9:28 am #26106
    mrcmrb
    Participant

    This is the log for a new first subscription:

    [2023/05/10 11:11:18] – SUCCESS: After login redirection addon. Checking if member need to be redirected.
    [2023/05/10 11:11:18] – SUCCESS: After login redirection is configured in the membership level. Redirecting to: XXXXXXXXXXXXXXXXXXXXXXXXXX
    [2023/05/10 11:17:40] – SUCCESS: Stripe subscription webhook received: customer.updated. Checking if we need to handle this webhook.
    [2023/05/10 11:17:40] – SUCCESS: Stripe subscription webhook received: customer.created. Checking if we need to handle this webhook.
    [2023/05/10 11:17:40] – SUCCESS: Stripe subscription webhook received: customer.subscription.created. Checking if we need to handle this webhook.
    [2023/05/10 11:17:40] – SUCCESS: Stripe subscription webhook received: customer.updated. Checking if we need to handle this webhook.
    [2023/05/10 11:18:10] – SUCCESS: Stripe subscription webhook received: charge.succeeded. Checking if we need to handle this webhook.
    [2023/05/10 11:18:10] – SUCCESS: Stripe subscription webhook received: invoice.paid. Checking if we need to handle this webhook.
    [2023/05/10 11:18:10] – SUCCESS: Stripe subscription webhook received: customer.updated. Checking if we need to handle this webhook.
    [2023/05/10 11:18:10] – SUCCESS: Stripe subscription webhook received: customer.subscription.updated. Checking if we need to handle this webhook.
    [2023/05/10 11:18:10] – SUCCESS: Updating the access start date if applicable for this subscription payment. Subscriber ID: XXXXXXXXXXXXXXXXXXXXXXXXXX, Email: , Account status: active
    [2023/05/10 11:18:10] – SUCCESS: Did not find an existing record in the members table for subscriber ID: XXXXXXXXXXXXXXXXXXXXXXXXXX
    [2023/05/10 11:18:10] – SUCCESS: This could be a new subscription payment for a new subscription agreement.
    [2023/05/10 11:18:14] – SUCCESS: Stripe SCA Subscription IPN (HTTP POST) received. Processing request…
    [2023/05/10 11:18:15] – SUCCESS: Stripe SCA Subscription charge successful.
    [2023/05/10 11:18:15] – SUCCESS: swpm_handle_subsc_signup_stand_alone(). Custom value: subsc_ref=XXXX _ip=XXXX&swpm_id=XX, Unique reference: XXXXXXXXXXXXXXXXXXXXXXXXXX
    [2023/05/10 11:18:15] – SUCCESS: Modifying the existing membership profile… Member ID: XX
    [2023/05/10 11:18:15] – SUCCESS: Setting access starts date value to: 2023-05-10
    [2023/05/10 11:18:15] – SUCCESS: Updating the current membership level (5) of this member to the newly paid level (6)
    [2023/05/10 11:18:15] – SUCCESS: [MailChimp] Mailchimp integration addon. Membership upgrade hook.
    [2023/05/10 11:18:15] – SUCCESS: [MailChimp] Debug data: |||
    [2023/05/10 11:18:15] – SUCCESS: swpm_membership_level_changed action triggered. Member ID: XX, Old Level: 5, New Level: 6
    [2023/05/10 11:18:15] – SUCCESS: Retrieving user record for member ID: XX
    [2023/05/10 11:18:15] – SUCCESS: Calling user role update function.
    [2023/05/10 11:18:15] – SUCCESS: Empty caps. Calling get_wp_user_roles_by_id() to retrieve role.
    [2023/05/10 11:18:15] – SUCCESS: User role updated.
    [2023/05/10 11:18:16] – SUCCESS: Member upgrade/update completion email successfully sent to: XXXXXXXXXXXXXXXXXXXXXXXXXX
    [2023/05/10 11:18:16] – SUCCESS: Transaction data saved.
    [2023/05/10 11:18:16] – SUCCESS: Redirecting customer to: XXXXXXXXXXXXXXXXXXXXXXXXXX
    [2023/05/10 11:18:16] – SUCCESS: End of Stripe SCA Subscription IPN processing.

    May 10, 2023 at 9:55 am #26107
    mrcmrb
    Participant

    Here we are with the failed:

    [2023/05/10 11:48:19] – SUCCESS: Stripe subscription webhook received: charge.failed. Checking if we need to handle this webhook.
    [2023/05/10 11:48:41] – SUCCESS: Stripe subscription webhook received: customer.subscription.updated. Checking if we need to handle this webhook.
    [2023/05/10 11:48:41] – SUCCESS: Updating the access start date if applicable for this subscription payment. Subscriber ID: XXXXXXXXXXXXXXXXXXXXXXXX, Email: , Account status: active
    [2023/05/10 11:48:41] – SUCCESS: Found a record in the member table. The Member ID of the account to check is: XX Membership Level: 6
    [2023/05/10 11:48:42] – SUCCESS: Updated the member profile with current date as the subscription start date.
    [2023/05/10 11:48:42] – SUCCESS: Value after update – Subscriber ID: XXXXXXXXXXXXXXXXXX, Start Date: 2023-05-10
    [2023/05/10 11:49:06] – SUCCESS: Stripe subscription webhook received: charge.failed. Checking if we need to handle this webhook.

    May 11, 2023 at 9:52 am #26121
    admin
    Keymaster

    #1) When multiple Stripe webhooks are received, it can be confusing to read it from the debug log file. I have added additional debug logging in the plugin so it adds a line marking the “end” of the webhook. So we don’t have confusion from the following sequence:

    A webhook for charge.failed was received. Then after a few seconds another webhook (for example: customer.subscription.updated) was received.

    It can be hard to see that the “charge.failed” was just ignored which is expected behavior.

    The changes that I have made will be released with the next version of the plugin. In the meantime, you can download an updated copy of the plugin from our site and try it. Let me know if this makes any difference:

    https://simple-membership-plugin.com/wp-content/uploads/simple-membership.zip

    If you want to try this update, first delete the currently active copy of the plugin then upload and activate the above mentioned one. You won’t lose any data (members, payments, buttons, settings etc.) in the process so it is safe to do this.

    #2) You are using a “Fixed Duration” expiry. When you use this, it means the account will expire after that duration is over. It won’t expire the account as soon as the subscription is cancelled or failed. If you want the account to expire immediately when the subscription is cancelled or it fails, then use the “No Expiry or Until Cancelled” option in the membership level.

    The following page has some explanation between the different duration type setups:
    https://simple-membership-plugin.com/adding-membership-access-levels-site/

    #3) Edit your Stripe webhook to only receive the following events. I am updating this in our documentation now. It will help reduce confusion:

    – charge.refunded
    – customer.subscription.updated
    – customer.subscription.deleted
    – invoice.paid
    – invoice.payment_succeeded

    May 11, 2023 at 2:22 pm #26122
    mrcmrb
    Participant

    Okey, thank you.

    #1 Plugin Updated
    #2 Fixed it with “No Expiry or Until Cancelled”
    #3 Webhooks Updated

    I just got a new successful subscriber renewal:

    [2023/05/11 16:09:10] – SUCCESS: Stripe subscription webhook received: customer.subscription.updated. Checking if we need to handle this webhook.
    [2023/05/11 16:09:10] – SUCCESS: Stripe customer.subscription.updated webhook status: active
    [2023/05/11 16:09:10] – SUCCESS: Updating the access start date if applicable for this subscription payment. Subscriber ID: XXXXXXXXXXXXXXXXXXXXXXXXXXX, Email: , Account status: active
    [2023/05/11 16:09:10] – SUCCESS: Found a record in the member table. The Member ID of the account to check is: XX Membership Level: 6
    [2023/05/11 16:09:10] – SUCCESS: Updated the member profile with current date as the subscription start date.
    [2023/05/11 16:09:10] – SUCCESS: Value after update – Subscriber ID: XXXXXXXX, Start Date: 2023-05-11
    [2023/05/11 16:09:10] – SUCCESS: End of Stripe subscription webhook processing. Webhook type: customer.subscription.updated

    I will let you know as soon as a payment fails

    May 11, 2023 at 2:40 pm #26123
    mrcmrb
    Participant

    Are you sure about this: “If you want the account to expire immediately when the subscription is cancelled or it fails, then use the “No Expiry or Until Cancelled” option in the membership level.” ?

    If the webhooks are these:

    charge.refunded
    customer.subscription.updated
    customer.subscription.deleted
    invoice.paid
    invoice.payment_succeeded

    How the plugin can expire an account if the payment fails? Maybe there is something missing.

    May 12, 2023 at 12:27 am #26124
    admin
    Keymaster

    One charge/payment attempt failing and the main subscription failing are TWO separate events. The plugin allows some graceful time for the a recurring charge to be retried. After Stripe fails to charge the recurring payment a few times (after trying it a few times), the subscription will be cancelled permanently. At that moment Stripe deletes the subscription and triggers the customer.subscription.deleted hook. Our plugin will use that to cancel/deactivate the member account. This prevents deactivating an account when one recurring charge event may have gone through a temporary hiccup that get resolved after a day or two.

    Try cancelling that subscription from your Stripe account, then you will be able to test if the account gets deactivated or not.

    May 15, 2023 at 3:43 pm #26142
    mrcmrb
    Participant

    [2023/05/13 09:30:28] – SUCCESS: Stripe subscription webhook received: customer.subscription.updated. Checking if we need to handle this webhook.
    [2023/05/13 09:30:28] – SUCCESS: Stripe customer.subscription.updated webhook status: unpaid
    [2023/05/13 09:30:28] – SUCCESS: Stripe customer.subscription.updated webhook status is not “active” or “trialing”. Ignoring this webhook.

    May 15, 2023 at 3:46 pm #26143
    mrcmrb
    Participant

    Stripe says next payment on the 13/06, on my website the member is still active with premium membership

    May 16, 2023 at 11:45 pm #26150
    admin
    Keymaster

    If that payment keeps getting declined, Stripe will cancel the subscription. I am pretty sure Stripe will cancel a subscription automatically after up to four unsuccessful attempts to bill the customer.

    So wait for Stripe to keep trying to charge that payment and ultimately fail or succeed. The fail outcome will deactivate the account, the success outcome will keep things going as usual.

    It might be a good idea to seek clarification from Stripe, but based on my understanding, Stripe’s approach to handling this subscription is as follows: By default, they operate under the assumption that the charge will go through in one of the attempts. Therefore, they continue to display information indicating that everything is in order with the subscription, such as the next charge date and other relevant details. However, if the charge ultimately fails, the subscription will be canceled, rendering the displayed next payment date irrelevant.

    If the subscription doesn’t get cancelled after a few repeat charge attempts then there is a problem and it needs to be looked at.

  • Author
    Posts
Viewing 15 posts - 1 through 15 (of 17 total)
1 2 →
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy