#markos-charge-immediately
1 messages · Page 1 of 1 (latest)
Just dropping a note, it sounds like I can't fully do this through the dashboard but through the endpoint instead via "update subscription item" by passing in the billing threshold value?
I was just about to mention, it looks like the last recommendation was for an API parameter that the Dashboard doesn't currently have
You'd either pass in the usage once and make sure the price has recurring[aggregate_usage]: last_ever so that it always looks for the last usage that was recorded across multiple periods, or every month you'd record the usage and use any of the other aggregate_usage types to just look at usage during that period (https://stripe.com/docs/api/prices/object#price_object-recurring-aggregate_usage)
Were you wanting a Dashboard-specific solution?
Nope but it would be nice to test it out using the test clock feature. Actually a programmatic solution is exactly what I need at the end of the day. So it sounds like I can use the update subscription item endpoint to configure the billing threshold for that particular pricing model to set it at $50 in this example?
So the workflow would be
- create the subscription programmatically with the two pricing models.
- then update the subscription item programmatically to set the billing threshold for the usage pricing model?
correct?
yes that seems like what you want
if I create a test subscription via the dashboard, then update the subscription item programmatically -- will I be able to test it using the test clock feature? If you're unsure, I'll give it a shot.
yes it will work
thank you both!