Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!