#brdata_unexpected

1 messages ยท Page 1 of 1 (latest)

silent stirrupBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1255172363767779493

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

novel mangoBOT
mint socket
#

Hi there ๐Ÿ‘‹ I'm not exactly sure offhand, can you tell me more about how you're making the request you are via the CLI? Are you explicitly providing an API key that should be used for that request via the api-key option and/or using the stripe-account option to make the request for a Connected Account.

arctic charm
#

I go into CMD and navigate to where stripe.exe is

#

I type: stripe login

#

It provides me with a link and I go to that link and click on my account in the dropdown and hit login and get this:

mint socket
#

Hhmm, did you recently update the version of the CLI you're using? I believe I've heard some folks are running into issues logging in with one of the newer versions.

arctic charm
#

But on the CLI in CMD I get this error: C:\Users\Desktop>stripe login
Your pairing code is:
This pairing code verifies your authentication with Stripe.
Press Enter to open the browser or visit https://dashboard.stripe.com/stripecli/confirm_auth?t= (^C to quit)unexpected http status code: 400 {"error":{"message":"The livemode of the authorization key you provided does not match that of the key provided in the Stripe-Account header.","message_code":"stripe_account_livemode_mismatch"}}

#

I used a old version and I just downloaded the new version and got the same error

mint socket
#

What version were you using initially when you encountered the error, and what version did you update to that is also seeing that?

arctic charm
#

1.17

#

1.20

mint socket
#

Thank you, and what is the ID of the Stripe Account you're trying to log into with the CLI? It should have an acct_ prefix.

arctic charm
#

Where can I find that on the dashboard?

mint socket
arctic charm
#

acct_1N5blfEVoNb8mE92

mint socket
#

Hm, I believe the problem here is that you're trying to authenticate to a testmode only Connected Account.

#

Are you able to use the CLI to authenticate if you're logged into your Platform account instead?

arctic charm
#

Yes when I try to login to the accoutn called testingmain then it works

#

But in the past ive logged into the brdata account and that is where I do all my testing

mint socket
#

I can't say I've ever tried that offhand, but the CLI can make both live and testmode requests so I wouldn't be surprised if it has trouble logging into a testmode only account like that one. I'll poke around a bit to see if my assumption here is correct, or if you should be able to do what you're trying.

In the meantime, when you're logged into the dashboard as the Connected Account, do you see this icon near the bottom right of every page?

arctic charm
#

yes

mint socket
#

If you click on that, it should open the Stripe Shell, which is our version of the CLI that is built into the dashboard. It can't quite do everything the CLI can, but it may allow you to do what you're trying via the CLI from your browser.

arctic charm
#

Only problem is my webhook is localhost

mint socket
#

Oh, this is for testing receiving Events from your Connected Accounts?

arctic charm
#

yes

mint socket
#

Gotcha, several things I'd recommend doing differently then, since you shouldn't assume the endpoint you need exists on the Connected Account.

You should listen to those Events from your Platform account, so you should be authenticating to the CLI as your Platform account.
When forwarding Events with stripe listen you'll want to use the forward-connect-to option to forwared Events from your Connected Accounts:
https://docs.stripe.com/cli/listen#listen-forward-connect-to

When you create the actual webhook endpoint that will receive those Events, you should create it as a Connect webhook endpoint rather than an Account one:
https://docs.stripe.com/connect/webhooks

arctic charm
#

Awesome ill give it a try

#

thanks again for your time and help

mint socket
#

Any time!