#linqisnice_unexpected

1 messages ยท Page 1 of 1 (latest)

hardy oreBOT
#

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

runic hillBOT
#

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.

junior oriole
#

hi there!

jade surge
#

hello!

junior oriole
#

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

jade surge
#

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?

junior oriole
#

first, you can run stripe login to make sure the CLI is connected to the correct Stripe account.

jade surge
#

yes but how do I know which account that is?

#

if all I do is rn stripe login

junior oriole
#

I just checked the event you shared. the paltform account is acct_****HmraZ, and the connected account is acct_****mjMT

jade surge
#

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?

junior oriole
#

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.

jade surge
#

but in our case, we haven't gone live on one of them yet

#

so we have two test modes

junior oriole
#

got it, then you need two Stripe accounts yes.

jade surge
#

gotcha, and if the failure is due to incorrect secret, is that evident from the dashboard when i look at the failed events?

junior oriole
#

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.

jade surge
#

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

junior oriole
#

which exeption? can you share a specific event that failed?

jade surge
#

evt_1P29h52eqw4AmjMTWb8vkD35

hardy oreBOT
jade surge
lethal wolf
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

jade surge
#

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?

jade surge
#

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

lethal wolf
lethal wolf
jade surge
#

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

lethal wolf
#

let me know if you need any more help