OpenAny logoOpenAny Blog

x402 and USDC for AI APIs: Shared-Balance Top-Up vs Direct Per-Call Payment

By OpenAny ·

Dark navy 16:9 typography distinguishing shared balance top-up from direct per-call x402, with no logos, fake UI, or photos of people.

Disclosure: this article is written by the OpenAny team, and OpenAny is our product. The payment flows, quote fields, and CLI examples below come from public OpenAny pages reviewed on 19 November 2026 (Asia/Taipei). This draft does not include a live payment or a billed API receipt.

Short answer. x402 is not one product feature. On OpenAny it names two different flows.

The first flow uses x402 — or a card, or a USDC transfer — to credit a shared prepaid balance. After that credit is confirmed, your agent authenticates supported model and data API calls with one OpenAny API key. Usage is deducted from that same balance.

The second flow is direct x402. It pays a specific resource under that endpoint's payment contract. It is available only on listings that explicitly support it. Funding a balance does not enable direct x402 for every catalog item.

If you already hold USDC and do not want a separate card-funded account at every model or data-API vendor, the shared-balance path is the everyday one. Eligible new OpenAny accounts can also receive $0.50 in signup credits, which can be used toward supported calls billed to that balance.

This is a buyer's guide to those flows. It is not a walkthrough of a live wallet payment, and it does not invent a charged-price receipt.

OpenAny is the B2A (business to agent) marketplace. Give your agent 3,200+ APIs and 168+ AI models with one key and pay-per-call pricing. openany.si

The mix-up is usually three questions, not one

“How does an AI agent pay for APIs with x402 or USDC?” sounds like a single question. In practice it collapses three different problems:

  1. How do I add funds — by card, USDC transfer, or x402?
  2. How does my agent authenticate a later call? For ordinary account-based calls, that is an API key.
  3. Can the agent pay that one request directly, without a prepaid balance?

On OpenAny, (1) and (2) are the documented everyday path. (3) exists, but only where a listing explicitly shows direct x402 support. The x402 page (updated 29 October 2026) and the USDC top-up guide (updated 4 November 2026) both draw this line. This article restates it in the order a developer actually hits it: distinguish the flows, read the locked quote, inspect before paying, recover without paying twice, then use the balance with one key.

The protocol piece is simple. x402 uses HTTP 402 Payment Required to communicate payment requirements for a resource. That status code does not, by itself, tell you whether you are funding a shared balance or paying one listing. You have to look at the flow you are in.

Two flows that should not share one sentence

Flow What you pay for How the later call is authenticated When to use it
Shared-balance top-up (card, USDC, or x402) Credits added to one OpenAny balance OpenAny API key; usage is deducted from that balance The usual path for supported models and data APIs
Direct x402 That one resource request The endpoint's verified payment contract — not the OpenAny API key Only where the listing explicitly shows direct x402 support

The OpenAny CLI documents the top-up flow, not direct per-resource x402 execution. A 402 on an ordinary API-key call is not permission to skip key billing, and it is not permission to invent a payment proof.

Card top-ups, USDC top-ups, and x402 top-ups fund the same shared balance. The pricing page also states that card auto top-up and USDC subscriptions fund that same balance. Available payment routes and quotes are shown on the Credits page. Signing in does not authorize payments. Copied commands are not payment approval.

Browsing the catalog, reading the docs, creating an account, and creating an API key are free. No OpenAny subscription is required for standard pay-as-you-go access. Calls are billed at the selected route's published rate and billing unit. A free account or API key does not include free resource usage unless an explicit trial or promotion says so. The $0.50 signup credit is that kind of promotion: “Eligible new accounts can receive $0.50 in signup credits. You can use the credits toward supported calls billed to your OpenAny balance.”

Read the locked quote as three amounts

Start with the account, not the wallet signature. Confirm which OpenAny account will receive the credit, and that the API key your agent will use belongs to that same account. A connected payment wallet is not automatically the account your application bills.

An estimate is not the locked order quote. Inspect the options currently offered for your identity, then read the quote that is locked for the order you are about to pay. The documented quote fields are:

Quote field Meaning
payAmountMicroUsd Amount you actually pay, in micro-USD
feeAmountMicroUsd Fee quoted for this order, in micro-USD
creditAmountMicroUsd Amount expected to reach the shared balance, in micro-USD
inputAmountMeaning Whether the amount you entered has the fee added on, or deducted from the credit

Those fields describe quote semantics, not a live fee. The official guide uses illustrative $10 amounts to explain the two meanings of the input:

  • Under add_on, entering $10 can credit $10 while requiring an additional fee on top of the payment.
  • Under deduct_from_credit, a $10 payment credits less than $10 after the fee.

Do not treat those $10 figures as a current quote, and do not silently increase a payment to force a chosen net credit. Wallet, network, or funding fees can also change the total. OpenAny's public pages do not publish a universal top-up fee. If quote details are missing, contact support before paying.

Use only the asset, token contract, network, recipient, and amount on the current locked quote. Do not infer an asset from a chain name. USDC and USDT are not interchangeable, and the same token on a different network is not the same payment route. Never send funds to an address copied from a documentation example.

The published CLI instructions list Base (eip155:8453) and Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp) for email-identity top-ups. Wallet-identity support follows the service's published EVM network configuration. That is not a guarantee that every network is enabled for every account.

Inspect before you pay

The x402 page documents two inspect commands. They only read configuration and request an estimate. They do not authorize a payment, create a payable intent, or credit a balance.

# Read configuration only; this does not create or pay for an order.
openany topups config -j

