使用Stripe API,如何通过电子邮件检索发票(包括已删除的客户)

时间:2019-09-26 09:58:13

标签: stripe-payments

使用仪表板上的Stripe搜索栏,我可以找到客户的发票-即使该客户已被删除

我正在尝试使用Stripe的Python API来执行此操作,但不幸的是,我仅获取未删除客户的数据:

bills = []
stripe.api_key = 'blahblahblahblah'
stripe_customers = stripe.Customer.list(email='test@gmail.com')
for stripe_customer in stripe_customers:
    bills += stripe.Invoice.list(customer=stripe_customer.id)

该代码将不包含来自已删除客户的bills。我认为这是合理的,但是仪表板上的搜索栏的行为有所不同-因此,我正在尝试检查是否可能。

0 个答案:

没有答案