User blog comment:LadyAlys/HabitRPG Unofficial User Data Display/@comment-24424585-20140413054129/@comment-24150802-20140413061547

Amazing? Excellent. You owe me a favour! ;)  For working out if a user is a subscriber, there's this json data (irrelevant things like fancy shirts are removed):

"purchased":{"balance":0,"plan":{"customerId":"cus_zzzzzzz","dateCreated":"2014-01-01T10:10:10.972Z","dateUpdated":"2014-02-02T10:10:10.005Z","paymentMethod":"Stripe","paymentType":"Stripe","planId":"basic_earned","mysteryItems":[],"gemsBought":25},"txnCount":0,"ads":true} For a non-subscriber, there's this: "purchased":{"balance":0,"plan":{"mysteryItems":[],"gemsBought":0},"txnCount":1,"ads":false} I'm assuming that a subscriber is anyone who has any value for purchased.plan.customerId, but I have only two subscriber accounts to refer to. Would you be able to tell me if that's correct for all possible subcribers, now and in the foreseeable future? For added complications, what happens if a user was a subscriber, but then cancels their subscription? Does the customerId field remain populated? If so, it's no good for the drop cap calculation, so can I reliably use the planId field instead to tell if someone is a current customer?

If you don't already know the answers to these questions or aren't able to find the answers in a VERY short space of time, I'll just do some testing by cancelling one of my subscriptions and resubscribing later. I have no objection to doing that, I'm just hoping your advanced knowledge will save me the effort. :)