From a0ca4a8f7ed44b521b427f131a664ec50997806e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 29 Dec 2022 14:34:53 +0100 Subject: [PATCH] Reference Cashier events Instead of referencing Spark events we should point users towards the Cashier events which contain more info about what happened like the subscription object. --- 2.x/spark-paddle/events.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/2.x/spark-paddle/events.md b/2.x/spark-paddle/events.md index 54e3f3e..1b26663 100644 --- a/2.x/spark-paddle/events.md +++ b/2.x/spark-paddle/events.md @@ -2,20 +2,20 @@ [[toc]] -Spark dispatches several [events](https://laravel.com/docs/events) that you may intercept and handle based on your application's needs. We will describe each of these events below. +Cashier dispatches several [events](https://laravel.com/docs/events) that you may intercept and handle based on your application's needs. We will describe each of these events below. -## `Spark\Events\SubscriptionCreated` +## `Laravel\Paddle\Events\SubscriptionCreated` This event is dispatched when a subscription is created with a status of `trialing` or `active`. -## `Spark\Events\SubscriptionUpdated` +## `Laravel\Paddle\Events\SubscriptionUpdated` This event is dispatched when a subscription is changed. Possible changes include plan changes, quantity changes, pausing a subscription, or resuming a subscription. -## `Spark\Events\SubscriptionCancelled` +## `Laravel\Paddle\Events\SubscriptionCancelled` This event is dispatched when a subscription expires. This happens when a paused or cancelled subscription is no longer within its cancellation "grace period". ### Grace Periods -When a subscription is cancelled, Cashier will automatically set the subscription's `ends_at` column in your database. This column is used to know when the billable's `subscribed` method should begin returning `false`. For example, if a customer cancels a subscription on March 1st, but the subscription was not scheduled to end until March 5th, the `subscribed` method will continue to return `true` until March 5th. This is done because a user is typically allowed to continue using an application until the end of their billing cycle. \ No newline at end of file +When a subscription is cancelled, Cashier will automatically set the subscription's `ends_at` column in your database. This column is used to know when the billable's `subscribed` method should begin returning `false`. For example, if a customer cancels a subscription on March 1st, but the subscription was not scheduled to end until March 5th, the `subscribed` method will continue to return `true` until March 5th. This is done because a user is typically allowed to continue using an application until the end of their billing cycle.