#excid3
1 messages ยท Page 1 of 1 (latest)
Hi there! A subscription item's quantity can be updated: https://stripe.com/docs/api/subscription_items/update
The quantity is not used in metered billing though
Should have mentioned that I am talking about UsageRecords
ah got it!
There's no way to delete a Usage Record once created
However, it can be corrected. You can create a new Usage Record with the same timestamp, the correct quantity, and action:set
The above method can be used if the original Usage Record was created with action:set
Ah okay that makes sense
That will do the trick. I didn't think about that as an option ๐
Okay, I tried this but it didn't adjust the invoice
It just created a usage record with 0 as the quantity
The upcoming invoice still shows the same amount
That looks to be a different timestamp though, right?
You need to pass the same timestamp to overwrite
Oh I missed the note about the same timestamp
So I'll have to list out all the previous ones and then set them all
If you want to overwrite all of them then yes.
Yeah, I think I'm going to, made a mistake on a few thing so I was going to clear them all
And that seems impossible to retrieve the timestamps because there's only a summaries endpoint?
Dashboard is using /v1/subscription_items/si_MOuYrCNFhP0IRK/usage_records
But the API only exposes /usage_record_summaries
Ah you are right. Forgot about that. Let me double check on best way to do this
Yeah okay so this is actually not possible at the moment. The idea with metered billing is that you are tracking your own usage information and just submitting it to Stripe.
That puts you in a bit of a tough spot at the moment.
Ah okay
One workaround would be to use Sigma
Does look like we store usage record timestamps in Sigma so that would be your best workaround here