#phillip_api

1 messages ยท Page 1 of 1 (latest)

unreal tigerBOT
#

๐Ÿ‘‹ 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/1292817864708853844

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

rich folio
#

Sorry, hit the character limit.

Then I use a test clock to advance time.

The meter is linked to a subscription.

But the created invoice does not contain the amount of the meter event. I've transferred the value 5356 previously.

pallid badge
#

hi there!

rich folio
#

So it looks like my meter is not connected to the price. What am I missing? :/

pallid badge
#

can you share the Invoice ID (in_xxx)?

#

or the Subscription ID (sub_xxx)?

rich folio
#

in_1Q7FN4EQTxIQh7eR50uINLlu

#

sub_1Q7FLyEQTxIQh7eRIgN0iVGI

pallid badge
#

thanks! give me a few minutes to look into this.

rich folio
#

Sure! I appreciate it @pallid badge

pallid badge
#

the Customer has a Test Clock set to October 28. but the meter event you sent have a timestamp for today. maybe that's causing the issue? not sure how Test Clock work with Meters.

rich folio
#

Oh, yes this could be an issue.

In a case without a test clock however, this would be correct?

timestamp: Math.floor(Date.now() / 1000) // Current time in seconds since Unix epoch

Or is there a way how I can simply pass the timestamp from the webhook (I'm using the invoice.created webhook) which hopefully would use a timestamp of the test clock?

pallid badge
rich folio
#

I removed the timestamp and it worked ๐Ÿ™ Thank you very much

#

This value will reset every week, right?

So when a create another meter event next week and pass 20 for example, it will use 0,20โ‚ฌ for the next invoice?

pallid badge
#

I removed the timestamp and it worked ๐Ÿ™ Thank you very much
perfect!

#

So when a create another meter event next week and pass 20 for example, it will use 0,20โ‚ฌ for the next invoice?
I'm not sure what you mean by this.

rich folio
#

Nevermind, I just tested it out ๐Ÿ™‚ Thank you, that's all I needed ๐Ÿ™

pallid badge
#

happy to help ๐Ÿ™‚