Why not using Laravel cashier and do the payment from your back-end.
If you're not doing it from your back-end, then use webhooks.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
So, I got Stripe working and payment is successfully taken. The problem is that I want to do specific backend actions once payment has been confirmed that it's successful. According to Stripe documentation here That they recommend using their client side events instead of using webhooks, but how would I do that? I thought of making Stripe return me to a route that checks the payment status and if it's successful It shows the success message to the user and send a request to another route to do the actions I need, but thinking about it, if the user kept refreshing this page the action will keep happening. What is the best way to do this? I found Spatie package That would help if i decided to go with webhooks but I'm trying to follow Stripe documentation and recommendations.
@MooseSaid return url is what you want the user to see after they complete the payment. ie, a thanks for your order type page, or whatever.
But really you need to confirm that stripe is happy by creating a webhook endpoint and then setting this in the stripe website.
You tell Stipe what events you want to listen to, and the URL that should handle it.
For instance, I have an API route /stripe-webhook which receives ALL webhooks from stripe, validates its stripe calling the endpoint and then processes the event. Processing might just involve setting the status of an order to 'paid'. This bit is really down to your app to decide. Since the webhook is asynchronous, you need to add data into the payment intent that lets your app know which transaction or customer the webhook is concerning. One way is to store the payment intent id, but you could also put meta data in the payment intent, such as order id
Please or to participate in this conversation.