A pledge is created independent of payment. There are currently no webhooks that notify when a payment has been successfully processed. Some creators may have charge upfront enabled for their campaign but that’s a beta feature used only be some creators so you cannot depend on that – and even for creators with it enabled, that’s only going to inform you that there’s been a first payment, not subsequent payments.
A pledge is considered updated when the pledge itself is changed by the user, i.e: the patron increases or decreases their amount, or opts for a different reward. A pledge is not considered updated when payment statuses change, you will not received webhooks about payment statuses.
A pledge is not deleted when payment fails. Patreon will try to charge their card again a few times, and prompt the user to update their card if it continues to fail. As far as I know, a pledge is only deleted after this process has yielded no valid card over time.
If you’re trying to determine how the Patreon system works, and how you (as a developer) can determine payment status, I recommend these 2 threads as they contain lots of helpful information from the dev team:
And if you’re looking for a PHP library that implements this information and provides helpful methods for determining payment status, you can check out my Patreon PHP library to save you reinventing the wheel
So from what I understand, pledges:create is fired as soon as someone subscribed? Similar to how Patreon gives out Discord server perks right as they subscribe?
I’m currently using pledges:create to send new Patrons right away to my back-end to give them perks, but for some reason my back-end isn’t receiving it or it isn’t firing. The test fire button works though.
The way I usually test this is to use a second account to pledge to the first account which has webhooks. You should then see that the event is received by your backend. You can set up a requestbin URL to inspect events as well.
Tag along question: does pledges:delete get fired when a pledge gets marker as fraudulent?
When a patron is first marked as fraudulent, the pledges:delete event is not immediately triggered. However, after a certain period of time (currently 9 days), if they are not determined to be non-fraudulent, all their pledges to creators and pledges from patrons get deleted. So yes, the pledges:delete event should be fired after they are confirmed to be fraudulent.
Does pledges:delete get fired when I block a patron?
A follow up question, I recently enabled upfront payment, does that mean if the charge is successfully, patreon:create would be fired? Also, if I offer Discord integration, how would I detect if they link their Discord account? Since patreon:create gets called before they can link it and patreon:update won’t get called.
When you connect your Discord server to your Patreon creator page you will be given the option in your membership tiers to provide a Discord benefit and the role you want to give on Discord associated with it.
When a patron connects their Discord account to their profile or updates/modifies their membership for a tier that contains a Discord reward we will send the notification to Discord to update their user role.
Do I understand correctly that you can get updates on payment events now? The v2 webhook docs says that you get them as part of the new members:update webhook. I sent a test payload using the My Webhooks console and got this in the response JSON: