remaining "active" days after cancellation?

's Avatar

nik

04 Feb, 2011 09:58 AM

Dear CheddarGetter,

I've been implementing a basic billing system, using the simulated gateway as I wait for my merchant / gateway account (I've put in a request through you guys to facilitate as well).

Suppose I have one user with an active subscription, i.e., in the response data for that customer -> subscriptions -> plans -> monthly plan -> isActive is 1 in the API.

When I cancel that user's subscription, I recon that isActive will remain at 1 until the end of the current billing period. Is that correct?

Also, how do I know how many days the user still has in his/her current billing period? Do I need to look at the next invoice date for that?

thank you,
kind regards,
Nik.

  1. Support Staff 1 Posted by Marc Guyer on 04 Feb, 2011 05:48 PM

    Marc Guyer's Avatar

    Hi Nik -- plan->isActive doesn't really mean much. This is just a simple toggle for anything you'd like to use it for. It's generally used to indicated whether or not a plan is offered to the public.

    To determine if a customer's subscription is canceled, refer to the subscription->canceledDatetime. When a customer's account is canceled, it is immediately canceled. If you wish to allow the user to continue using your service after cancellation until the end of the period, you can do that by determining when the end of the billing cycle is.

    Also, how do I know how many days the user still has in his/her current billing period? Do I need to look at the next invoice date for that?

    The billingDatetime on the current invoice is the end of the current billing period.

    Do you mind if we make this thread public?

  2. 2 Posted by Nik Van den Wij... on 04 Feb, 2011 06:32 PM

    Nik Van den Wijngaert's Avatar

    Hi Marc,

    Thank you for your reply! Please make this thread public if you'd like to.

    So when a subscription is canceled, should I always listen for the POST callback hook, or what value should I check when getting the user response upon login? Do I see if there is a cancel date present?

    Thanks,
    Kind regards,
    Nik.

    ======================
    Sent from my iPhone, please excuse any typos.

  3. Support Staff 3 Posted by Marc Guyer on 04 Feb, 2011 07:40 PM

    Marc Guyer's Avatar

    You may use the callback if you wish. However, you can just request the customer info on login as you suggest. If the current subscription record has a canceledDatetime, then they're canceled.

    Are you using an API wrapper?

  4. 4 Posted by Nik Van den Wij... on 04 Feb, 2011 09:45 PM

    Nik Van den Wijngaert's Avatar

    Hi Marc,

    Yes, I'm using the CheddarGetter PHP wrapper on the backend in an Ajax setup...

    Thanks for your prompt replies!
    Kind regards,
    Nik.

    ======================
    Sent from my iPhone, please excuse any typos.

  5. Dean closed this discussion on 16 Jan, 2013 04:06 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