After a customer has cancelled subscription, why I can still query him from API and the isAvtive status for the plan is active?
Also For hosted page solution, I setup Customer
create/Update/cancel Return URLs, but how do I know which customer?
It would be very nice if the the request sent form CG can contain
customer code.
Anyways,right now I rely on client side cookie on our site to
determine which user in our system and use the id which is the
custom code in cg's system. But I found that even after a customer
has cancelled subscription, why I can still query him from API and
the isAvtive status for the plan is active. So what is the reliable
way to query customer's existence and status from API? Thank
you.
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
Support Staff 1 Posted by Marc Guyer on 10 Feb, 2012 02:09 PM
Hi Bo -- The
isActive
node you're referring to is a child of theplan
node. Therefore, it means that the plan is active, not thesubscription
. A subscription is in good standing if it does not have acanceledDatetime
.2 Posted by bo.xu on 10 Feb, 2012 02:25 PM
Ok thanks for the clarification . Oh what is your recommended way to query a user exist or not from API?
3 Posted by bo.xu on 10 Feb, 2012 02:29 PM
I know there is cancelation event hook. Would that be the preferred way to tell a user has been canceled programmatically? Thanks.
Support Staff 4 Posted by Marc Guyer on 10 Feb, 2012 02:39 PM
If you call the
customers/get
method and receive a 404 response code, the customer does not exist.Well, there's the cancel event hook to receive push information about a cancellation. Also, the
customers/get
API response contains all the information about a customer. If the latest subscription record is canceled, then, well, there you go.5 Posted by bo.xu on 13 Feb, 2012 06:57 PM
Thanks for answers. But I do have a follow-up question. A customer can have multiple subscriptions, is that true? if so is each subscription associated with one and only one product or what is it associated with? and how do I determine which product/plan has been cancelled? Thanks a million.
6 Posted by bo.xu on 13 Feb, 2012 09:21 PM
oh, ok. product code is part of the path. so every thing is for the product. So the real question is now that
1. will a customer have multiple "in good standing" subscriptions? It looks to me the list of subscriptions is more like a history list. So in that sense only latest subscription matters in terms of whether it is active or not and what plan is subscribed?
Support Staff 7 Posted by Marc Guyer on 14 Feb, 2012 01:51 PM
You've got it! Multiple subscriptions means history. Only one is active at a time (the latest one).
Correct.
8 Posted by bo.xu on 14 Feb, 2012 02:59 PM
> ==================================================
> From: Marc Guyer
> Subject: After a customer has cancelled subscription, why I can still query him from API and the isAvtive status for the plan is active?
>
>> will a customer have multiple "in good standing" subscriptions? It looks to me the list of subscriptions is more like a history list. So in that sense only latest subscription matters in terms of whether it is active or not and what plan is subscribed?
>
> You've got it! Multiple subscriptions means history. Only one is active at a time (the latest one).
>
Perfect. Will the latest subscription always be the first in the subscriptions element of response? just trying to simply coding, I could always check the created time stamp if that is not always true.
>> a subscription will never contain more than one plans, right?
>
> Correct.
>
> View this Discussion online: http://support.cheddargetter.com/discussions/problems/1149-after-a-customer-has-cancelled-subscription-why-i-can-still-query-him-from-api-and-the-isavtive-status-for-the-plan-is-active
> --
Support Staff 9 Posted by Marc Guyer on 14 Feb, 2012 06:00 PM
Yes, the latest will always be first.
Marc Guyer closed this discussion on 17 Feb, 2012 01:30 PM.