#rodney-billing-thresholds

1 messages ยท Page 1 of 1 (latest)

maiden belfryBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • bugdug., 18 hours ago, 5 messages
ember fossil
#

I believe it would show $100 used for the cycle until it resets

cosmic thorn
#

Fantastic. What would be the most straightforward way to check if a user/subscription has reached their limit for the cycle? I know there's the caveat of stripe doesn't know about the usage until we report it but would latest_invoice on the subscription object be the best place to look or is there another endpoint that would be better suited?

ember fossil
#

I believe you can check the latest_invoice on the Subscription and check the billing_reason - you should see subscription_threshold as the reason if the invoice was cut because the threshold was reached

cosmic thorn
#

oh in that case it would probably be easier to just use webhooks to handle it. I can set a status on our end if we receive an invoice.created event with billing_reason: subscription_threshold . Do you know if a webhook is sent once the cycle resets?

ember fossil
#

Yeah when the cycle resets you'd get a customer.subscription.updated event and you'd see the current_period_end and current_period_start change

cosmic thorn
#

perfect! tysm for your help

ember fossil
#

happy to help!

maiden belfryBOT
#

rodney-billing-thresholds

cosmic thorn
#

oh also I guess an extension of this since we are planning the feature

#

Let's say user hits their $100 threshold, and then we decide to up their threshold to a higher value, I assume that would also come through as a customer.subscription.updated event? Also would they receive a new invoice at the end of the cycle assuming they didn't hit their updated threshold?

ember fossil
#

Yeah that'd also come through as a customer.subscription.updated event, and yes, I believe they'd still get the invoice at the end of the period

cosmic thorn
#

Great, thanks again. Feel free to lock the thread ๐Ÿ™‚

ember fossil
#

๐Ÿ‘