Webhook test data format doesn’t match real live data?

Hi! I turned on Patreon webhooks in our Ruby on Rails app last night. The only information we need from Patreon is the email address of the user and the pledge amount. Using the “Send test” links at https://www.patreon.com/portal/registration/register-webhooks , I obtained these two pieces of data like this:

event = JSON.parse(request.body.read)
email = event['included'][1]['attributes']['email'].downcase
pledge = (event['data']['attributes']['pledge_amount_cents']).to_f / 100

I grabbed email like this because it was the only email field I found in the test data. (It’s our address, but I assumed it was being used for testing.) But when someone actually became a patron overnight, email was nil. Looking through our logs, it looks like the address may actually be in event['data']['attributes']['email']? Will it be the same across all six Patreon webhook methods?

Also, pledge_amount_cents seems to have disappeared? Now there’s currently_entitled_amount_cents (I have no idea what that means) and will_pay_amount_cents? I guess I should use the latter? But will it go away once the patron actually starts paying?

Maybe I’m missing something, but this seems like a total mess to me. Is the format of the test data just unrelated to reality? Should I throw out everything I based on the test transactions Patreon was sending me, let the tests fail, and hope for the best with actual ongoing transactions?

Thanks very much for your help. Stay safe!

I didnt check the ruby lib in detail, but i dont think pledge_amount_cents exists in that lib either.

PHP lib and WP plugin both use currently_entitled_amount_cents . This field should have come with api v2 changes if i remember correctly.

There is no official support whatsoever from pareon themselves. Even here. I’ve posted the same question 6(!!!) month ago and got no response or explanation. Test webhooks are inconsistent with the actual hooks

Thanks for your replies! I’m sorry I’m just getting back to you; it turned into a busy week.

@codebard: Looking at the documentation again, now I’m thinking that perhaps the test data is being sent in the v1 format while the site has moved to v2? v2 is still listed as in “open beta”, but maybe someone flipped the switch on it at some point and never updated the docs or the test data?

I’m going to try using currently_entitled_amount_cents and cross my fingers that that’s what I should be doing. The documentation doesn’t make much sense to me:

The amount in cents that the member is entitled to. This includes a current pledge, or payment that covers the current payment period.

The amount that the member is entitled to… ? I guess they really mean the amount the member has promised to the campaign/creator? Or the creator is the member?

My head’s spinning. I’m going to hope that what I think they’re trying to say is what they really are trying to say.

@danilluzin: I’ll poke them and point them to both our topics. Hopefully, someone will take notice so no one else has to scratch her head on this.


currently_entitled_amount_cents is the way to go - its what’s used in WP plugin which is live on over 3000+ sites, serving huge quantities of users every day.

currently_entitled_amount_cents means what the user is currently entitled to - ie, if the user paid $5 in last payment, for current month, user is entitled to $5.