Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

79
Vistas
Retrieve all products with same metadata value in Stripe

In Stripe (using Next.js and Node.js), I'm trying to retrieve all products with the same key-value pair in their metadata:

example: retrieve all products with metadata: {category: 'foo'}

In attempts to render category-specific pages, I don't want to list and parse through my whole catalog but I also know that products can only be retrieved through id (docs), inferring that I would have to:

list all products 
for all products:
  if metadata matches, 
    add id to array
for id array:
  retrieve each

This is brute forcing though, and not a good idea.

What would be the best way to retrieve conditionally based on metadata?

Any help is appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Stripe’s API currently doesn’t support querying Products using metadata. You’d have to retrieve all Products and filter through them. Stripe does have a Search API [2] which is currently in Beta so you might want to write in to see if you qualify.

If you happen to keep a track of Products server-side in a database, you could add an additional column for category. You can query your database by category to find those specific Products and then include just those Product IDs using the ids [2] parameter when you retrieve them through Stripe.

[1] https://stripe.com/docs/search-api

[2] https://stripe.com/docs/api/products/list#list_products-ids

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda