# How AI agents use stablecoins to pay for APIs and services

> AI agents pay for APIs and services by holding funded stablecoin wallets and executing payments inline with HTTP requests — no human approval at each step, no merchant account required. Two open protocols, Coinbase's x402 and Tempo's Machine Payments Protocol (MPP), define the handshake. The agent sends a request, receives a price challenge, signs a stablecoin payment, and retries — the whole exchange fits inside a single HTTP cycle.

5 min read · Updated 2026-06-09 · Topic: use-cases

Canonical: https://tempo.dataos.so/articles/ai-agents-pay-apis-stablecoins

An AI agent running a research pipeline, executing a software deployment, or booking logistics cannot pause to ask a human to approve each API call. The agent needs a payment method that is itself programmable — one it can invoke in milliseconds, at any hour, for amounts that may be fractions of a cent.

Stablecoins, combined with new payment protocols built on top of HTTP, provide exactly that. By mid-2026, two open protocols — Coinbase's x402 and Tempo's Machine Payments Protocol (MPP) — have established a working pattern for how agents pay.

## The core pattern: HTTP 402 as payment challenge

Both x402 and MPP revive **HTTP 402 Payment Required**, a status code defined in 1991 and left unused for decades. In both protocols, the payment handshake works the same way:

1. The agent sends its HTTP request to an API endpoint.
2. If the agent has not paid (or has not opened a session), the server returns `402 Payment Required` with a machine-readable payment challenge: the price, the accepted stablecoin, and the payment destination.
3. The agent — holding a funded wallet — signs a payment and retries the request with the payment credentials in the header.
4. The server verifies the payment and returns the requested resource.

No account. No signup. No prior relationship. The payment is the credential.

## What agents are paying for

The categories of services with active agent payment integrations as of mid-2026:

| Category | Examples |
|---|---|
| AI model inference | Paying per token to call a language model API |
| Data APIs | Per-query pricing for analytics, enrichment, search results |
| Compute | GPU-hour and cloud function invocation billing |
| Developer infrastructure | RPC nodes, blockchain data, code execution |
| Storage and CDN | Per-request access to cached or stored content |

The MPP Payments Directory at **mpp.dev** listed over 100 services at Tempo's mainnet launch on March 18, 2026, with named participants including Alchemy and Dune Analytics. x402 supports a comparable range of API monetization patterns across Base, Polygon, Arbitrum, World, and Solana.

## x402: the per-request model

**x402** launched in May 2025, moved to neutral governance under the Linux Foundation in April 2026, and had processed over 119 million transactions on Base by March 2026. Its model is one payment per request: each API call carries its own stablecoin payment.

The Coinbase-hosted facilitator charges $0.001 per transaction after the first 1,000 free transactions per month. The protocol itself is open and charges nothing; operators can run their own facilitator to avoid the CDP fee entirely.

x402 supports all ERC-20 tokens via Permit2, plus EIP-3009 tokens like USDC natively, across EVM networks and Solana.

## MPP Sessions: collapsing micropayments

For agents making high volumes of small calls — thousands of requests per hour at fractions of a cent each — the per-request on-chain model creates a cost problem. If each API call triggers an on-chain transaction, the transaction fees can exceed the value being transacted on any chain with non-trivial per-transaction costs.

**MPP Sessions** solve this with a voucher architecture. The agent opens a session by depositing funds into an on-chain escrow on Tempo. Each subsequent API call is settled by an off-chain signed voucher — a cryptographic message committing to the cumulative amount spent. The server verifies the voucher signature in microseconds, with no blockchain latency. When the task ends, the server submits the final voucher on-chain. The escrow pays out, and unused funds return to the agent's wallet.

The result: **two on-chain transactions per task**, regardless of how many API calls the agent makes in between.

## How agents hold and manage stablecoin wallets

An agent's stablecoin wallet is a software key pair — a private key that signs transactions and a public address that receives funds. The operator who deploys the agent provisions the wallet, funds it, and sets a spending budget.