# After authorized email login, request an estimate (not a payment).
# Use Base only if the current configuration offers it for your account.
openany topups quote --amount-usd 1 --network eip155:8453 -j

These examples are taken from the public docs. This article does not include live command output, because no funding session was run while writing it. Use Base in the second command only if the current configuration offers it for your account.

The official inspect-before-pay sequence is:

  1. Inspect payment options on the Credits page or with topups config. Confirm the account to credit, and the networks and assets currently offered for that identity.
  2. Review the locked quote: asset, network, recipient, expiration, total payment, fees, and net credits.
  3. Authorize within a budget. Approve the specific payment, or an explicitly bounded policy, before signing.
  4. After payment, keep the original intent and order reference, and check status until payment and credit are both confirmed.

If an agent assists with funding, it needs an explicit policy first: target identity, network, per-payment maximum, total maximum, purpose, and expiration. A low balance is not permission to recharge. The CLI's topups authorize records authorization already given; it does not create consent.

The official USDC guide also shows topups create and topups pay as an illustrative sequence, with example $10 amounts, and says those commands are not an instruction to execute them now. This article does not run them, and it does not reproduce a payment sequence for you to paste into an autonomous loop. Follow the current authorized workflow on the public guide and the instruction files linked from the docs (SKILL.md, AUTH.md) when you are actually funding an account.

Recover without paying twice

Do not treat a wallet signature, a submitted transaction, or a “payment confirmed” toast as a usable balance. Payment, credit, and usability are separate states.

Report funds as credited only after paymentStatus=paid and creditStatus=credited. For wallet identity, also require accountUsable=true. Signing and credit are not interchangeable.

If a submitted payment times out, or the result is unclear, keep the original intent and order reference and inspect that order (openany topups get). Do not pay again. Do not create a replacement intent. Do not change the amount and retry. An uncertain response can hide a payment that already succeeded.

That recovery rule is the one that prevents a double top-up. Idempotency here is a habit, not a slogan: one intent, one order, status checks against that same reference until the states above are confirmed or you have enough information to contact support with the original reference.

Then use the balance with one key

After the credit is confirmed, resource calls are a separate, budgeted step. Set OPENANY_API_KEY in the client environment or a secret store — never in a prompt — and use the model API base https://api.openany.si/v1. Authentication is Authorization: Bearer <OPENANY_API_KEY>.

Copy the current model ID from its listing. Do not assume an older example ID is still available. The docs' Chat Completions smoke test looks like this (replace MODEL_ID_FROM_LISTING first, and check the listing price before you approve the call):

curl --fail-with-body --silent --show-error \
  https://api.openany.si/v1/chat/completions \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MODEL_ID_FROM_LISTING",
    "messages": [{
      "role": "user",
      "content": "Reply with exactly: OpenAny connected"
    }],
    "max_tokens": 32
  }'

A successful test is HTTP 2xx with non-empty choices[0].message.content. Then check Usage for the recorded units and charge. When a list price and the amount actually charged differ, use the charged amount. This article does not include a receipt, because no billed call was completed while writing it. If a live call has not run, the honest status is “configured; live verification pending.”

The same key and balance also cover supported data APIs. Direct x402 calls, where a listing supports them, use an authorized payment instead of an OpenAny API key.

This article is about buying calls, not about selling them. One execution detail is still worth stating accurately: a downloadable or portable skill runs in the buyer's agent; a callable skill or bot runs in the seller's environment. OpenAny does not host the seller's runtime. A skill file alone does not create API access.

As of 19 November 2026, the published homepage FAQ listed 159 models, 3,299 API endpoints, and 68 provider identities. Those counts describe listings, not runtime verification. In the standard product description, OpenAny is still described as 168+ models and 3,200+ APIs.

What this article is not claiming

  • It does not claim that every OpenAny listing accepts direct x402 payment.
  • It does not claim that every network is enabled for every account.
  • It does not publish a fee rate. Read the quote in front of you.
  • It does not walk through a live wallet payment or attach a billed usage receipt.
  • It does not treat a documentation example address, asset, or amount as a payable destination.

FAQ

Is an x402 top-up the same as paying an API request directly?

No. A top-up credits the shared balance. Ordinary calls then use an API key. Direct x402 pays for a specific resource under that endpoint's payment contract, and only where the listing shows it.

Does signing in my wallet prove the balance was credited?

No. Wait for paymentStatus=paid and creditStatus=credited. Wallet identity also requires accountUsable=true.

Should I retry a payment after a timeout?

No. Keep the original intent and check its status. An uncertain response can hide a payment that already succeeded.

Do I need a subscription?

No OpenAny subscription is required for standard pay-as-you-go access. Add prepaid credits (card, USDC, or x402) and pay for recorded usage. Card auto top-up and USDC subscriptions, when offered, fund the same balance; inspect the current Credits page and the locked quote before paying.

Can I try this before a first top-up?

Eligible new accounts can receive $0.50 in signup credits. That is a promotion, not a standing “every call is free” policy. Check the current Credits page and listing price before you call.

Which network and asset should I use?

Use the network, asset, recipient, and amount in the current locked payment quote. Inspect the options in Credits or openany topups config. Never infer support from a chain name, and never send funds to an example address.

Where to read the primary sources

If you list an API yourself, payouts to vendors are a separate topic. This article is about buying calls, not about selling them.

OpenAny is the B2A (business to agent) marketplace. Give your agent 3,200+ APIs and 168+ AI models with one key and pay-per-call pricing. openany.si