0

I am having the following problem. I am using the firebase extension for stripe payment in a node.js + react app (both v18): https://extensions.dev/extensions/stripe/firestore-stripe-payments

I am trying to get the products but have an empty list in return.

Simplified version of my code :

import { getProducts, getStripePayments } from "@stripe/firestore-stripe-payments";

     const payments = getStripePayments(app, {
        productsCollection: "products",
        customersCollection: "customers"
    })

     async function displayProducts(){
        console.log("Loading products");

        const products = await getProducts(payments);

        products.forEach((p) => console.log(p));

        console.log("Product loaded");
    }

My payments variable works just fine to create a checkout session.

I have the product in Stripe and in Firebase Firestore :

Firestore

Firestore

Stripe

Stripe

Any ideas why I can't get the products in the project ? Don't hesitate to ask for more details.

Thank you

Infinite Learner
  • 196
  • 1
  • 1
  • 8

1 Answers1

0

Closing VSCode and restarting the server seemed to have solved the issue

Infinite Learner
  • 196
  • 1
  • 1
  • 8