#lostuser21_unexpected
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/1381622791442530384
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, an you share the invoice id with me please?
The invoice status is paisd: https://dashboard.stripe.com/test/events/evt_1RY5D4IEslhnjuZ2hkU5DN3v here.
Where are you looking exactly?
yeah, it is paid but the moment i made a api request to fetch subscription, the invoice was unpaid and payment intent was succeded
it might be there for a single moment, but it was there
It looks like the payment intent suceeded, https://dashboard.stripe.com/test/events/evt_3RY5C2IEslhnjuZ20sJVq0JE at 2025-06-09 12:53:53 UTC and the invoice paid event, https://dashboard.stripe.com/test/events/evt_1RY5D4IEslhnjuZ2hkU5DN3v was sent at 2025-06-09 12:53:54 UTC. Why do you make the request to retrieve the subscription instead of listening to the events?
user API was checking subscription status and invoice was open so we wanted to check current state so made a fetch request (webhooks can be missed)
This happened with me again, I thought this was one time issue.
No, instead of fetching the subscription, you'd want to listen to the events.
i make changes through events most of the time,
but if user want to know their current subscription status and subscription is in past_due or incomplete state, i fetch the invoice state. if subscription is active, i don;t fetch it
That makes sense, but why are you fetching the subscription right after you create it though?
Like that would not work for async payment methods where it takes days for the payment to process for instance
Becasue i was using ach and payment was in pending state. now in this case, i am also checking if invoice is paid or not, because we want to provide subscription only if payment is done.
so i wanted to check the current invoice state
the problem was the moment i fetched the state, the payment and invoice states were transitioning
We recommend that you listen to the events: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements#provision-access to provision the subscription instead of fetching the subscription object.
Okay, let me see what i can do