You need to extend the webhook controller and add a method that matches with the canceled webhook. So the event from Stripe is customer.subscription.deleted. In that case, you need to add the following method to some controller
use Laravel\Cashier\Http\Controllers\WebhookController as CashierController;
class WebhookController extends CashierController
{
public function handleCustomerSubscriptionDeleted($payload)
{
// Handle The Event
}
}
Make sure you add this controller to the route as well
Route::post(
'stripe/webhook',
'\App\Http\Controllers\WebhookController@handleWebhook'
);
Documentation: https://laravel.com/docs/7.x/billing#defining-webhook-event-handlers