Hello,
I have a question about subscriptions and webhooks.
I would like to know if there is a Webhoos event other than “subscription.update” to know if a subscription has been canceled by the user.
Because currently, when a member cancels a subscription, I receive a webhook of type “subscription.update”.
However, in this event, the status is equal to ACTIVE which can be confusing.
But there is a “canceled_date” which is equal to the end date… i guess and also there is a “charged_through_date”
Is this the only way to know if a subscription has been canceled?
Maybe the status=CANCELED is in another type of Webhook event that I have to add to receive alerts?
Thank you for your help!
Pascal
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Use Customer Webhooks
Refunds API Webhooks
Use Webhooks to Integrate with a Payroll System
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
The “subscription.updated” webhook event is indeed the correct event to monitor for changes in a subscription’s status, including cancellations. The status field in the event data should reflect the current status of the subscription. If a subscription is canceled, the status should be “CANCELED”.
However, it’s important to note that the status will only change to “CANCELED” once the subscription period ends, not immediately when a user cancels the subscription. This is because the user still has access to the subscription benefits until the end of the current billing period.
The “canceled_date” field indicates the date when the user requested the cancellation, and the “charged_through_date” field indicates the end of the current billing period, after which the subscription will be considered canceled and the status will change to “CANCELED”.
So, to determine if a subscription has been canceled by a user, you should check both the status and the “canceled_date” field. If the status is “ACTIVE” but the “canceled_date” is set, it means the user has requested a cancellation but the subscription is still active until the end of the current billing period.
This answer was reviewed by @Bryan-Square.
Hi ! thanks, but that does not help me !
I found this page :
https://developer.squareup.com/reference/square/subscriptions-api/webhooks/subscription.updated
and i think i have to use “canceled_date” ?
I just want to be sure if there not is another way!
Thanks
Yes, you’ll want to use the canceled_date
. Otherwise the charged_through_date
will let you know when the subscription will stop charging the customer.
Thanks so much @Bryan-Square !
I appreciate a lot !
Pascal