X Ads API: INVALID_FUNDING_INSTRUMENT and FUNDING_INSTRUMENT_NOT_FOUND

X Ads campaigns need a funding instrument that can actually pay. When the account has none, or the one you named is unusable, X returns one of three codes, and one of them looks like a missing object.

Start free →

Made with Hermoso

Every X Ads campaign is tied to a funding_instrument_id. If the ad account has no working payment method, campaign creation fails with a funding code. X publishes the codes and their HTTP statuses, but no message text per code, so your error handling has to work from the code.

The exact error

From X's error codes table:

HTTP statusCode
400INVALID_FUNDING_INSTRUMENT
404FUNDING_INSTRUMENT_NOT_FOUND
403FUNDING_INSTRUMENT_EXCEEDS_AVAILABLE_CREDIT_LIMIT

They arrive in X's standard error envelope:

{
  "errors": [{
    "code": "INVALID_FUNDING_INSTRUMENT",
    "message": "..."
  }],
  "request": { "params": { "account_id": "..." } }
}

What it means

The ad account cannot fund this campaign. Either it has no payment method, the instrument you named is not valid for the account, or its credit line is used up. Your OAuth connection and your request shape are fine.

X publishes the code and the status for each case but no message text, so the message field is not something to match on. Branch on errors[].code.

Watch the statuses. FUNDING_INSTRUMENT_NOT_FOUND is a 404, so generic handling reports "object not found", and the credit limit code is a 403, so generic handling reports "permission denied". Both are billing problems.

Why it happens

  • A new ad account where nobody added a card on ads.x.com.
  • A funding_instrument_id copied from another ad account.
  • An instrument that can no longer fund campaigns, which shows as able_to_fund false.
  • A credit line whose available credit is spent.

Two related codes mean the account itself is blocked: ACCOUNT_LOCKED_OUT and CURRENT_USER_SUSPENDED, both 403. Those are cleared only on ads.x.com, not through the API.

How to fix it

  1. List the account's funding instruments with GET accounts/:account_id/funding_instruments.
  2. Check able_to_fund on each. Pick one that is true. X does not publish the full list of reasons an instrument cannot fund, so do not hard-code one.
  3. If none can fund, sign in at ads.x.com and add or fix a payment method. It cannot be added through the API.
  4. Create the campaign with the usable funding_instrument_id.
  5. For a lockout or suspension, sign in at ads.x.com, where X shows the reason and the appeal route.

How Hermoso handles it

Hermoso classifies these by code before it looks at the HTTP status, so a missing payment method is never reported as "not found" or "no permission". The message says the X ad account has no usable funding instrument, that your X Ads connection is fine, and that a payment method has to be added at ads.x.com, because Hermoso cannot add one for you.

Hermoso can list the account's funding instruments and whether each can fund a campaign, so you pick a working one before building. Lockouts and suspensions get their own message pointing to ads.x.com, with the note that reconnecting cannot lift them. See the X Ads channel.

Related

Every platform error we have documented is on the error reference. For app reviews and access levels, see how to get API access.

Sources

Frequently asked questions

What does INVALID_FUNDING_INSTRUMENT mean in the X Ads API?

The funding instrument on the campaign cannot pay for it. List the account's funding instruments and use one where able_to_fund is true.

Why does X return 404 FUNDING_INSTRUMENT_NOT_FOUND?

The instrument id does not exist on this ad account, often because it was copied from another account. It is a billing setup problem, not a missing campaign.

Can I add a payment method through the X Ads API?

No. Payment methods are added at ads.x.com.

Skip the error hunting: connect your accounts to Hermoso free, no card.

Start free →   See pricing