4Mica lets you give an AI agent money without giving it unlimited trust. You fund a wallet, define what the agent is allowed to pay for, and keep a record of every paid request so spending stays visible, bounded, and auditable.
What you control
When an agent can spend, the important question is not just “can it pay?” It is “can it pay within the rules I set?”
You should control:
which wallet funds the agent;
which networks and assets it can use;
which sellers, agents, or domains it can pay;
how much it can spend per request, task, route, or time window;
whether larger payments require approval;
when the agent should stop, ask for help, or choose a cheaper option;
how payments connect to task logs and delivered results.
4Mica provides the payment path. Your agent policy decides when a payment is allowed.
Set up your agent
Create a dedicated wallet
Use a wallet for the agent or application, not your main wallet. Keep automated signing separate from personal funds.
Deposit collateral
Deposit ETH or a supported ERC-20 into 4Mica on the network your target sellers accept.
Register the client scheme
Configure the 4Mica client for each network the agent may use.
Define spending policy
Set limits for amount, seller, route, network, task, time window, and approval requirements.
Make paid requests
Use a wrapped HTTP client so the agent can handle paid resources while Your policy decides which payments to sign.
Audit the task
Record each payment with the seller, route, amount, reason, guarantee ID, request ID, and task result.
When you are ready to create the wallet and policy, continue in the dashboard .
Make a Paid Request
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch" ;
import { FourMicaEvmScheme } from "@4mica/x402/client" ;
import { privateKeyToAccount } from "viem/accounts" ;
const account = privateKeyToAccount ( process . env . PRIVATE_KEY as `0x ${ string } ` );
const scheme = await FourMicaEvmScheme . create ( account );
const fetchWithPayment = wrapFetchWithPaymentFromConfig ( fetch , {
schemes: [{ network: "eip155:84532" , client: scheme }],
});
const response = await fetchWithPayment ( "https://api.example.com/data" );
const data = await response . json ();
Start on Base Sepolia (eip155:84532) with small amounts. Move to production only after limits, logs, and withdrawal checks are routine.
Before the agent pays
Your agent should inspect the seller’s payment requirements and decide:
is this seller or domain allowed?
is the price within budget?
is the network and asset allowed?
does the payment match the task?
does the agent need human approval first?
should the agent continue, stop, or choose another seller?
For cost controls, see Budgets and Spending Limits .
If a payment requirement looks suspicious or hard to classify, send the details to support before allowing the agent to sign.
After the agent pays
Every paid request should produce a record that explains what happened:
which agent paid;
which seller received the payment;
how much was authorized;
why the payment happened;
which task or request it belongs to;
what result came back;
whether the guarantee or settlement obligation is still open.
For audit trails, see Payment Proof and Audit .
Use the activity view in 4mica app to compare the payment trail with your task logs.