# WebHook API sending NULL last\_charge\_date, resulting in double rewards. MAJOR issue

**URL:** https://archive.patreoncommunity.com/t/webhook-api-sending-null-last-charge-date-resulting-in-double-rewards-major-issue/10072
**Category:** Patreon Feedback
**Created:** [September 4, 2020, 4:51pm UTC](https://archive.patreoncommunity.com/t/webhook-api-sending-null-last-charge-date-resulting-in-double-rewards-major-issue/10072 "2020-09-04T16:51:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Uncomfortable](https://sea1.discourse-cdn.com/patreoncommunity/user_avatar/archive.patreoncommunity.com/uncomfortable/32/5214_2.png) [@Uncomfortable](https://archive.patreoncommunity.com/u/Uncomfortable)
#### Post date: [September 4, 2020, 4:51pm UTC](https://archive.patreoncommunity.com/t/webhook-api-sending-null-last-charge-date-resulting-in-double-rewards-major-issue/10072/1 "2020-09-04T16:51:21Z")

</div>

I have encountered a major issue with the Webhook API today. **To summarize the issue, the “last\_charge\_date” is returning NULL instead of an actual date**. This is a critical problem for the reason I will explain below. This has been happening as of September 3rd and has resulted in many of my patrons receiving double rewards. I had to go through 250+ records manually to remove the doubled rewards, and am continuing to have to do so as more payments come in.

I fully understand that the API is no longer supported (I actually don’t know if this applies to the webhooks as well though I’ve always figured they were more or less the same thing), but from what I have read, that merely means that it’s not being updated, but that creators who have relied upon it to dispense rewards to their users can still continue to do so.

The reason the last\_charge\_date is important is because the Webhook API itself has always been broken when attempting to get notification of a payment being processed. When a patron’s payment has been processed, there are multiple things that happen:

- Sometimes I get a packet of data reflecting the charge, but with the old campaign\_lifetime\_support\_cents value.
- Sometimes I get a second packet of data a little later, with the same data, but the new campaign\_lifetime\_support\_cents value. Often this second packet would never be received.

Because this is entirely inconsistent, I cannot reliably trust whether the payment I’m processing here has been handled already or not, but until today (September 3rd) I was able to rely on the fact that the last\_charge\_date would be unique to the payment. Therefore by keeping track of the last payment processed, I could tell if I was receiving duplicate information or not.

Now that the last\_charge\_date is coming as null, this effectively has caused all second packets to be counted as a new payment, and so I just finished up combing through 250 individual such packets to delete the doubled rewards that ended up being given out today alone. My patreon campaign has over a thousand individuals pledged, so this kind of problem is rather considerable.

Reliance on the last\_charge\_date shouldn’t required of course, but this total unreliability of the system isn’t exactly an unknown thing. I’ve seen plenty of others mention it on the community forum. I do not hold out hope that we will be able to reliably get notifications per-payment, but is it unreasonable to hope that what is already barely working will not be broken further?

In case I have not provided enough information, here’s an example of a packet received from the web hook. Notice the value of the last\_charge\_date.

{“campaign\_lifetime\_support\_cents”:12200,“currently\_entitled\_amount\_cents”:500,“email”:“ **@**._ **",“full\_name”:"** _\*\*”,“is\_follower”:false,“last\_charge\_date”:null,“last\_charge\_status”:“Paid”,“lifetime\_support\_cents”:12200,“note”:"",“patron\_status”:“active\_patron”,“pledge\_relationship\_start”:“2017-06-10T19:27:12.244+00:00”,“will\_pay\_amount\_cents”:500}

If this last\_charge\_date:null issue isn’t fixed, I can’t really see any other way to _somewhat_ reliably tell different payments apart. Without that, the entire backbone of my patreon rewards system cannot function.

---

<div class="post-metadata">

### Author: ![reyna](https://sea1.discourse-cdn.com/patreoncommunity/user_avatar/archive.patreoncommunity.com/reyna/32/5522_2.png) [@reyna](https://archive.patreoncommunity.com/u/reyna)
#### Post date: [September 4, 2020, 8:13pm UTC](https://archive.patreoncommunity.com/t/webhook-api-sending-null-last-charge-date-resulting-in-double-rewards-major-issue/10072/2 "2020-09-04T20:13:34Z")

</div>

2 posts were merged into an existing topic: [Issue/Bug in Patreon API: last\_charge\_date empty for ALL patrons since 2020-09-03](https://archive.patreoncommunity.com/t/issue-bug-in-patreon-api-last-charge-date-empty-for-all-patrons-since-2020-09-03/10067)

---

<div class="post-metadata">

### Author: ![reyna](https://sea1.discourse-cdn.com/patreoncommunity/user_avatar/archive.patreoncommunity.com/reyna/32/5522_2.png) [@reyna](https://archive.patreoncommunity.com/u/reyna)
#### Post date: [September 4, 2020, 8:13pm UTC](https://archive.patreoncommunity.com/t/webhook-api-sending-null-last-charge-date-resulting-in-double-rewards-major-issue/10072/3 "2020-09-04T20:13:34Z")

</div>


