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

kylian's avatar

laravel cashier webhook in production, how keep up the listener?

Hey !

I just put my site in production, I use laravel cashier for payments with stripe and I need the webhooks, in local everything works great.

In production I need to run this command: php artisan cashier:webhook

There is no service that stays on like the queue:worker and that I have to quit, there it just launches a command like if I create a controller for example, it quits directly.

My question is: if the server restarts, does it stay on or do I have to run the command again and manage it with a cron or supervisor like I could do for the queue:worker?

If you could help me a bit on the production of laravel cashier and the webhooks system it would be nice :)

(The doc is not precise on that : https://laravel.com/docs/8.x/billing#handling-stripe-webhooks)

0 likes
3 replies
martinbean's avatar

@kylian That command is for development only.

You should add your production webhook URL to your Stripe Dashboard. Stripe will then deliver any events to that URL.

kylian's avatar

Ahh I didn't see it that way, for me it was necessary to use stripe-cli in development and then the artisan command in production with the url of our app in parameter. So, I just have to add manually in the webhooks on stripe the route of my app?

Please or to participate in this conversation.