hummusonrails/arbitrum-x402-aws — explained in plain English
Analysis updated 2026-05-18
Learn how to build a pay-per-request API using the HTTP 402 Payment Required standard.
Give an AI agent its own crypto wallet that can pay for gated content automatically.
Deploy a CloudFront and Lambda@Edge merchant that verifies and settles USDC payments.
Prototype agent-to-agent or agent-to-API payments on the Arbitrum blockchain.
| hummusonrails/arbitrum-x402-aws | arpitbhalla/ts-backend | brijeshmarch16/ai-interview | |
|---|---|---|---|
| Stars | 3 | 3 | 3 |
| Language | TypeScript | TypeScript | TypeScript |
| Last pushed | — | 2022-06-09 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 5/5 | 3/5 | 3/5 |
| Audience | developer | developer | pm founder |
Figures from each repo's GitHub metadata at analysis time.
Requires an AWS account, CDK bootstrap, a funded crypto wallet, and Coinbase CDP API keys before the agent can run.
This project is a working demonstration of an AI agent paying for content automatically using cryptocurrency, built on AWS and the Arbitrum blockchain. It shows how a piece of software running on Amazon's Bedrock AgentCore can encounter a paywall, pay for access on the spot using real digital money, and get the content it asked for, all without a human clicking anything. The setup has two main pieces. The first is a merchant server built on AWS CloudFront and Lambda@Edge that guards a piece of gated content. When someone requests it without paying, the server replies with an HTTP 402 Payment Required response, which is a real but rarely used web standard for exactly this situation. The second piece is a Python agent that holds its own digital wallet, created and managed through AWS Bedrock AgentCore. When the agent hits that 402 response, it automatically signs a payment using its embedded wallet and resends the request with proof of payment attached. Behind the scenes, the actual payment settles as USDC, a dollar pegged cryptocurrency, on the Arbitrum One blockchain, verified and processed through Coinbase's CDP payment facilitator service. The whole exchange, request, payment demand, signed payment, and verified access, happens automatically in a few network round trips, and the agent gets back the gated data along with a link to view the transaction on a blockchain explorer. The repo is organized as a small monorepo with a TypeScript merchant app, a Python agent app, and a shared TypeScript package defining the payment protocol types and Arbitrum specific constants. Deployment uses the AWS CDK for infrastructure and a Makefile that walks through installing dependencies, deploying the merchant, setting up the agent's wallet, and running the agent end to end. It includes 26 automated tests across both the TypeScript and Python halves of the project, and is released under the MIT license.
A working demo where an AI agent automatically pays with cryptocurrency to unlock paywalled content, combining AWS Lambda, an HTTP 402 response, and USDC payments on Arbitrum.
Mainly TypeScript. The stack also includes TypeScript, Python, AWS Lambda.
MIT licensed, free to use, modify, and reuse including for commercial purposes.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.