Is it possible to incorporate the Firebase Stripe extension into my web app using Nextjs framework? I have already set up Firebase, but now I am unsure of the next steps. Should I separately set up Stripe in my app or utilize the Firebase SDKs for this purpose?
Below is an excerpt from my Firebase.js file setup:
/ Import the necessary functions from the relevant SDKs
import { initializeApp } from "firebase/app";
// Remember to include SDKs for desired Firebase products
import { getApp } from "@firebase/app";
import { getStripePayments } from "@stripe/firestore-stripe-payments";
// Firebase configuration for your web app
const firebaseConfig = {
apiKey: "XXXXXXXXXXXXXXX",
authDomain: "XXXXXXXXXXXXXXXX",
projectId: "XXXXXXXXXXX",
storageBucket: "XXXXXXXXXXX",
messagingSenderId: "XXXXXXXXX",
appId: "XXXXXXXXXXXXXXXXXXXXXXXX"
};
// Obtain app instance and configure Stripe payments
const app = getApp();
const payments = getStripePayments(app, {
productsCollection: "products",
customersCollection: "customers",
});
// Initialize Firebase
const initializedApp = initializeApp(firebaseConfig);