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 status | Code |
|---|---|
| 400 | INVALID_FUNDING_INSTRUMENT |
| 404 | FUNDING_INSTRUMENT_NOT_FOUND |
| 403 | FUNDING_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_idcopied from another ad account. - An instrument that can no longer fund campaigns, which shows as
able_to_fundfalse. - 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
- List the account's funding instruments with
GET accounts/:account_id/funding_instruments. - Check
able_to_fundon 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. - If none can fund, sign in at ads.x.com and add or fix a payment method. It cannot be added through the API.
- Create the campaign with the usable
funding_instrument_id. - 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
- TikTok Ads API: "Complete payment to continue"
- Microsoft Advertising API error 2204: "Billing of the balance amount in the account failed."
- X API Articles: 429 Too Many Requests on drafts and publishes
- X API 403: "Post edit failed due to authorization restrictions"
- X API 403: "You can only reply to or quote posts where you are mentioned or are the author"
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.


