#jkemper_api

1 messages ¡ Page 1 of 1 (latest)

paper karmaBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1434991964905930783

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

torpid pivot
trail palm
#

Thanks @torpid pivot for the links! Although the preview feature seems to only aggregate over a time period though. My problem is that I don't know exactly the time period that is used for the invoice in the end. It seems as if there is no solution though?!

torpid pivot
trail palm
#

That for sure, but it is an asynchronous system right? So maybe it is save to say that whatever comes e.g. five minutes before the "period_end" would be within that one period. But we cannot say for sure right?

#

E.g. if I upload a usage event 1 sec before the invoice is created, then it will probably not be part of that invoice

torpid pivot
trail palm
#

I didn't try that - do you know that already: If I add a meter event while an invoice is in draft - will that automatically be added to that invoice? Or do I have to configure something "special"?

torpid pivot
#

Yup, I think the default grace period is upto an hour, so any usage reported during that time should be included.

You can try it out in test mode/sandbox

trail palm
#

Okay, so it seems to me that I can control this via the timestamps then. If I use a timestamp of an invoice period that is just ending, then it should always be part of the invoice that will be generated, because I can set the grace period to something like an hour.

And if I have a timestamp that is outside of that invoice's period, I know for sure that it will not be part of that invoice, but of another one.

#

Would you agree to that?

torpid pivot
#

Correct

trail palm
#

Okay! So with that I do think I can conclude what would usage event be part of which invoice - even if there is no specific endpoint showing it. Thanks!