PayPal Webhooks和订阅到期日期
我正在听billing.subscription.activated
事件,并且一切都存储在我的后端中。此事件包含一个称为next_billing_time
的属性,这一切都很好。然后,每当用户向该订阅ID付款时,它将显示在付款中。我的问题是,如何跟踪付款后的新计费时间?我是否必须使用旧的
next_billing_time
并手动计算?
I'm listening for the BILLING.SUBSCRIPTION.ACTIVATED
event and everything gets stored in my backend. This event contains a property called next_billing_time
, which is all good. Then whenever a user makes a payment to that subscription ID it is shown in the PAYMENT.SALE.COMPLETED
event, this event however has no next_billing_time
property. My question is, how do I keep track of the new billing time after payment is made? Do I have to use the old next_billing_time
and calculate that manually?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的设计就是关闭“PAYMENT.SALE.COMPLETED”。使用它来标记订阅有效期为 1 个月或任何期限(可能是一天的宽限期),如果您没有足够快地收到新的 PAYMENT.SALE.COMPLETED,则认为您的订阅已失效。
The simplest design is to go off PAYMENT.SALE.COMPLETED. Use it to mark a subscription good for 1 month or whatever term (maybe a day of grace time), and if you don't receive a new PAYMENT.SALE.COMPLETED soon enough, consider the subscription lapsed on your end.