How to save form data before Stripe payment?

I want to set up a form to capture details from a user on an event they’re booking and then collect payment via Stripe. My page is static HTML and I’m not using a library or framework.

How can I capture the data input on a form before redirecting to Stripe hosted checkout for payment?

It would be ideal if I could embed Stripe payment on my page under the form with a “pay now” button and only capture user entered form data when payment is successful. Could that be done using a Netlify function and the session status?

Using a Stripe buy button with my form could also work (Create an embeddable buy button | Stripe Documentation) but I still don’t know how I would capture the form data.

Any suggestions on how to implement this would be appreciated, thanks!

Hello,
I’d like to keep up with this thread. I’m facing the same problem on my side.

1 Like

This doesn’t seem to be a Netlify question.