PayPal Webhooks和订阅到期日期

发布于 2025-01-17 09:14:30 字数 231 浏览 3 评论 0原文

我正在听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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

黑色毁心梦 2025-01-24 09:14:30

最简单的设计就是关闭“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文