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

[Support request] Stripe Error: Invalid webhook data received.

Simple Membership Plugin › Forums › Simple Membership Plugin › Stripe Error: Invalid webhook data received.

  • This topic has 4 replies, 3 voices, and was last updated 3 months, 4 weeks ago by admin.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 27, 2026 at 11:07 pm #31935
    Ron
    Participant

    Some memberships subscriptions are not updating after payment. I get the following error in the Stripe portal.

    Delivery attempt
    Feb 27, 2026, 5:57:33 PM
    400 ERR
    See delivery in event destination view
    Error insight
    Learn how to troubleshoot HTTP status codes starting with 4xx or 5xx
    Response body
    “Error: Invalid webhook data received.”

    {
    “id”: “evt_1T5DtHCsLPBj2lUmRGmdKQqP”,”object”: “event”,”api_version”: “2020-08-27″,”created”: 1772148162,
    “data”: {
    “object”: {… 87 items},
    },”livemode”: true,”pending_webhooks”: 1,
    “request”: {
    “id”: null,”idempotency_key”: null,
    },”type”: “invoice.payment_succeeded”,
    }

    Bebug Log

    [2026/02/27 22:57:33] – FAILURE: Error: can’t retrieve subscription cpt record!

    Two subscriptions have failed to update but another updated OK today.

    Please let me know what I need to do to resolve this error.

    Thanks,
    Ron

    March 2, 2026 at 3:08 pm #31937
    Ron
    Participant

    We had several successful subscription updates over the weekend, then one failed this morning.
    The payments are also not showing upon the transaction page when this happens.
    Here is a de bug log including a successful and failed membership update.

    [2026/03/01 21:49:43] – SUCCESS: Stripe webhook event data validated successfully!
    [2026/03/01 21:49:43] – SUCCESS: Stripe subscription webhook received: invoice.payment_succeeded and api version: 2026-02-25.clover. Checking if we need to handle this webhook.
    [2026/03/01 21:49:43] – SUCCESS: Stripe invoice.payment_succeeded webhook for subscription_cycle. This is a successful subscription charge. Capturing payment data.
    [2026/03/01 21:49:43] – SUCCESS: Using invoice id: in_1T6GuwCsLPBj2lUmxFDb3bSl to retrieve charge_id.
    [2026/03/01 21:49:43] – SUCCESS: Using stripe secret key from global settings.
    [2026/03/01 21:49:43] – SUCCESS: Updating the access start date if applicable for this subscription payment. Subscriber ID: sub_1Qxwx6CsLPBj2lUmV3zPMzPD, Email: ****@yahoo.com, Account status: active
    [2026/03/01 21:49:43] – SUCCESS: Found a record in the member table. The Member ID of the account to check is: 817 Membership Level: 3
    [2026/03/01 21:49:43] – SUCCESS: Updated the member profile with current date as the subscription start date.
    [2026/03/01 21:49:43] – SUCCESS: Value after update – Subscriber ID: sub_1Qxwx6CsLPBj2lUmV3zPMzPD, Start Date: 2026-03-01
    [2026/03/01 21:49:43] – SUCCESS: Transaction data saved for Stripe subscription notification.
    [2026/03/01 21:49:43] – SUCCESS: End of Stripe subscription webhook processing. Webhook type: invoice.payment_succeeded
    [2026/03/01 21:49:45] – SUCCESS: Stripe webhook event data validated successfully!
    [2026/03/01 21:49:45] – SUCCESS: Stripe subscription webhook received: invoice.paid and api version: 2026-02-25.clover. Checking if we need to handle this webhook.
    [2026/03/01 21:49:45] – SUCCESS: End of Stripe subscription webhook processing. Webhook type: invoice.paid
    [2026/03/01 22:31:31] – SUCCESS: Completed the profile_update hook handling – SWPM user profile (Member ID: 1193) updated with the latest WP user data.
    [2026/03/01 22:31:31] – SUCCESS: swpm_membership_level_changed action triggered. Member ID: 1193, Old Level: 2, New Level: 13
    [2026/03/01 22:31:31] – SUCCESS: Retrieving user record for member ID: 1193
    [2026/03/01 22:31:31] – SUCCESS: Calling user role update function.
    [2026/03/01 22:31:31] – SUCCESS: Empty caps. Calling get_wp_user_roles_by_id() to retrieve role.
    [2026/03/01 22:31:31] – SUCCESS: Completed the profile_update hook handling – SWPM user profile (Member ID: 1193) updated with the latest WP user data.
    [2026/03/01 22:31:31] – SUCCESS: User role updated.
    [2026/03/01 22:31:58] – SUCCESS: Completed the profile_update hook handling – SWPM user profile (Member ID: 1192) updated with the latest WP user data.
    [2026/03/01 22:31:58] – SUCCESS: swpm_membership_level_changed action triggered. Member ID: 1192, Old Level: 2, New Level: 12
    [2026/03/01 22:31:58] – SUCCESS: Retrieving user record for member ID: 1192
    [2026/03/01 22:31:58] – SUCCESS: Calling user role update function.
    [2026/03/01 22:31:58] – SUCCESS: Empty caps. Calling get_wp_user_roles_by_id() to retrieve role.
    [2026/03/01 22:31:58] – SUCCESS: Completed the profile_update hook handling – SWPM user profile (Member ID: 1192) updated with the latest WP user data.
    [2026/03/01 22:31:58] – SUCCESS: User role updated.
    [2026/03/02 10:59:30] – SUCCESS: Stripe webhook event data validated successfully!
    [2026/03/02 10:59:30] – SUCCESS: Stripe subscription webhook received: customer.subscription.updated and api version: 2026-02-25.clover. Checking if we need to handle this webhook.
    [2026/03/02 10:59:30] – SUCCESS: End of Stripe subscription webhook processing. Webhook type: customer.subscription.updated
    [2026/03/02 12:00:07] – SUCCESS: Stripe webhook event data validated successfully!
    [2026/03/02 12:00:07] – SUCCESS: Stripe subscription webhook received: invoice.paid and api version: 2026-02-25.clover. Checking if we need to handle this webhook.
    [2026/03/02 12:00:07] – SUCCESS: End of Stripe subscription webhook processing. Webhook type: invoice.paid
    [2026/03/02 12:00:07] – FAILURE: Error: can’t retrieve subscription cpt record!
    [2026/03/02 12:00:23] – FAILURE: Error: can’t retrieve subscription cpt record!
    [2026/03/02 13:00:31] – FAILURE: Error: can’t retrieve subscription cpt record!

    Please let me know how to do to resolve this issue.

    Thanks,
    Ron

    March 2, 2026 at 3:11 pm #31938
    The Assurer
    Moderator

    Hi Ron — thanks for the detailed info, that helps a lot.

    You’re getting:

    400 ERR
    “Error: Invalid webhook data received.”
    Event type: invoice.payment_succeeded
    Debug log: can’t retrieve subscription cpt record!

    This tells us two important things:

    Stripe successfully processed payment

    Your server rejected the webhook payload

    Your code then failed to find the matching subscription CPT record

    Since one subscription updated correctly today, this is very likely a data-matching issue, not a Stripe outage or global configuration problem.

    What’s Actually Failing

    Your system is receiving the event:

    invoice.payment_succeeded

    But when your webhook handler runs, it tries to:

    Extract the subscription ID from the event

    Find the corresponding subscription CPT (custom post type) record

    Update it

    And it fails here:
    can’t retrieve subscription cpt record!

    So the core issue is:

    The Stripe subscription ID in the webhook does not match a subscription record in your database.

    Why This Happens (Most Common Causes)
    1️⃣ Subscription ID Not Stored Correctly

    The Stripe subscription ID (e.g., sub_…) may:

    Not be saved in post meta

    Be saved under a different key

    Be saved incorrectly

    Have been deleted or overwritten

    Two failing subscriptions suggests those specific records have bad/missing metadata.

    2️⃣ Webhook Signature Validation Failing

    Your message says:

    “Invalid webhook data received.”

    That error is commonly thrown when:

    The webhook signature check fails

    The raw body is modified before verification

    The endpoint secret is wrong

    The wrong mode (live vs test) is used

    However…

    Since one subscription worked today, your webhook secret is probably correct.

    March 3, 2026 at 10:00 pm #31940
    Ron
    Participant

    Thanks for the reply,

    The most recent one that failed is a long time customer with over 30 successful subscription updates. Nothing has changed with this customer. Customer and subscription ID’s match.

    I found a Stripe webhook IP address list and added it to the firewall allow list. Other than that I’m not sure what else I can do.

    On the one that failed I see “Webhook type: customer.subscription.updated” and “Webhook type: invoice.paid” but no “Webhook type: invoice.payment_succeeded”
    Also there is no payment record added to the transaction list.

    Thanks
    Ron

    March 4, 2026 at 1:40 am #31946
    admin
    Keymaster

    The invoice.payment_succeeded webhook is needed for sure. That’s the one our plugin uses. So if that hook is not getting triggered by Stripe, it needs an investigation.

    Check the Developers → API versions section to see which version of the API is being used by your Stripe account.

    Are you using the latest version of the Simple Membership plugin?

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • 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