Loops HousePaymesh

NEAR HACKATHON
Team
1 member- PAOwner
paymesh
Overview
Problem: AI agents need to buy data and compute one request at a time, from sellers they've never met. Accounts, API keys and monthly plans don't fit that, and a blockchain transaction per call is too slow and too expensive for a fraction of a cent. What we built: paymesh, pay-per-call for HTTP APIs using x402 v2, the open standard for web payments, checked against its reference SDK. An agent calls an API, gets "402 Payment Required", pays inside its next request and gets the answer. Three ways to pay: one signed transaction per call; a payment channel (one deposit, then a hash per call; under 1 ms and 5 bytes of chain per call instead of 5 KB); and a hub, where one deposit pays any seller and sellers are paid on a schedule, It works from Python, from a browser (a dependency-free JS client), for any WSGI API, and as an x402 facilitator. It is hardened with 52 attacks (all refused), 137 tests, crash and fuzz tests, and CI on Linux and Windows. How NEAR fits in: today paymesh settles on a small local chain so every rule can be tested and attacked in one process. Next we move settlement to NEAR: a contract holds each deposit (NEAR or USD) and releases it against the same hash-chain proofs and payout records, while the payments themselves stay off-chain. That gives agents real money with NEAR's low fees and fast finality.