#linqisnice_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/1225756245839974481
๐ 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.
- linqisnice_best-practices, 1 day ago, 12 messages
- linqisnice_best-practices, 1 day ago, 14 messages
hi there!
hello!
the event ID you shared does exist
but I'm guessing it belongs to a different account than the one you are using with the Stripe CLI
im having some annoying, persistent issues with webhooks and multiple environments. We have preprod and prod, and since I'm currently running test on both prod and preprod, things got really strange as even if I had an environment variable dynamically change the webhook secret key, it will throw exceptions or even worse, manipulate the wrong data in the database belonging to that environemnt
so i created another stripe account
and my stripe class accesses the API key based on the environment of that app service (we've set the api keys as env variables in azure)
Is it because it's a connected account?
that this happens?
If so, how can i resend the event?
first, you can run stripe login to make sure the CLI is connected to the correct Stripe account.
and if you want to resend an event on a connected account, there's the --acount flag: https://docs.stripe.com/cli/events/resend
I just checked the event you shared. the paltform account is acct_****HmraZ, and the connected account is acct_****mjMT
yes, ok that worked. But it's not triggering the breakpoint for some wweird reason, lemme retry
Btw, is there any other way to deal with the issue i described above?
or do i just need two different accounts like this?
a single Stripe account will give you two sets of API keys: test mode and live mode. so if you only need prod and preprod, you should be able to use a single Stripe account (prod = live mode, preprod = test mode). If you need more than 2 environments, then yes you would need more Stripe accounts.
got it, then you need two Stripe accounts yes.
gotcha, and if the failure is due to incorrect secret, is that evident from the dashboard when i look at the failed events?
it depends on how you coded your webhook endpoint. usually if you are using the wrong secret, the then signature verification will fail, and your server will return a 500 error to Stripe. so in Stripe dashboard you would see a 500 error.
can yo usee more specifically what (if any) internal stripe error caused the exception?
im now suspecting its a version mismatch
since im using an old account, which seems to have an older version
and i just got this exception in the cli
which exeption? can you share a specific event that failed?
evt_1P29h52eqw4AmjMTWb8vkD35
๐ taking over for my colleague. Let me catch up.
I just upgraded the API version and resent, and i still get the error. im assuming that the event was created in an old version
and thus cant be resent even though the API version has now been upgraded?
that's correct
Ok but then what happens with that account link when I open the account link again, and then confirm
it didnt even trigger a new event
onboarding link
for connected accounts
you can see the API version on the event object (e.g. https://dashboard.stripe.com/test/events/evt_1P29h52eqw4AmjMTWb8vkD35)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
if there's nothing changed there won't be a new event triggered
ah ok, I guess it's bad of me to set charges enabled etc in the webhook then as opposed to immediately when the account is created
anyway, thanks a lot for the help, it makes sense now
let me know if you need any more help