Detecting active plans (after cancelations)

mark's Avatar

mark

05 Feb, 2012 02:33 AM

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. Support Staff 1 Posted by Marc Guyer on 07 Feb, 2012 02:12 PM

    Marc Guyer's Avatar

    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

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM