#anubhavshakya

1 messages · Page 1 of 1 (latest)

lost briarBOT
floral cape
#

You'd manually amend the invoice/items after creation but before it's finalised

real prairie
#

I am not able to change the amount

#

and this invoice is still in draft mode

floral cape
real prairie
#

is there any other solution ? can I reset the reported usage so that invoice can be zero

floral cape
real prairie
#

I have tried this, this is not working. I mean when I use set then it behave same like increament

floral cape
#

Hmm, it's likely that the timestamp you're passing is outside of the billing period for the invoice

real prairie
#

I have reported lot of usage using increment so how to set total_usage to zero. and I do not have timestamp, I will use this with the api. should I fetch the all usage ? if yes then where I can find timestamp so that I can mark zero

floral cape
#

You need to pass a timestamp when creating the Usage Record that is within the billing period of the invoice you want to change

lost briarBOT
real prairie
#

I have tried the timestamp between the start and end of billing cycle but it is not working...

floral cape
#

And the Invoice ID (in_xxx)

real prairie
#

This is subscription item id "si_PAr0X3skkjvjYH" for which I am reporting the usage

glad cobalt
#

👋 stepping in

floral cape
#

I'm not seeing a $220 invoice (from your screenshot) on that sub?

real prairie
#

both are different sorry, but I have reported the usage for this subscription

glad cobalt
#

So the simplest thing to do here is to create a fresh test Subscription and create one usage record and then test setting that one usage record to 0

#

Do this in sequential API requests so you can easily look at the behavior

real prairie
#

okay

#

Okay, it is working.... now I understand that I have to pass same timestamp to set or increment.

#

Can I get that timestamp in the usage summaries ? because it will be helpful for implementation using api

glad cobalt
#

No that's not possible

#

You need to keep track of these timestamps on your end when you create the usage records