#meisei81_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/1224991424945328160
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
Great. Thanks.
You can look at the latest_charge property, it will contain the Charge object, whose created time is the time of the actual payment confirmation.
You could potentially look for the time of the checkout.session.completed event, and check the created time too.
The event's created time is later than the latest_charge created time
event created time: 1711982903
latest_charge created time: 1711982890
The interval between the two is 13 seconds
Yes, it's the time to create and send out the event, I guess.
Here's the thing, our client was paid twice caused by the delay of the checkout session completed event
Do you have any suggestions to avoid this situation?
It depends on how your application is architected.
Allowing only 1 active session per customer would be one solution.
The active session means checkout session? How to implement the only 1 active session per customer?
You can list Checkout Sessions by customer + status: "open".
Happy to help.