Can I implement Stripe checkout in React without my own backend server?

Viewed 3611

I have a React frontend deployed on Netlify. I want to implement a simple payment system where user can enter the amount they want and pay using Stripe checkout or even PayPal. I wanted to know If this is possible without paying for a separate backend. Or is there any other self hosted payment gateway you can suggest?

thanks! :)

4 Answers

Technically, you can use client-only Stripe Checkout, however it's not the recommended path: https://stripe.com/docs/payments/checkout/client

Client-only is not recommended because it lacks many of the features made possible with a client-server integration. Furthermore, the client-only integration is not currently (as of this post) receiving new features or upgrades.

If you don't want to do server-sided development, then Stripe Checkout (client-only integration) is the way to go. Everything you need can be done on Stripe dashboard.

Stripe now has a solution called Stripe Payment Links. It's a client-only solution... in fact it requires no code!

As you can see on Stripe docs The Stripe API uses API keys to authenticate requests. - so this means that you need a secure way to integrate with them, without exposing those keys.

So the best way would be to use some serverless backend (FaaS) for that, like Amazon Lambda, GCP Cloud Functions etc.

Here's a good article, how to integrate Stripe with webtask.io, which should be pretty simple to use

Related