#jobjen02
1 messages · Page 1 of 1 (latest)
Hi, I contacted sales already, but they don't understand it at all. I thing there might be a bug
Can you provide more information? Like example request IDs of what you've tried?
That button "Create usage record" has a dropdown where I can select 2 items, when I select the "set" option, i expect that the usage will be set to the filled in number, but it just adds one. The other option from the select does the exact same thing
I've asked a colleague to take a look as things are running busy on discord at the moment, they will take a look and repond as soon as they can
thanks for your patience
alright, thank you
Hello, do you have the ID of this subscription (sub_1234)?
I send it private to you, since this is a public chat
Thanks I'll look. For future reference, IDs are safe to share in public chats, the only way someone can do something with one is if they have your login or secret key (at which point the login or secret key is the problem)
alright, thank you
Have you tried to do action=set on any of your requests today?
The most recent request that I can see with action=set is from two days ago
no, not today
Yeah and in my testing set vs increment doesn't seem to matter when aggregate_usage=sum on the Price, they both increment the value
I tried providing negative values but those are considered invalid
yeah, so thats the problem
Still looking for a way to issue a correction
Yeah, the one workaround that would definitely work would be setting aggregate_usage to one of the other values and then directly setting their usage
But I feel like we have to have some way to correct this with sum
yes
I don't understand this one?
So with sum you say that a user used 1 unit then 1 unit then 1 unit so they used 3 units
With the other ones you would set 1 unit then 2 units then 3 units and we would use the last one provided
yeah, but I need the sum method
Yep, I am still looking in to it. May need to pull in another colleague as the server is getting pretty busy
alright, thanks for your help!
So we do have a way to do this that I accidentally overlooked. You can provide a timestamp when reporting usage and that can override a previously set usage record at that time
So you can set the usage record to the time you want to get rid of usage for and provide a quantity of 0
It changed it in my tests so this should be possible. Did you provide the exact same timestamp as another usage record that already exists?
Ah, the API takes a timestamp that has second granularity
yeah, i tought so
Will double check but I am not sure if the dashboard can do this, you may have to switch to using the API
Yeah as far as I can see, the dashboard doesn't have a way to rewrite this the way the API can. I will put in a feature request but for now I think the API would be the way to go
I have been using our node library so:
'si_LtVAyMVX2N5Nxk',
{quantity: 0, timestamp: 1571252444}
);```
how did you get the excact timestamp?
Do I need to fetch the updates first, and then take some timestamps?
I was reusing a timestamp that I had previously set. I thought you could just list usage records but I now see that we don't have an endpoint for that. Checking to see how you can get these timestamps...
alright, thanks!
I see the timestamps from the network tab🙂
yeah it works lol
Glad that works! Still checking with a colleague if you can see them through the API or elsewhere
Yeah, now it takes a lot of time
I just copy and paste some timestamps now to overwrite it. A nice feature would be to set a new starting point or something
Yeah, will put in feedback for this. So it looks like we don't have an API endpoint for this. The main ways to do it would be to convert the usage timestamps from the dashboard in to unix timestamps or to filter your request logs (https://dashboard.stripe.com/test/logs) to look for other times that usage was reported for that subscription item
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yeah, i'm just overwriting stuff now
I think we don't expect the dashboard to be used much if at all for this flow. It seems the assumption is that the API is setting this usage and that you would have a record of the timestamps that usage was reported for
Yeah true, but assumptions are never right within coding hahah
There was a bug in the API, so for that reason the usage is incorrect
In your API code or are you saying that the call bugged out on the Stripe side?
In our API
it reported usage incorrect
I finished updating, the usage is correct now
Thanks for the help!
Awesome! Glad you could fix this