gordonnl / Firebase Stripe
Licence: mit
Headless Stripe Payments Using Firebase Functions
Stars: ✭ 72
Projects that are alternatives of or similar to Firebase Stripe
Buefy Shop
A sample shop built with Nuxt, Stripe, Firebase and Serverless Functions
Stars: ✭ 207 (+187.5%)
Mutual labels: firebase, stripe
Stripe Firebase Extensions
Repository of Firebase Extensions built by Stripe.
Stars: ✭ 133 (+84.72%)
Mutual labels: firebase, stripe
Firebase Subscription Payments
Example web client for the `firestore-stripe-subscriptions` Firebase Extension using Stripe Checkout and the Stripe Customer Portal.
Stars: ✭ 119 (+65.28%)
Mutual labels: firebase, stripe
Firebase Cms
A CMS + E-commerce platform built with Angular and Firebase
Stars: ✭ 286 (+297.22%)
Mutual labels: firebase, stripe
Ecommerce Netlify
🛍 A JAMstack Ecommerce Site built with Nuxt and Netlify Functions
Stars: ✭ 1,147 (+1493.06%)
Mutual labels: stripe
Flutter firebase vote
A flutter application named Vote, based on firebase auth and firestore database.
Stars: ✭ 62 (-13.89%)
Mutual labels: firebase
Use Firebase Auth
A custom React Hook that provides a declarative interface for Firebase Auth.
Stars: ✭ 61 (-15.28%)
Mutual labels: firebase
Vuexfire Admin
A Vue / Vuexfire app with Firebase auth. Based on vue-admin, using vuex, vuexfire, vue-router and firebase as the backend.
Stars: ✭ 60 (-16.67%)
Mutual labels: firebase
Sample Vue Shop
See readme for newer repo details! A sample shop that shows how to manage payments with Vue, Stripe, and Serverless Functions
Stars: ✭ 1,166 (+1519.44%)
Mutual labels: stripe
Vsfire
Visual Studio Code extension for syntax highlighting, hover help and code completions with Firestore security rules and index definition files
Stars: ✭ 68 (-5.56%)
Mutual labels: firebase
Realmfire Swift
Sync a local realm database with firebase
Stars: ✭ 62 (-13.89%)
Mutual labels: firebase
Instadart Flutter Instagram Clone
Instagram Clone App Using - Dart, Flutter, Firebase
Stars: ✭ 66 (-8.33%)
Mutual labels: firebase
Drivety
Drivety: Smart App Assistant to Secure Inside Car Activity. #AndroidDevChallenge
Stars: ✭ 62 (-13.89%)
Mutual labels: firebase
Firebaserealtimechat
Sample real-time chat application using Firebase
Stars: ✭ 60 (-16.67%)
Mutual labels: firebase
Pushraven
A simple Java library to interface with Firebase Cloud Messaging (FCM) API. Pushraven allows you to push notifications to clients in very few lines of code.
Stars: ✭ 67 (-6.94%)
Mutual labels: firebase
Rgviperchat
An iOS chat app written following a VIPER architecture and BDD
Stars: ✭ 65 (-9.72%)
Mutual labels: firebase
Firetable
Excel/Google Sheets like UI for Firebase/Firestore. No more admin portals!
Stars: ✭ 1,115 (+1448.61%)
Mutual labels: firebase
Headless Stripe Payments Using Firebase Functions
The simplest possible payment implementation - for static websites.
Implementation of Stripe's Direct Charge payment using all 3 available methods. Any one would suffice, however all are included to demonstrate. These include:
- Stripe Elements - pre-built UI components for building checkout flow
- Payment Request Button - supporting Apple Pay, Google Pay and the Payment Request API
- Stripe Checkout - embeddable payment form popup
Secure, back-end communication to stripe performed in a Firebase Function, implemented using a http trigger.
Example front-end code uses Firebase Hosting, but can be hosted anywhere.
Further reading:
- Stripe Elements Method: https://stripe.com/docs/stripe-js
- Stripe Payment Request Method: https://stripe.com/docs/stripe-js/elements/payment-request-button
- Stripe Checkout Method: https://stripe.com/docs/checkout
- Firebase HTTP Triggers: https://firebase.google.com/docs/functions/http-events
Front-end Code
See file public/index.html for all html and js code.
Functions Code
See file functions/index.js for the code.
The dependencies are listed in functions/package.json.
Deploy and test
To test this integration:
- 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 allow requests to non-Google services within the Function.
- 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 i; 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
- Deploy your function using
firebase deploy --only functions
- Pass your new Firebase Function URL to the
FIREBASE_FUNCTION
variable inpublic/index.html
- Deploy your hosting using
firebase deploy --only hosting
- Test your Stripe integration by viewing your deployed site
firebase open hosting:site
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].