通过电子邮件地址条带检索客户 node.js
retrieve customer by email address stripe node.js
我有这个:
const customer = await stripe.customers.retrieve(
'info@myemail.com'
);
我正在尝试根据电子邮件地址获取客户的客户编号 (id)。这可能通过条纹吗?当我这样做时它给我一个错误。
您将需要使用 https://stripe.com/docs/api/customers/list,它将 return 具有该特定电子邮件地址的客户列表。
const customers = await stripe.customers.list({
email: 'info@myemail.com',
});
请注意 limit on the number of objects to be returned. You should make use of auto pagination 以防大量客户使用同一电子邮件地址。
我有这个:
const customer = await stripe.customers.retrieve(
'info@myemail.com'
);
我正在尝试根据电子邮件地址获取客户的客户编号 (id)。这可能通过条纹吗?当我这样做时它给我一个错误。
您将需要使用 https://stripe.com/docs/api/customers/list,它将 return 具有该特定电子邮件地址的客户列表。
const customers = await stripe.customers.list({
email: 'info@myemail.com',
});
请注意 limit on the number of objects to be returned. You should make use of auto pagination 以防大量客户使用同一电子邮件地址。