Several approaches to key custody are in use by mid-2026:

- **Programmatic EOA wallets** — a standard externally owned account where the agent holds the private key directly. Simple, but the key must be protected at the infrastructure level.
- **MPC wallets** — the private key is split across multiple parties using multi-party computation. No single party holds the full key. Coinbase's "Agentic Wallets" product, launched in early 2026, uses this model.
- **HD wallet derivation** — a single seed generates multiple addresses, letting an operator run many agents from one master key with per-agent subkeys.

Both Coinbase and MoonPay shipped agent-specific wallet infrastructure in early 2026. The operational question — who custodies the keys, how spending limits are enforced, how operators audit spend — is an active area of tooling development.

## USDC as the primary settlement asset

USDC is the dominant stablecoin for agent API payments because it is ERC-20 compatible across every major EVM chain, holds a 1:1 dollar peg backed by cash and short-term Treasuries (regulated under the GENIUS Act, signed June 2025), and is natively supported by both x402 and MPP without conversion steps.

Agents do not experience USDC as a cryptocurrency in the speculative sense. From the agent's perspective, it is spending dollars — specifically, dollar-denominated tokens that settle in under a second for fractions of a cent.

## The economics: why micropayments are viable

Traditional micropayment systems failed on economics. A $0.001 payment processed through a card network incurs interchange, gateway fees, and settlement overhead that can amount to ten times the payment value.

Stablecoin rails change the math. On Tempo, a transaction costs under $0.001 and settles with deterministic finality in about 500 milliseconds. With MPP Sessions, those two on-chain transactions (open and settle) are the fixed cost for an entire agent task, not a per-call variable. An agent making 10,000 calls at $0.001 each pays two on-chain transaction fees — not 10,000.

For a full comparison of the two leading protocols, see [x402 vs MPP](/articles/x402-vs-mpp-machine-payments). For the wallet and key infrastructure that makes this possible at scale, see [The infrastructure behind agentic payments](/articles/agentic-payments-infrastructure).

## FAQ

**How does an AI agent actually pay for an API call?**

The agent holds a funded stablecoin wallet. When it calls an MPP- or x402-enabled API, the server returns HTTP 402 with a price and accepted currency. The agent signs a payment (or a session voucher) and retries. The server verifies and responds. No human is involved.

**What stablecoins do agents use to pay APIs?**

USDC is the most widely supported stablecoin for agent payments. USDT is also supported on some networks. Both MPP and x402 are designed around ERC-20-compatible tokens; MPP also supports cards via Stripe and Bitcoin via Lightning Network.

**What is HTTP 402 and why does it matter for AI agents?**

HTTP 402 is a status code defined in 1991 and reserved for payment use. Both x402 and MPP revive it as the payment challenge signal. A server returning 402 tells a client: access requires payment, at this price, in this currency. Agents can parse and respond to this signal programmatically.

**Do agents need a separate gas token to make payments?**

On Tempo, no. Tempo has no native gas token — fees are paid in the stablecoin itself (TIP-20 standard). On other chains running x402, agents may need a small amount of the network's native token for gas unless the facilitator abstracts that cost.

**What is the MPP Payments Directory?**

The MPP Payments Directory at mpp.dev lists services that accept MPP payments. It launched with over 100 services at Tempo's mainnet in March 2026, spanning model providers, developer infrastructure, compute, and data services.

## Sources

1. [Coinbase — Introducing x402](https://www.coinbase.com/developer-platform/discover/launches/x402)
2. [Tempo — MPP Sessions](https://tempo.xyz/blog/mpp-sessions)
3. [x402 protocol documentation](https://docs.cdp.coinbase.com/x402/welcome)
4. [Tempo — Mainnet launch](https://tempo.xyz/blog/mainnet)
5. [Tempo docs — Machine payments](https://docs.tempo.xyz/learn/tempo/machine-payments)

---
Neutral, sourced explainer from tempowiki. Index: https://tempo.dataos.so/llms.txt
