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

147
Vistas
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 Respuestas
Responde la pregunta

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 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