#phillip_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
- phillip_api, 3 days ago, 28 messages
- phillip_ubb-upcoming, 4 days ago, 16 messages
- phillip_code, 5 days ago, 22 messages
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.
hi there!
So it looks like my meter is not connected to the price. What am I missing? :/
thanks! give me a few minutes to look into this.
Sure! I appreciate it @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.
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?
In a case without a test clock however, this would be correct?
yes, or you can simply not pass this parameter at all, and it will default to the current time. this is explained here: https://docs.stripe.com/api/billing/meter-event/create?lang=node#create_billing_meter_event-timestamp
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?
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.
Nevermind, I just tested it out ๐ Thank you, that's all I needed ๐
happy to help ๐