open solid
← Guides

How an AI agent gets paid

An AI agent gets paid the same way a small business does: customers and partners send money to a bank account. The agent needs routing and account numbers of its own that it can paste into a payment processor, an affiliate program, a marketplace or an invoice. On Open Solid, the agent reads those numbers from GET /api/v1/banking. ACH and wire deposits convert and arrive as USDC in the agent's wallet, and the agent confirms the money has landed with GET /api/v1/activity before it spends any of it.

Where agent revenue comes from

An agent that runs a business usually earns in one or more of these ways. Almost all of them pay out to a bank account, not to an API key.

Room for Baby is an example of the affiliate model. It is a free 3D nursery planner that an agent built and markets on its own. The planner is free to use, and the business earns from retail affiliate links. The agent publishes content that links back to the planner, watches which posts lead to affiliate revenue, and pays for the next batch of content from the same wallet and card.

Why the agent needs its own account

If the only bank account available is yours, every payout form becomes a task for you, and the agent's revenue is mixed in with your own money. A dedicated account lets the agent fill in payout settings without asking. It also keeps the business's income and spending in one activity feed you can review.

The account is opened by the human owner. The owner verifies their identity once and completes a short application in the dashboard. The agent can check whether that is still outstanding:

curl https://opensolid.ai/api/v1/kyc \
  -H "Authorization: Bearer $OPENSOLID_API_KEY"

If kyc_verified is false, the response includes a next field with the link the agent should send to its human. The agent must never fill in an identity form itself. How to give an AI agent a bank account walks through the setup.

Step 1: Read the routing and account numbers

Once the account is open, the agent reads its details:

curl https://opensolid.ai/api/v1/banking \
  -H "Authorization: Bearer $OPENSOLID_API_KEY"

The response lists accounts and recent transactions. The account that receives money has "accountType": "onramp", and its bankAccount object contains account_holder_name, account_number, aba_routing_number, bank_name and capabilities (ach and wire).

Those are the numbers the agent enters wherever the business gets paid:

Step 2: Understand how deposits arrive

Money sent to the account by ACH or wire converts to USDC and lands in the agent's wallet. Receiving deposits has no Open Solid fee. ACH typically takes one to two business days. Wires are usually same day.

The payer sees an ordinary US bank account. Nothing changes for a processor, an affiliate network or a customer paying an invoice. From the agent's side, the balance it can spend from is in USDC, a dollar-backed digital currency, so a $250 deposit becomes 250 USDC in the wallet.

Customers and partners who already hold USDC can also pay the wallet directly. There is no fee and no conversion. See Earning revenue.

Step 3: Check that the money has settled

Webhooks are not yet exposed to agents, so the agent polls on a schedule. Two calls tell it what has arrived:

curl https://opensolid.ai/api/v1/activity \
  -H "Authorization: Bearer $OPENSOLID_API_KEY"

curl https://opensolid.ai/api/v1/wallet \
  -H "Authorization: Bearer $OPENSOLID_API_KEY"

/activity returns the 50 most recent events on the account, newest first, in an events array. Each event has a kind, a direction (inflow, outflow or neutral), an amount, a status and a created_at timestamp. Deposits are events with "direction": "inflow". To list only money coming in:

curl -s https://opensolid.ai/api/v1/activity \
  -H "Authorization: Bearer $OPENSOLID_API_KEY" \
  | jq '.events[] | select(.direction == "inflow") | {kind, amount, label, created_at}'

/wallet reports balance_usdc, the total the agent can spend right now. GET /api/v1/banking also lists transactions on the bank account itself, which helps when the agent is matching a specific incoming transfer.

Refunds also arrive as inflows, so the agent should not book every inflow as revenue. Match each deposit against what the agent expected: a processor payout, an affiliate commission, an invoice number.

Step 4: Spend only settled revenue

The most common mistake an earning agent makes is spending money it does not have yet. Processor dashboards show pending payouts, affiliate dashboards show commissions that can still be reversed, and an invoice can be marked "sent" for weeks.

Give the agent one rule:

Money is spendable when it appears in /activity as an inflow and in the /wallet balance. Not before.

In practice:

If the agent does try to pay more than the wallet holds, POST /api/v1/pay returns 402 and nothing is charged. That is a safety net, not a budget. Every outbound payment is also capped by the per-payment spend limit the owner sets, which the agent can read but not change. See Spend limits and guardrails.

A polling routine for the agent

Put something like this in the agent's instructions:

  1. Once a day, call GET /activity and record any new inflow events in the ledger.
  2. Match each one to its source: processor, affiliate program, marketplace or invoice.
  3. Read GET /wallet and take balance_usdc as the ceiling for new spending.
  4. Plan the next spend from settled revenue only, and check the fee-inclusive cost against GET /spend-limit.
  5. For unpaid invoices past their due date, send a reminder that includes the routing and account numbers again.

Common questions

Can the agent receive money before the owner verifies? No. The bank account opens after the owner's identity check and application.

How does the agent know who paid? Match the amount and date against what it expects, and use the bank transactions from GET /banking for the details of a transfer.

Next steps