Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

illmatic's avatar

Stripe / Cashier Webhooks

I'm trying to setup Stripe functionality but a bit unclear as to whether I need to implement the webhook functionality or not. Does cashier process the 5 events automatically or do I need to handle them explicitly? I'm not looking to do anything special - only process 1 subscription product with 2 plans.

Would I need to add the routes?

Additionally, do I set the webhook to the URL/webhook ?

Sorry for all the likely basic questions but I want to ensure Stripe is communicating back to the app as intended.

0 likes
5 replies
illmatic's avatar

Thanks @fylzero this was very helpful. But just to be clear, do I need to handle the recommended webhooks in my app or is that automatically handled by Cashier? I see my tables get updated when I create a new subscription but I'm not sure if these events are the same.

customer.subscription.updated
customer.subscription.deleted
customer.updated
customer.deleted
invoice.payment_action_required
illmatic's avatar

@fylzero Well based on this... https://medium.com/@taylorotwell/cashier-8-0-webhook-improvements-b51e4d57ec7 there is indication these webhooks are integrated into the package.

The question is now do I still need to do extra configuration such as defining the routes? If I use the Spatie package will I screw up the default configuration?

For me the biggest impact is understanding if

  1. on trial completion, will the subscriptions table automatically update the stripe_status appropriately? Is this handled automatically by cashier or is a customer.subscription.updated event emitted via webhook?
  2. If a card fails on renewal

Has anyone used Cartalyst? It appears they handle more events https://cartalyst.com/manual/stripe-billing-laravel/11.x#events50 but I could be wrong.

illmatic's avatar
illmatic
OP
Best Answer
Level 1

OK I may have answered my own Q. Digging through the repo I found the controllers, routes, and other source files. https://github.com/laravel/cashier

The webhook path to set in Stripe is if using Cashier 10 domain.com/stripe/webhook

Then update the route to

Route::get('payment/{id}', 'PaymentController@show')->name('payment');
Route::post('webhook', 'WebhookController@handleWebhook')->name('webhook');

Wish the docs were clearer! This may help someone.

Please or to participate in this conversation.