Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription Reactivation Webhook should supply time of reactivation #183

Closed
ScottSpittle opened this issue Sep 15, 2015 · 2 comments
Closed
Labels

Comments

@ScottSpittle
Copy link

When receiving a webhook for a subscription reactivation I am supplied with the following (among other details);

    "activated_at" : ISODate("2015-09-09T13:55:52.000+0000"), 
    "canceled_at" : null, 
    "expires_at" : null, 
    "current_period_started_at" : ISODate("2015-09-09T13:55:52.000+0000"), 
    "current_period_ends_at" : ISODate("2015-10-09T13:55:52.000+0000")

The activated at will always be the same as the current_period_started_at, can we get a time of the reactivation, like we do with the cancellations?

    "canceled_at" : ISODate("2015-09-14T14:50:22.000+0000"), 
@drewish
Copy link

drewish commented Sep 15, 2015

Yeah agreed, I don't think we do a good job of tracking the reactivation date so I'm not sure we've got anything to provide. I'll pass this along to the PM who's working on some upcoming changes to the web hooks.

@aaron-junot
Copy link

I went ahead and looked into this. As mentioned above, we don't really track the reactivation date. However, you can get this date by making an API request to get the subscription after receiving the webhook, which will have the reactivation date in the updated_at tag. In PHP, this can be accomplished with:

$subscription = Recurly_Subscription::get($uuid);
var_dump($subscription->updated_at); // DateTime object representing the reactivation date

@bhelx bhelx added the V2 V2 Client label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants