Detecting active plans (after cancelations)

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. 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.

    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...

    B) User is on a (pre-paid) one month plan and complains / requests a refund / immediate cancelation. I want to end their access immediately.

    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.

  2. Dean closed this discussion on 18 Jan, 2013 09:37 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions