#brdata_unexpected
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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.
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:
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.
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"}}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I used a old version and I just downloaded the new version and got the same error
What version were you using initially when you encountered the error, and what version did you update to that is also seeing that?
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.
Where can I find that on the dashboard?
I think near the top right of this page:
https://dashboard.stripe.com/settings/update/public/support-details
acct_1N5blfEVoNb8mE92
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?
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
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?
yes
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.
Only problem is my webhook is localhost
Oh, this is for testing receiving Events from your Connected Accounts?
yes
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
Any time!