Overview
cardano402 is an open-source payment gateway that lets websites and AI agents charge for individual web requests using ADA or Cardano stablecoins. A site can require a small payment before it answers a request, the visitor's wallet pays on the spot, and the site only serves the result once the payment clears. It works without sign-ups, subscriptions, or percentage fees taken out of each transaction1.
The project implements the x402 protocol, an open standard that turns the long-unused HTTP 402 "Payment Required" status code into a real payment rail for the web. cardano402 is the Cardano-flavoured version of that standard, packaged so a developer can drop it in front of an API and get paid per call12.
Key Features
- Per-request pricing with no middleman account. A website charges for each call to an API or page, and the visitor pays directly from their own wallet. There is no platform account to open, no API key to manage, and no percentage cut on top of normal Cardano network fees13.
- Multi-token payments out of the box. Sites can accept ADA, USDM, DJED, or iUSD. The list of accepted tokens is fixed in the source code rather than user-editable, so a stranger cannot register a look-alike token and trick the gateway into accepting it1.
- Built-in checks before any money moves. Every payment runs through ten safety checks covering things like which network it is on, whether the amount and recipient match what the site asked for, and whether the signed request has expired. Cardano's own ledger does the cryptographic check when the transaction is submitted1.
- On-chain settlement with deduplication. Confirmed payments are recorded on Cardano through Blockfrost (a Cardano API service that submits transactions to the network), and a fingerprint of each transaction is stored to prevent the same payment from being counted twice if the visitor retries2.
- Machine-readable payment endpoints for AI agents. cardano402 publishes a machine-readable description of each endpoint, so AI agents that follow the x402 standard can discover the service, pay for it, and use the response without human intervention1.
What to Expect
The cardano402 website is a single landing page that explains the protocol, walks through the payment flow, and ends with a working "Test Now" demo. The demo runs against Cardano's Preview test network, where no real funds move. Clicking it triggers a small test payment of 2 ADA from a preview wallet and shows the round-trip confirmation in roughly 30 to 60 seconds.
The project itself is a single-developer open-source effort hosted on GitHub under an Apache-2.0 license. Code lives in a public repository alongside architecture notes, operations guidance, and a written comparison against the underlying x402 specification3. There is no Discord, Twitter, or Telegram presence at this time, and discussion happens through the repository's issue tracker.
A site operator who wants to use cardano402 today can install the package, point it at their own Blockfrost key and Cardano wallet address, and run it locally or on their own server. The hosted demo is meant as a working reference, not as a managed service to plug into production traffic. Anyone planning to accept real value through cardano402 should run their own facilitator and arrange an independent security review first.
