Handling members:pledge:delete when paid up to the end of the month?

I’m building an integration, and I’m looking for some advice on handling the members:pledge:delete webhook.

  1. From my tests it seems the event fires immediately when the user cancels their pledge, but the event’s body still contains active currently_entitled_tiers. Is it because the user has paid up to the end of the month, so their membership is still active?

  2. If that’s right, will another webhook trigger at the end of the month when the tier becomes inactive, or is it my responsibility to track and handle the membership expiry date?

  3. If it’s my responsibility, how do I calculate it? Is it just member.next_charge_date?

Thank you for any help you can give me!

1 - Exactly.

2 - Yes, it should be tracked. But rather than tracked, checking for the patron status at that point in time already should tell that that patron is no longer a valid patron.

3 - If you need to calculate it, yes, using fields like next charge. If you are locking/showing content to patrons, you can do a live check at that point in time when you need to lock/show a post.

1 Like

@codebard Thanks for the quick reply!

I’ve been aiming to rely solely on webhooks after reading this (API Reference):

To ensure that you can rely exclusively on webhooks data, we’ve put measures in place to make sure your server does not miss a single event.

Is it feasible to build a webhook-only integration, or are API calls the sensible way to go?

Many thanks for your help!

I think you should rely on both calls and webhooks at the same time. If one fails the system should fall back on the other.

1 Like

Thanks for your help!

1 Like