0

Is there any way to generate a one time payment using React and Firestore as a database. I know Firebase provides something, but I don't want to necessarily update to Blaze Plan since this is a small personal project. And no, I don't have a server backend (I manipulate firestore collections directly in react) Thank you!

ALL
  • 91
  • 6

1 Answers1

1

Making a payment with Stripe is usually a combination of an interaction with the Stripe platform from a front-end AND an interaction with the Stripe platform from a back-end. If you don't own a server, the only "Firebase solution" is to use a Cloud Function, like does the Run Payments with Stripe extension. Note that even if you have to switch to the Blaze Plan, unless you execute hundreds of thousands of payments (i.e. if you go over the free tier of 2M CF invocations/month), you'll only pay a very low amount, see this SO answer.

Other alternatives with Google Cloud Platform would be to set-up a server with Compute Engine, deploy an app on App Engine or deploy a containerized application on Cloud Run (both these last two being serveless solutions), but all of these solutions will most probably cost much more than a serverless solution like Cloud Functions with its generous free tier.

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121