So, my own patreon only has a few patrons so my sample size to draw on is fairly small, but from what I’ve been able to make sense of between them and my own API issues (I’ve gone as far as forking the PHP bundle, for reference):
[patron_status]
will either be Active Patron or Former Patron. If they haven’t been charged successfully at least once, they won’t show as an Active Patron. If a charge lapses after a successful one for whatever reason, then the member becomes a Former Patron. You can also get some weird results with annual patrons, if your Patreon is monthly subscription based. This can be better figured out by requesting the is_follower, last_charge_status, last_charge_date, next_charge_date
fields. I’ll cover annual subs a bit more later.
If a user has no tier data, and you’re certain you’re requesting it, then they most likely made a custom pledge, and as such have no tier. If they decided to make a custom pledge, they didn’t request a tier, and as such have no tier. They should still have the fields will_pay_amount_cents
and currently_entitled_amount_cents
in their membership data though, which should let you work out what they should have access to, if you want them to have access without requesting a tier.
If neither Active nor Former Patron are showing up for patron_status
then I’d check if they’re a follower by requesting and then checking the is_follower
field.
1970-01-01 is the default time for a lot of unix/linux systems if you ask for Date(0), if I recall correctly, so it’s possible that you’re converting an empty JSON response from a date field sent by the API to a null, false, zero, or something equally zero-ish and passing that to a date interpreter.
As for annual accounts, these aren’t directly expressed by the API but they’ll show up as Active Patrons with either a next_charge_date a year after the last_charged_date or a next_charge_date of null if they downgraded from an annual after paying, a last_charged_date up to a year ago, and currently_entitled_amount_cents will probably be 12 times what their current tier is.
I’ve not yet seen an instance where the API returns incorrect data, but most of the bundles I’ve seen for interacting with it don’t actually request all the fields that are available.