Urgent.News

What's breaking now, across thousands of outlets.

Tech

Accepting agent payments on your API: the x402 seller's guide

Accepting agent payments on your API: the x402 seller's guide You run an API that generates code reviews, transforms images, runs inference, or scrapes data. Your users are starting to call it from AI agents, not just browsers. And those agents have wallets. They can pay per call. But your payment form is a credit card field that no agent can fill. The HTTP 402 status code was designed for…

The article "Accepting agent payments on your API: the x402 seller's guide" explains how to accept payments from AI agents that call your API directly, rather than through a browser. The solution revolves around the HTTP 402 status code, which was designed for payment challenges. When an agent calls your API, your server returns a 402 response with a payment challenge containing details like the recipient address, amount, and token type.

The agent then pays through its CAI wallet, and upon successful settlement, the agent retries the original request with a proof of payment. The guide outlines the four-step seller-side process and details the two-step paying-agent-side process using CAI's MCP toolset.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How a Live Unsaved-Changes Diff Works in a VS Code Extension

| Baselines, Myers line diffs, debouncing, undo/redo, and the edge cases behind SavePoint Diff's gutter markers. I recently shipped SavePoint Diff , a VS Code extension that shows gutter markers for…

  • SavePoint Diff highlights unsaved changes with gutter markers
  • Baseline captures last saved content of each file
  • Performance optimized with debounce time for diffing

Git seance: I let deleted functions speak from beyond the grave (with local Gemma)

This is a submission for the Hacktoberfest Open-Source AI Challenge: Ghost in the Machine What I Built Every repository is a graveyard.

  • Script reads repository's git history to summon deleted functions
  • Identifies functions never returned, reveals writer, addition date, removal commit
  • Demonstrated on psf/requests repo, uncovered seven "ghosts" from last 400 commits

More from Friday 30 October →