#Truu
1 messages · Page 1 of 1 (latest)
👋 Thanks for reaching out
You need to do more custom coding, using Stripe webhook is the right way to do post checkout treatments
is the example link I posted a good starting point for that use case starting a subscription for a brand new customer?
Yes, but also you can refer to this one too:
https://stripe.com/docs/billing/subscriptions/webhooks
Thanks so much, last question so I'm sure I understand what to do next. As far as basic architecture goes for my React - PHP code, is it:
- The React code redirects 'mywebsite.com' to 'mywebsite.com/handle-checkout.php' in a new tab
on that php page, you use the Stripe PHP API to create a new customer for them and show the credit card page
- once successful, redirect to 'mywebsite.com/success.php' and there start the webhook and create the SaaS database, show them a button to click to redirect to their new login page
Is this mostly correct?
In essence, you leave the React pages to fully display HTML created using PHP code
Yes
and for the webhook part, you can start by checking this quick start php project:
https://stripe.com/docs/webhooks/quickstart?lang=php
thanks so much for your responses!