Skip to content

Stripe Connect errorStripe Connect: account_invalid

account_invalid is the Stripe error for a request whose Stripe-Account header holds an invalid account ID. Connect platforms send that header to act on behalf of a connected account.

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

  1. 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_...
    );
  2. 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.

  3. 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.

  4. 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.

“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.”
A buyer in the United States, January 2026. App development on Fiverr
All 127 Fiverr reviews

Related: Stripe Connect onboarding incomplete · Stripe No such customer (test mode) · Stripe No such PaymentMethod · Stripe customer_tax_location_invalid

Questions

More on this error

Is account_invalid an API key problem?

Stripe’s error docs point at the account ID in the Stripe-Account header. Check the key, the mode and the acct_ ID together, since the key must belong to the platform that owns that connected account.

Do requests in the URL need the header?

No. Stripe says the header is implied when the request URL already includes the account ID, such as retrieving an account.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. 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.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.