#_snagles-usage-record
1 messages · Page 1 of 1 (latest)
Unfortunately, deleting usage records can be extremely tricky. You basically have to remember the exact timestamp you reported them at and then create a new usage record for that timestamp and use the set mode to set it to 0
Hi Koopajah, thanks for the reply. I believe we have the information required for that (we record time sent, the unique key, usage record). Am I understanding correctly that we resend using the same key with the same timestamp the "old" record would be overwritten?
Yes you would use https://stripe.com/docs/api/usage_records/create and pass action: 'set' quantity: 0 (or if it wasn't 1, whatever it was minus 1) and the exact timestamp of the record to undo, and you'd do that for all the duplicates.
Perfect, thank you for the help