DEV Community

Cover image for x402: Internet-Native Payments for the Modern Web
Zerod0wn Gaming
Zerod0wn Gaming

Posted on

x402: Internet-Native Payments for the Modern Web

Hey devs, I just came across Oasis Network’s new protocol called x402, and it's a really elegant way to do micropayments natively over HTTP. 🚀

Here’s a breakdown:

The idea builds on the old HTTP status code 402 (“Payment Required”), which was originally meant for paid web requests — but never really used. Oasis is bringing it back.

With x402, when a client (human or AI agent) requests something (API, content, etc.), the server can respond with HTTP 402, giving the payment details (which token, amount, etc.).

The client signs a permit-style transaction (using EIP-3009, transferWithAuthorization) instead of manually handling gas or private keys.

A “facilitator” service verifies and then settles the payment on-chain. The client just sees the normal HTTP request-response after that.

From your perspective, it’s just another API call. But under the hood, it’s real crypto + stablecoin settlement.

Why this matters:

Micropayments become viable: Because gas costs are low-ish and x402 is pay-per-request, you can charge for super small units (e.g., $0.001 / API call).

Agent economy-ready: AI agents can autonomously pay for services (API / compute / data) without humans managing the wallet or paying upfront.

Composable: Agents can pay each other, or pay for resources per use. Very fluid economics.

Privacy + trust: When combined with ROFL and ERC-8004, you get identity, reputation, and secure execution, all in a trustless way.

Use case example:
Oasis built a demo where an LLM (e.g., for document summarization) runs inside a ROFL enclave — and users pay cents for each summary via x402.

If you’re building agent-first apps, this could completely change how you monetize or handle payments.

Curious to hear:

  • Who’s thinking of integrating x402 into their API?

  • Anyone building AI agents that could use this directly?

full thread: https://oasis.net/blog/x402-https-internet-native-payments

Top comments (0)