Add a paywall to an API route so AI agents must pay a small USDC amount on Base before getting a response
Publish the Express middleware package to charge per-request fees on your own API endpoints
Self-host the facilitator to avoid the 0.5% fee and run payment verification against your own Base RPC
| verge402/verge | aerdelan/housand-domaintoolmatrix | alibaba/webmcp-nexus | |
|---|---|---|---|
| Stars | 22 | 22 | 22 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | moderate | easy | moderate |
| Complexity | 3/5 | 2/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a Base wallet address and USDC set up to receive payments, self-hosting needs your own Base RPC connection.
verge is a TypeScript project that adds HTTP 402 "Payment Required" support to any web API, so an endpoint can require a small payment before it responds. It targets AI agents and other automated clients that want to pay for API access per request instead of through a subscription or an API key. The core idea is a piece of middleware you add to an existing server. Once installed, a protected route checks for a payment before letting the request through. The payment is made in USDC, a US dollar backed stablecoin, on Base, an Ethereum compatible blockchain network known for low transaction fees and fast block times of around 400 milliseconds. The README argues that Base is one of the few networks where this makes sense: on Ethereum's main chain, network fees would exceed a payment of a fraction of a cent, and card processors like Stripe have a minimum transaction size well above that too. The repository contains a Next.js website with documentation and a demo, and a separate SDK folder that builds the Express middleware package meant to be published to npm. Setting it up as a developer means installing dependencies and running the Next.js app locally, or building the SDK package on its own. Using the middleware in an existing project takes a few lines of code: you import a paywall function and call it with the payment amount, your wallet address, and the network. The project is offered as a hosted facilitator that takes a 0.5 percent fee per payment while verifying transactions on-chain, or the code can be self-hosted for free if you run your own Base RPC connection. Planned future work listed in the README includes support for other web frameworks, a self-hosted facilitator binary, a marketplace listing paid endpoints, and batch settlement using zero-knowledge proofs. The project is released under the MIT license. This is aimed at developers building AI agents or automated services who want a lightweight way to charge for API access without setting up a full billing system.
A TypeScript middleware that lets an API charge AI agents a small USDC payment on the Base blockchain before responding, settling in about 400 milliseconds.
Mainly TypeScript. The stack also includes TypeScript, Next.js, React.
MIT license: free to use, modify, and distribute, including commercially, as long as the copyright notice is kept.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.