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

ImWaller's avatar

Any tutorial or repo for laravel cashier?

I try to use the cashier as subscription to a monthly or yearly and I really dont understand the docs. How to use the webhooks of stripe? I need an example or an explanation. If someone have any repo, tutorial or blog article is welcome...

0 likes
3 replies
martinbean's avatar

@imwaller If you don’t understand the docs, then how is a reply paraphrasing those same docs going to help? 🤷‍♂️

You create a subscription. You accept a payment for that subscription. You don’t need to manually set up a webhook endpoint because Cashier comes with one out of the box; all you need to do is add the URL (by default, your app URL with /stripe/webhook added to the end) in the webhooks section of your Stripe dashboard. Your subscriptions database table will then be updated when subscriptions are updated in Stripe (i.e. when a card can’t be automatically charged and a subscription is automatically cancelled).

Tackle the implementation in steps. Concentrate on each step in turn so as not to overwhelm yourself. So, for your first step, create a subscription. When you can create subscriptions and charge a user, add the webhook URL to your Stripe dashboard, cancel a subscription, and see if the corresponding row in your subscriptions table also gets its stripe_status updated.

jaseofspades88's avatar

Why don't you show us some of that 'try' and then we can guide you or were you looking for a copy and paste solution that just simply works?

1 like

Please or to participate in this conversation.