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

145
Views
retrieve subscription by email stripe node.js

I want to access a subcsription, to see if the status is active.

I have this:

    const subscription = await stripe.subscriptions.retrieve({
    email: 'contact@Inderatech.com',
  });
  res.send(subscription)

however, it doesn't let me do it like this. On the stripe docs, it says to do it like this:

const subscription = await stripe.subscriptions.retrieve(
    'sub_icsb2'
  );

but i won't have the subscription id unless i grab it using the customer email. So is this possible?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The API only supports retrieving an object by their id. So when you want to retrieve a Subscription you need its identifier, the sub_123.

It is not possible to retrieve a Subscription by another property today and it applies to all APIs. There are List APIs that you can use to filter specific objects. For example when you list subscriptions you can filter them for a specific Price via the price parameter.

Today, the subscription doesn't have an "email" property so there isn't a way to list subscriptions for a specific email. Usually what you want is to first find the customer(s) that have a specific email address via the email parameter and then you can list subscriptions for that specific customer via the customer parameter.

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!