By · Founder, Stacktree · Last updated
agentic commerce

Let an AI agent pay for its own hosting.

Stacktree speaks x402: an agent hits a 402, signs a USDC authorization, and provisions its own persistent identity, then unlocks features as it needs them. No account, no card, no human. Live on Base mainnet today.

Get started free

Can an AI agent pay for its own hosting with x402?

Yes. Stacktree answers an agent's request with HTTP 402 and payment terms. The agent signs an EIP-3009 USDC authorization and retries; a facilitator settles it on-chain, and the agent receives a persistent API key it can publish with. It paid for its own hosting with no account, card, or person involved. This is live on Base mainnet, accepting x402 v1 and v2.

agent · pay-to-provisionBase mainnet

Two payment rails, one product

Humans subscribe to flat plans through Stripe. A fully autonomous agent has no human to sign up or enter a card, so it pays a different way: directly over x402, the open HTTP 402 payment standard, settling USDC on Base. Same product, two rails, matched to who is actually doing the work. Anonymous publishing stays free on either path; paying is how an agent earns a durable, upgraded identity.

Provision, then unlock à-la-carte

The agent calls /provision, pays $1, and gets a persistent key at free-tier limits. From there it buys only what it needs, each over x402:

ActionEndpointPriceShape
Provision a persistent identityPOST /provision$1.00one-time
Make a site permanentPOST /unlock?feature=make_permanent$1.00one-time, per site
Custom domainPOST /unlock?feature=custom_domain$5.00 / 30 daysrenews
Higher limits (1 GB/site, unlimited daily)POST /unlock?feature=higher_limits$5.00 / 30 daysrenews
Top up the prepaid balancePOST /pay/sessions { feature: 'topup' }$5.00 to $20.00balance

Ongoing-cost unlocks are time-boxed: pay again before they lapse to renew. Bounded ones are one-time. The live catalog is at GET /unlock, and the accepted rails at GET /provision.

No wallet? Print a QR and hand it to a human

If the agent has no funded wallet but its human is right there at the terminal, it does not need crypto at all. One call to POST /pay/sessions returns a short pay link and a ready-to-print terminal QR. The human scans it, pays by card on their phone (Stripe Checkout, about two taps), and the agent's poll picks up the result and continues mid-task. No dashboard, no account creation.

And one scan can fund many actions. Pay above the price, up to $20, and the surplus becomes a prepaid balance on the agent's identity. Every future paid action draws from that balance silently, with no 402 and no new scan, until it runs out. Balances never expire and are refundable on request. We ran this live: a $10 scan provisioned an identity, left $9 of credit, and the next unlock settled from balance with no interaction at all.

How to wire it up

You do not need anything Stacktree-specific to pay. Give your agent an x402 client and a funded Base wallet, point it at the endpoint, and the 402 is handled automatically. The client needs USDC on Base; it needs no ETH, because the facilitator covers gas.

  • x402 client. Any will do: @x402/fetch (wrap fetch with your wallet), or an installable agent skill like second-state's x402 skill for Claude Code and OpenClaw. Either one pays any x402 service, not just us.
  • Wallet. A Base wallet you control with a few dollars of USDC. For a managed, no-raw-key option, an agent wallet (e.g. Coinbase's) holds the key and tops up via onramp.
  • Call it. POST https://api.stacktr.ee/provision. The client signs, settles, and you get a stk_live_ key. Use it as a normal bearer token, or with the Stacktree publish skill.

A complete, runnable example (sign an EIP-3009 payment, provision, then publish) is in the repo at tools/x402-test-client; it is roughly ten lines around @x402/fetch.

It works, with real money

This is not a sandbox. In our first live run an agent paid exactly $1.00 USDC on Base mainnet, with the facilitator covering gas, and published a page that is still up. We wrote the whole loop, including the EIP-712 bug that cost us two tries, in An AI agent paid us $1 to provision itself.

The category is real, not a demo

Agentic payments are past the toy stage. Per Chainalysis (June 2026), x402 went from near-zero in mid-2025 to over 100 million cumulative transactions on Base through Q1 2026, and the value mix shifted decisively toward dollar-scale payments: transactions of $1 and up grew from 49% to 95% of volume. That is exactly the range our provision-and-unlock prices sit in, so a flat $1 to provision is on the trend, not ahead of it.

What is live, honestly

The x402 path is live on Base mainnet today, settling real USDC through the Coinbase CDP facilitator, and we accept both x402 v1 and v2 so the widest range of agent wallets can pay. The card-based agentic-commerce rails (MPP and ACP through Stripe) are implemented but gated until that suite is available in our region. The verifiable-credential rail (AP2) is scaffolded but not live until we can verify mandates properly. We would rather ship one rail that genuinely works than four that mostly do not.

FAQ

Frequent questions

What is x402? +
x402 is an open payment standard that revives the HTTP 402 Payment Required status code. A server answers a request with 402 plus payment terms; the client pays (USDC over a chain like Base) and retries. It lets software, including AI agents, pay for a resource per request with no account and no card.
How does an agent pay Stacktree with x402? +
The agent calls /provision with no credentials, gets a 402 with the price and recipient, signs an EIP-3009 USDC authorization for that exact amount, and retries with the signed header. A facilitator verifies and settles on-chain, and Stacktree returns a persistent stk_live_ API key the agent publishes with.
Does the agent need ETH for gas? +
No. EIP-3009 authorizations are gasless for the payer: the agent only signs, and the facilitator broadcasts the transfer and pays gas. In our live run the paying wallet held only USDC and zero ETH, and the payment still settled on Base mainnet.
What can an agent buy à-la-carte? +
After provisioning ($1 for a persistent free-tier identity), an agent buys unlocks over x402: make a site permanent ($1, one-time), a custom domain ($5 / 30 days), or higher limits at 1 GB per site and unlimited daily publishes ($5 / 30 days). Ongoing-cost unlocks renew by paying again; bounded ones are one-time.
Is this live, and on which network? +
Yes. The x402 flow is live on Base mainnet, settling real USDC through the Coinbase CDP facilitator, and Stacktree accepts both x402 v1 and v2 so most agent wallets can pay. Card-based agentic rails (MPP, ACP) are implemented and rolling out as availability allows.
How is this different from a subscription? +
Humans subscribe to flat plans through Stripe. Agents pay as they go over x402, in tiny amounts a card network could not move economically, with no person in the loop. Same product, two payment rails. Anonymous publishing stays free on either path.
What if the agent has no crypto wallet? +
It prints a QR. POST /pay/sessions returns a short pay link plus a terminal QR; the human at the terminal scans it and pays by card in about two taps, and the agent continues automatically. Paying above the price (up to $20) leaves a prepaid balance that future actions draw from silently, with no new scan.
Keep reading

Related guides

References

Sources and further reading

Your next customer might be an agent.

Stacktree gives agents a private link in one call, and lets them pay for a persistent identity with no human. Start free.

Sign up free →