Stripe Mettered Billing我应该使用什么?

时间:2018-04-30 15:11:44

标签: stripe-payments

我对文档感到有点困惑:In order for Stripe to compute the number of units consumed during the billing cycle, you must report the customer’s usage by creating usage records 然后:The usage reporting endpoint is rate-limited, so you might need to exercise caution and avoid making too many separate usage records.

那究竟是什么意思呢?在为一些客户添加一些用法后,我的应用程序将停止工作?那我该怎么用?订单项?发票项目?

到目前为止,我已经创建了一个客户并订阅了他的计划。如何在没有限制的情况下增加他的使用量并冒着我的应用程序因没有明显原因而中断的风险?

1 个答案:

答案 0 :(得分:2)

这只是意味着,如果您有进入速率限制的危险,您应该做一些事情来批量调用https://api.stripe.com/v1/subscription_items/{SUBSCRIPTION_ITEM_ID}/usage_records

例如,每次客户的使用量增加时,不要在那里张贴,只需跟踪它并在每天,在结算周期结束时或在其他某个时间间隔执行一次POST。 / p>

相关问题