x402-utils

A blockchain-based pay-per-execution service implementing the **x402 protocol** for micro utils.

ETHGlobal Buenos AiresShipped November 21, 2025Prize winner#payments
Visit Repo
x402-utils banner

About

x402 utils is a complete, production-ready implementation of the x402 protocol, focused on micro tasks/utils. It uses HTTP 402 “Payment Required” combined with blockchains to turn any task into real pay-per-execution microservice.

With x402 utils, every single job costs the user a tiny micropayment (0.01 U token). The moment payment is confirmed or authorized, the server instantly runs the requested task and streams live output back to the client through Server-Sent Events. There are no subscriptions, no API keys, and no rate limits—just pure pay-as-you-go enforced directly at the HTTP layer.

The project fully implements both x402 payment flows. In the classic flow, the server returns an HTTP 402 response with payment details, the user sends an ERC20 transfer on Base Sepolia, and the backend detects the on-chain payment and executes the job immediately. In the modern signature-based flow, the user signs a single EIP-712 message authorizing the exact amount for a specific job ID and sends the signature in the X-PAYMENT header. The server verifies the signature in fractions of second and runs the job with minimal delay.

This PoC system runs on Base Sepolia for near-zero fees and instant finality. The native payment token U is a LayerZero Omnichain Fungible Token, moving seamlessly between Ethereum Sepolia and Base Sepolia without bridges or wrapped assets. Privy provides embedded wallets with email or Google login and delegated signing, delivering a completely smooth Web2-like experience where approvals feel automatic.

x402 utils ships with a FastAPI backend that handles payment verification, job queuing, and real-time streaming, plus two frontends (a no-build vanilla JS version with MetaMask and a full-featured React + Privy app) and an autonomous Python agent that periodically pays and executes jobs using signatures only. Everything starts almost instantenously with a single ./start.sh command and includes a public testnet faucet dispensing 1 U per day. Adding new paid jobs is just a few lines of Python.

x402 utils is currently the most complete and user-friendly reference implementation of pay-per-execution on blockchain, proving that instant, cross-chain, micropayments for compute that is ready to use today!

Prizes

  • Privy · Best App Using x402 with Privy · Best App Using x402 with Privy

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Strata402

x402-powered pay-per-request DeFi service on Hedera — AI agents pay HBAR automatically, no API keys.