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

jasonbischak's avatar

How to handle subscriptions with Laravel Cashier API backend and React frontend?

I'm confused about how the overall process works when handling subscriptions with a React frontend and a Laravel API backend. Since React needs to send the payment details directly to Stripe using Stripe JS (Elements), how does my Laravel API process what it needs to for subscription management?

In my application, users can join groups, and each group has a subscription price. These group subscriptions are stored in my database with pricing information. Any guidance and advice would be greatly appreciated!

0 likes
2 replies
jasonbischak's avatar

@martinbean Ah, okay. So when the user clicks pay, in my Laravel API endpoint I create a stripe session and once payment is successful, run the code I need to for activating the subscription and then send them back to the react frontend via the success url?

Please or to participate in this conversation.