#hero-invoice-usagerecord
1 messages · Page 1 of 1 (latest)
Hello
Morning
Assuming you are using action: set when you create usage records, then you want to pass the same timestamp of the previous record to override it. See: https://stripe.com/docs/api/usage_records/create#usage_record_create-timestamp
So if I create a usage record with timestamp x and then create another usage record with the same timestamp y then x is negated?
Yes it is overridden. See https://stripe.com/docs/api/usage_records/create#usage_record_create-action which states:
The set action will overwrite the usage quantity at that timestamp. If the subscription has billing thresholds, increment is the only allowed value.
Happy to help 🙂
hero-invoice-usagerecord
What happens if there are 2 usage records for the same subscription with the same timestamp (since we work async) ?
Lets say an order comes through and creates 2 usage records at the same time. Then I want to void one of them so I send a usage record with the set action and pass the timestamp, does it void both ?