I'm just starting to work with the API, and am unsure what the best way to handle the following two scenarios with regards to detecting whether a subscription is active and "in good standing".
I see the "canceledDatetime" field, which as I understand would have a value in the (B) scenario, or when the charge fails, but it would also hold a value in the (A) scenario, right?
A) User is on a (pre-paid) one month plan and cancels. I want to continue giving them access through the end of their month.
B) User is on a (pre-paid) one month plan and complains / requests a refund / immediate cancelation. I want to end their access immediately.
Hope that makes sense! TYIA!

#1 Posted by Marc Guyer Support staff on 07 Feb, 2012 02:12 PM
No problem. Just give them access until their next
billingDatetime. The PHP wrapper has a convenience method for this:https://github.com/marcguyer/cheddargetter-client-php/blob/master/R...
Hmm... This is a little more complex but doable. You would detect a canceled subscription, then determine whether or not the latest transacted invoice had been refunded. If so, deny access.
Dean closed this discussion on 18 Jan, 2013 09:37 PM.