Example web application to receive money built with Stripe + Firebase
(inspired by gordonnl/firebase-stripe)
You can create your link and start receiving any amount of money spacified as URL.
https://<your-firebase-project-id>.firebaseapp.com/<ammount>
- Create a Firebase Project using the Firebase Developer Console
- Enable billing on your project by switching to the Blaze (or Flame) plan. See pricing for more details. This is required to be able to do requests to non-Google services.
- Install Firebase CLI Tools if you have not already and log in with
firebase login
. - Configure this sample to use your project using
firebase use --add
and select your project. - Install dependencies locally by running:
cd functions; npm install; cd -
- Add your Stripe API Secret Key to firebase config:
firebase functions:config:set stripe.token=<YOUR STRIPE SECRET KEY>
- Pass your Stripe publishable key to the
STRIPE_PUBLIC_KEY
variable inpublic/index.html
(likepk_test_*****************
) - Deploy your function using
firebase deploy --only functions
- Pass your new Firebase Function URL to the
CHARGE_CLOUD_FUNCTION_TRIGGER_URL
variable inpublic/index.html
(likehttps://us-central1-***.cloudfunctions.net/charge
) - Deploy your hosting using
firebase deploy --only hosting
- Test your Stripe integration by viewing your deployed site
firebase open hosting:site