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.