diff --git a/src/Http/Controllers/WebhookController.php b/src/Http/Controllers/WebhookController.php index 77595e83..6e98fb31 100644 --- a/src/Http/Controllers/WebhookController.php +++ b/src/Http/Controllers/WebhookController.php @@ -191,10 +191,14 @@ protected function handleInvoicePaymentActionRequired(array $payload) * Get the billable entity instance by Stripe ID. * * @param string $stripeId - * @return \Laravel\Cashier\Billable + * @return \Laravel\Cashier\Billable|null */ protected function getUserByStripeId($stripeId) { + if ($stripeId === null) { + return; + } + $model = config('cashier.model'); return (new $model)->where('stripe_id', $stripeId)->first();