mirror of
https://github.com/LukeHagar/polar.git
synced 2025-12-06 04:20:58 +00:00
note subscriptions not deleted from database in readme
This commit is contained in:
@@ -113,7 +113,10 @@ polar.registerRoutes(http, {
|
||||
path: "/events/polar",
|
||||
// Optional callbacks for webhook events
|
||||
onSubscriptionUpdated: async (ctx, event) => {
|
||||
// Handle subscription updates, like cancellations
|
||||
// Handle subscription updates, like cancellations.
|
||||
// Note that a cancelled subscription will not be deleted from the database,
|
||||
// so this information remains available without a hook, eg., via
|
||||
// `getCurrentSubscription()`.
|
||||
if (event.data.customerCancellationReason) {
|
||||
console.log("Customer cancelled:", event.data.customerCancellationReason);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user