Guides / x402

For agents

Paying for a plan with x402

x402 is the payment standard built on HTTP's status code 402, "Payment Required": a server answers a request with a price and an address, the client pays on-chain, and repeats the request with proof. No account form, no card, no human in the loop. This page says how it works with DreamWidget, where each chain stands, and what is live today.

What is live today

Two things an agent can use right now:

  • The API. A key from an account page opens everything the dashboard does: make a widget, set its design, add logos and video sources, publish, read counts. The API guide.
  • Pay with crypto. A month or a year of any plan in XRP, HBAR, SOL or USDC, from the account page, granted the moment the payment is final. That is a page a person uses, not a 402 an agent answers.
Status (13 September 2026). The x402 door is built and deployed: POST /v1/plan answers 402 with the price and settles a payment through the network's facilitator. It opens chain by chain as our receiving address on each is put in place, and until a chain is open the 402 says so in a note (a door with no chain open answers 503). Proven end to end on the XRP Ledger testnet with a faucet wallet, and to the facilitator's door for USDC on Base Sepolia and Solana devnet, by a check in our own suite that pays for real on the testnet.

The flow

  1. Ask for a plan. POST https://us-central1-dream-widget.cloudfunctions.net/api/v1/plan with your API key and {"plan":"pro","term":"month"}.
  2. Get a 402. The answer carries a PAYMENT-REQUIRED header: the price in US dollars, the asset and network you may pay in, the address to pay, and the facilitator that will verify it. The same price as the card checkout, no surcharge.
  3. Pay. Your wallet signs the payment for that amount, on the network you chose.
  4. Repeat the request with the signed payment in the PAYMENT-SIGNATURE header (the older X-PAYMENT name is read too). We hand it to the facilitator, which verifies and settles it on-chain, and the plan is on your account for the term you paid, the same instant. The answer is 200 with the plan and its end date, and a PAYMENT-RESPONSE header carrying the settled transaction. An XRP quote is good for ten minutes and pays once: the same signed payment sent twice is refused the second time, and so is a quote that has expired. USDC needs no quote; the amount follows from the price.
  5. Build. Every other API call now runs under that plan's limits. A term does not renew on its own; ask for another before it ends and it starts where this one stops.

An agent built on the x402 client libraries (the x402 packages for TypeScript and Python) does steps 2 to 4 on its own: it sees the 402, pays, retries.

Where each chain stands

Checked on 13 September 2026, against each network's own documentation and its facilitator.

Chain and assetFacilitatorStandingOur plan
USDC on Base, USDC on SolanaCoinbase's CDP facilitatorThe reference implementation, governed by the x402 Foundation; the most used networks; first 1,000 settlements a month free, then a tenth of a cent each.First.
XRP and RLUSD on the XRP Ledgert54's XRPL facilitator, on mainnet, documented on xrpl.orgProduction: past a million agentic payments by July 2026, with standard verify and settle endpoints. Early-stage software by its own description, so versions are pinned.First, beside USDC.
HBAR on HederaBlocky402, with a hosted mainnetHedera has an official x402 scheme and a reference package, and the facilitator describes itself as an MVP. Real, but young.Second, once a live payment through it has been watched end to end.
SOL itselfCoinbase's facilitator on SolanaSolana settles SPL tokens; USDC on Solana is the asset the standard prices in. SOL as the asset is not part of the exact scheme.USDC on Solana instead; SOL stays available on the pay-with-crypto page.

Questions

Is the price the same? Yes. A month of Pro is $20 whether paid by card, by crypto on the account page, or by x402. The network fee is the payer's.

Does it renew? No. A wallet cannot be billed, which is the point. A term ends on its date; ask for another before then and it continues without a gap. The API's GET /v1/me says when the current term ends.

Refunds? An on-chain payment is final once confirmed. Buy a month first if in doubt.

What does a key let an agent reach? Its own account's widgets and counts, under its plan. Nothing of anyone else's, and nothing of ours.