
Product
Get paid by AI agents, with cards or USDC
Anh-Tho Chuong•Dec 3•6 min read

Lago lets you sell API calls, data and inference to AI agents. It connects authentication, budgets and contract terms to usage metering, pricing and payments. Lago supports both Stripe Shared Payment Tokens (SPTs) and x402 payments:
An agent might need one data lookup to finish a report. That lookup could be worth half a cent. Selling it means being able to quote a tiny price, collect payment cheaply and let the agent continue its work.
x402 puts the payment instructions in the API response. A compatible agent with funds and permission to spend can read the offer, authorize payment and continue its request. The purchase happens inside the AI agent's workflow. How x402 works
Stablecoins make that flow practical in three ways:
Dollar-denominated budgets that AI agents can spend. USDC is designed to track the US dollar. An agent can hold a budget in USDC and authorize small purchases from it programmatically. You can price a lookup in fractions of a cent and an inference job in dollars, using a familiar unit for both. Circle's USDC overview
Near-instant settlement, around the clock. USDC transfers can settle in seconds on supported networks, including outside banking hours. That suits agents working continuously: payment can complete while the task is underway. Timing depends on the network and confirmation process; converting proceeds to a bank balance is a separate step. USDC payments
Low fees for small purchases. As of December 3, 2026, Coinbase's facilitator includes 1,000 free onchain transactions per month, then charges $0.001 per additional transaction. For a single transaction beyond the free allowance, that is a 1% facilitator fee on a $0.10 payment, or 0.1% on a $1 payment. Account for any other applicable network, funding and conversion costs when setting your minimum purchase. Coinbase pricing
With prepaid credits: an agent buys a balance through Stripe SPTs or x402. Lago meters each call and deducts its cost. One payment can cover hundreds of small requests, which suits agents using your product repeatedly.
Without a credit purchase: Lago meters and prices the usage, then collects the amount due in USDC through x402 with Coinbase. An agent can pay a few cents for work it needs without buying a credit pack first. Lago supports this through x402 invoice payments. Lago's payment flows
You can price individual units in fractions of a cent. Lago's USD invoices settle at cent precision, so smaller usage amounts must accumulate into a payable charge.
Browserbase sells browser sessions through x402. Five minutes cost $0.01 in USDC. An agent pays and receives a browser connection without creating an account or managing an API key. It can buy the browser time needed for a task and get to work. Browserbase documentation
For your product, Lago connects agent access, budgets and contract terms to metered usage and payment requests, including credits when you use them. Coinbase handles the verification, screening and onchain settlement of the authorized USDC payments Lago sends it. You do not have to build those payment operations yourself. Coinbase's facilitator
There is a discovery opportunity too. Coinbase's x402 Bazaar lets compatible clients find paid APIs and read how to call them. For supported routes, Lago's SDK lets you opt into the catalogue with resource metadata; a settled payment can trigger indexing. Bazaar · Lago's discovery setup
Stripe Shared Payment Tokens let an agent grant a merchant scoped access to its owner's payment method, with limits such as amount and expiration. Lago initiates the payment through your Stripe account using that authorization and adds prepaid credits after confirmation. SPTs remain a preview capability with country eligibility requirements. Stripe's seller guide
x402 is a protocol, Stripe is a payment provider, and an SPT is a credential. Stripe supports x402 too: an agent can pay USDC while the merchant receives funds in their Stripe balance in fiat, subject to eligibility. The protocol alone does not determine the provider or the currency the merchant receives. Stripe's machine payments · Stripe's x402 guide
Stripe and Tempo also co-developed the Machine Payments Protocol (MPP), which supports stablecoins and payment methods accessed through SPTs. MPP and x402 are protocols; SPTs can be used within a supported payment flow. Stripe's MPP introduction
You can offer either payment flow or both, depending on how your agents are equipped to pay. Here is how each works with Lago.
| Decision | Stripe Shared Payment Tokens | x402 with Coinbase |
|---|---|---|
| Supported by Lago | Yes. SPT credit purchases through Agent Storefront and your Stripe account. | Yes. USDC credit purchases and invoice payments through Coinbase Developer Platform. |
| Advantages | Use an existing owner-authorized payment method. Keep Stripe's payment, refund and reporting workflows. | Accept USDC payments through the API, with low facilitator fees, fast onchain settlement and optional Bazaar discovery. |
| Trade-offs | Requires an eligible SPT-capable agent flow. Some purchases need customer authentication; card processing fees and disputes still apply. | Requires a funded wallet and compatible client/network. You receive USDC; bank conversion is separate. |
| Choose it when | Your buyers already use supported owner-authorized payment methods and your team wants to keep Stripe payment operations. | You sell small, on-demand API or data purchases to wallet-funded agents, want Bazaar discovery, or want to receive USDC directly. |
| Example | A company agent buys API credits with an approved company card. | An agent pays a small usage bill in USDC, or buys credits for repeated calls. |
Stripe documents its additional authentication and card dispute process. Compare costs at the payment size you plan to collect. Credits spread one payment over many calls; direct usage payments let agents buy small amounts of work without prepaying a balance.
Lago manages metering, pricing and billing across these supported payment methods. Choose the purchase flow your buyers can use, or offer both when you serve both audiences.
An agent needs to authenticate, have a budget and understand your commercial terms before it can buy. Lago connects that setup to the usage and payments that follow.
Agent Storefront handles registration and authentication. Prepaid balances and top-up limits help govern spending. Your plans and prices encode the billing terms of your contracts. Lago meters the work, calculates charges and initiates payment through the supported Stripe or Coinbase flow. Agent Storefront · Usage metering
For example, an agent generates a short reply followed by a longer report. Lago meters the tokens and applies your prices. You can deduct those charges from prepaid credits or bill the usage and let the agent pay in USDC through x402.

Lago connects agent access and commercial terms to usage, pricing and payment requests, with prepaid credits when you use them. Stripe processes the authorized payment; Coinbase verifies and settles the authorized USDC payment. Arrows show requests and results, not movement of funds.
For Stripe SPTs, start with Agent Storefront. For x402, follow the Lago x402 and Coinbase documentation. Lago supports both; configure the payment flows your buyers need.
For prepaid agent purchases through Storefront or the x402 middleware, define a fully usage-based offer in Lago. Those purchase flows exclude subscription fees, fixed charges and minimum commitments.
For Stripe SPTs, connect your Stripe account and configure the plans and credit top-ups agents can buy through Agent Storefront. The agent must supply an eligible, authorized SPT.
For prepaid credits through x402, configure your USD plan, billable metric, top-up amount and estimated call cost in Lago. Connect your Coinbase Developer Platform credentials and USDC receiving account, then attach the lago-x402 middleware to paid routes. It supports Express, Hono and Next.js on Node and sends usage events for Lago to meter and price. The SDK guide covers the exact setup and access requirements.
For x402 payments without a credit purchase, connect Coinbase and generate an x402 payment URL for a finalized USD invoice. The buyer authorizes payment of the amount due; Lago requests settlement through Coinbase and records the payment. The customer needs an x402-enabled wallet in Lago, but does not need to buy credits. Invoice payment setup
For prepaid access, your application checks with Lago before serving paid work. For jobs with variable costs, bound the work you approve: an estimated charge does not guarantee spending stops at exactly zero.
Choose what you want to sell and set its price in Lago. Your agents can fund repeated use with credits or pay small usage bills in USDC, without committing to a credit pack.