Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
Firebase/Stripe getProducts returns an empty list

I've created some products on Stripe which I can retrieve using

curl https://api.stripe.com/v1/products   -u sk_test_...:   -G 

I've installed stripe/firestore-stripe-payments@0.2.4 in Firebase https://firebase.google.com/products/extensions/stripe-firestore-stripe-payments and configured it using the same secret test key

In my website, I use the corresponding web sdk https://github.com/stripe/stripe-firebase-extensions/tree/master/firestore-stripe-web-sdk and have something like

  const firebaseApp = initializeApp(firebaseConfig);
  const analytics = getAnalytics(firebaseApp);
  const auth = getAuth(firebaseApp);

  onAuthStateChanged(auth, user => {
    if (user) {
      console.log('Logged in as '+user.email );
    } else {
      console.log('No user');
    }
  });
  
  var userCredential = await signInWithEmailAndPassword(auth, ..., ...)
  // Signed in 
  const user = userCredential.user;
    
  const payments = getStripePayments(firebaseApp, {
  productsCollection: "products",
  customersCollection: "customers",
  });
  console.log('#Payments ' + JSON.stringify(payments));

  const products = await getProducts(payments);
  console.log('#Products2 ' + products.length);

  const session = await createCheckoutSession(payments, {price: <a_hardcoded_priceId>,});
  window.location.assign(session.url);

The createCheckoutSession seems to work fine, and I do see in Firebase a customers collection and inside my customer, I see a checkout_sessions collection.

But the returned list of products is empty.
Any idea what might be wrong? All products have type=service (which might be the root cause if https://stripe.com/docs/upgrades#2018-02-05 is still relevant) but not sure how I can change this.

Suggestions I could try?
Additional info I could provide?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda