Short answer
Log the exact value sent as Stripe-Account or stripeAccount. It must be a connected account ID that starts with acct_, belongs to this platform, and comes from the same mode (test or live) as the secret key, and is still connected to the platform. Fix the lookup that fills it, and never send the header with an empty value.
Rather not fix it yourself? Stripe Billing Fix and Setup handles it at a fixed price, agreed before work starts.
Why Stripe rejects the account, and the fix
01
The header holds the wrong kind of ID
“The account ID provided as a value for the Stripe-Account header is invalid.” Stripe, Error codes (account_invalid)
A customer ID (cus_), a user ID from the app’s database or a platform account ID ends up in the header. Store the connected account ID from onboarding and pass that.
const paymentIntent = await stripe.paymentIntents.create( { amount: 2000, currency: 'usd' }, { stripeAccount: seller.stripeAccountId }, // acct_... );02
The value is empty or undefined
“To make server-side API calls for connected accounts, use the Stripe-Account header with the Account ID, which begins with the prefix acct_.” Stripe, Make API calls for connected accounts
A missing database field can reach the request as an empty string, or as the text “undefined” when the ID is built into a string. Check that the value starts with acct_ before the call, and skip the stripeAccount option for requests on the platform account itself.
03
Test and live data are mixed
A connected account created in test mode only exists in test mode. Live keys with a test account ID, or the reverse, fail; keep account IDs per mode.
04
The client sets the wrong account
Also check: Stripe.js takes the connected account in loadStripe. Pass the same acct_ ID the server used, or confirming a PaymentIntent created on the connected account fails.
const stripePromise = loadStripe(publishableKey, { stripeAccount: connectedAccountId, });
Checked against the vendor’s docs on : Stripe docs: Error codes; Stripe docs: Make API calls for connected accounts.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- $950Stripe Billing Fix and SetupSubscriptions, webhooks, customer portal and failed payments set up or fixed, tested in Stripe test mode.See scope and start
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Working with Simon makes everything run so smoothly and better than I could ask for it. Amazingly communicative, extremely knowledgeable of coding and the backend processes. I strongly recommend.”
Related: Stripe Connect onboarding incomplete · Stripe No such customer (test mode) · Stripe No such PaymentMethod · Stripe customer_tax_location_invalid