#Osiris
1 messages · Page 1 of 1 (latest)
Can't re-open but we can continue the conversation here.
Threshold is changing the bill instead of just pre-charging. Without threshold user will be charged for 51 units which is max in period. Whereas with threshold, user is being charged for 51+50=101 units
How i expect this to work is, substract pre-charged bill from cycle end bill thats it. Not change the amount itself.
Okay but when you add usage, since you have a billing threshold, this increments the usage. And your threshold is set to not reset the billing cycle anchor.
So let's back up one second
What is the exact behavior you want?
Do you want an invoice to be cut when a threshold is eclipsed?
Or do you want to only invoice at the end of the billing cylce?
Okay but when you add usage, since you have a billing threshold, this increments the usage.
Usages aren't supposed to be incremented inmaxaggregate type. Stripe is supposed to take max of all reported usages
No, you can't use set with thresholds. See: https://stripe.com/docs/api/usage_records/create#usage_record_create-action
The only option is to use increment when using billing thresholds
set and increment are for a particular timestamp not entire period
@remote pawn to me this seems like simply a conflict between using a threshold and setting a max aggregate. You want the behavior here to be that you are able to adjust from 51 --> 50 without recharging, even if both are over the threshold?
yup
So yeah this simply isn't really possible since you can't overwrite usage here with billing thresholds.
so for max settings adding threshold changes the meaning completely
Yeah pretty much
It basically becomes "max if below threshold"
But those two don't really play nicely together for what you want
cool then. Thats why it feels wrong. I just wanted to confirm if I am doing anything wrong.
Yeah sorry I misunderstood what you were trying to do initially