Stripe payments 条带-获取最后一张客户发票

Stripe payments 条带-获取最后一张客户发票,stripe-payments,Stripe Payments,是否有办法根据为特定客户生成的上次发票过滤发票结果 通过条带,我可以看到有可能获得即将发布的发票,但我找不到获取最后生成的发票的方法。您可以使用 返回的发票按创建日期排序,最新创建的发票显示在第一位 因此,如果您希望为给定客户提供最新的 invoices = stripe.Invoice.list(customer="cus_xxxyyyzzz") # first in the list should be the most recent print(invoices.data[0]) 你可以

是否有办法根据为特定客户生成的上次发票过滤发票结果

通过条带,我可以看到有可能获得即将发布的发票,但我找不到获取最后生成的发票的方法。

您可以使用

返回的发票按创建日期排序,最新创建的发票显示在第一位

因此,如果您希望为给定客户提供最新的

invoices = stripe.Invoice.list(customer="cus_xxxyyyzzz")
# first in the list should be the most recent
print(invoices.data[0])
你可以用

返回的发票按创建日期排序,最新创建的发票显示在第一位

因此,如果您希望为给定客户提供最新的

invoices = stripe.Invoice.list(customer="cus_xxxyyyzzz")
# first in the list should be the most recent
print(invoices.data[0])

如果您使用的是条带计费,
订阅
包含一个-因此您可以使用
最新的VoiceID
,或者您可以获得订阅并一次性返回最新的发票。

如果您使用的是条带计费,然后,
订阅
包含一个-因此您可以使用
最新的VoiceID
,或者您可以获得订阅,并一次性返回最新的发票