admin管理员组文章数量:1332353
I'm using Stripe to bill monthly for the use of our website.
I figured out how to retrieve the customer's Subscription
object. And I can check the Status
property for active
or trialing
to see if it's currently active.
My question is about when it isn't currently active. I don't want to lock the user out immediately. I want to give them time to try and resolve the payment issue.
So, say I want to give them 10 days to resolve it before I lock the user out. Can someone tell me how I could do this? Is there a date somewhere in the Subscription
object that tells me how much time has passed since their billing failed, and I could test whether 10 days has passed?
I'm using Stripe to bill monthly for the use of our website.
I figured out how to retrieve the customer's Subscription
object. And I can check the Status
property for active
or trialing
to see if it's currently active.
My question is about when it isn't currently active. I don't want to lock the user out immediately. I want to give them time to try and resolve the payment issue.
So, say I want to give them 10 days to resolve it before I lock the user out. Can someone tell me how I could do this? Is there a date somewhere in the Subscription
object that tells me how much time has passed since their billing failed, and I could test whether 10 days has passed?
1 Answer
Reset to default 2There's no date on the Subscription itself to indicate how many days have passed since the first failed payment attempt on the latest Invoice. I think you probably want to use the smart retries feature to retry failed payments and mark a Subscription as unpaid
after all retries fail. This way, you can continue to allow access to your service if a Subscription is in past_due
state but block access once it transitions to unpaid
.
本文标签: cHow to detect how long since a user39s payment failedStack Overflow
版权声明:本文标题:c# - How to detect how long since a user's payment failed? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742322673a2453104.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论