[API V2] Correct Webhook for Free Member Making a Pledge? And for Free Trial cancellation?

I’m currently building a number of integrations between Patreon and newsletter platform BeeHiiv, using Pipedream, their HTTPS Webhook listeners and custom NodeJS code. For BeeHiiv to recognize a subscriber as “Premium” in their system, I’ve had to create a Stripe subscription product that is $0/year and another that’s $0/month — because our customers are subscribing on Patreon.

So far I’ve correctly built two integrations that work live: One that uses the API V2 Create Member Webhook, then creates the customer in BeeHiiv directly and if they are paying (will_pay_cents > 0 or free_trial == true), runs a second process to create or update the customer in Stripe and subscribe them to the aforementioned “free” subscriptions, making them Premium. The other is running on Delete Member Pledge Webhook, cancelling that Stripe subscription but keeping them in BeeHiiv, essentially downgrading.

Where I’m stuck right now is making one that will take a free member on Patreon and if they upgrade to paid or activate a free trial, then upgrading them using a similar flow. Would this be the Update Member Pledge webhook? Or the Update Member webhook? Or neither, meaning I’d need to build a code that watches a Create Member Pledge, but doesn’t create another customer if they already exist? Not sure if the Pledge webhooks send free trials.

Also, for the inverse, if someone is a free trial but cancel, would this also trigger Update Member? Will want to create a workflow to account for people who don’t continue their memberships after free trials.

You could just check the user’s Patreon user id when a new patron subscribes or upgrades, then check it against your local records to find out whether the user is a free member that needs to be upgraded at Stripe. So just get the members update webhook result, get the user’s id (through your local records or via your campaign) and then you can match it to the local records.

Just tried this. So Update Member does trigger on free_trial = true, if a free member upgrades. But it doesn’t trigger on the inverse, or at least, maybe not until end of the free trial (I’ll pay attention next week when my employee’s free trial ends). Wondering if it might be wise to have the function re-check in seven days time.

If a free member pledges, it should trigger a pledge related hook. If this is not happening, let me know.

It does. If they cancel a free trial though, does that trigger any webhook? Or do I need to build a function to periodically check the campaign list and confirm data?

Logically it should, however you should always have a background process that syncs your campaign and updates the details instead of relying solely on webhooks.