Cardano Code Merged Into Official x402 SDK for AI Agent Payments
The x402 codebase now includes Cardano components for clients, servers and payment facilitators. The support covers Cardano mainnet and two test networks, although the standalone npm package has not yet been released.
By SongMarketCap
Updated:
The x402 Foundation merged pull request #2537 on September 9, adding Cardano to the protocol’s official TypeScript SDK. The contribution, submitted by Cardano Foundation’s Fabian Bormann, includes working code, tests and integration examples.
Cardano is supported through the x402 exact payment scheme across mainnet,
preprod and preview. The merge moves the network from a protocol specification into the main repository used to build x402 applications.
x402 Connects HTTP Requests With Payments
X402 is an open payment standard originally developed by Coinbase. It uses the HTTP 402 Payment Required status to connect access to an online resource with a cryptographically authorized payment.
An API, dataset or digital service can return a request containing the price, supported network and recipient address. The client signs the required transaction, while a facilitator verifies the payment and submits it to the selected blockchain.
The Cardano code covers each part of this process. The client prepares and signs transactions, the facilitator verifies and broadcasts them, and the server defines the price and conditions for accessing a protected resource. The structure can support software and AI agents purchasing data, computing resources or specialized API access.
Cardano Support Includes Mainnet and Test Networks
The SDK registers separate identifiers for Cardano mainnet, preprod and preview. It also supports Cardano native assets and wallet connections through CIP-30.
USDM is configured as the default dollar denominated asset for mainnet and preprod. Payments in ADA can be made through lovelace when explicitly configured, but the native asset is not used as the default for prices expressed in dollars.
The client signs the transaction without broadcasting it, leaving verification and submission to the facilitator. Cardano transaction decoding and serialization are handled through the TypeScript based Evolution SDK.
Masumi Adds Payments Between AI Agents
The code also includes a payment method connected to Masumi, Cardano based infrastructure for registering and paying AI agents.
A server can issue a seller signed quote for a specific service and direct the payment into Masumi’s vested_pay escrow contract. The payment is then connected to the terms presented in the original HTTP 402 response.
The documentation identifies one compatibility limitation. The authorization used by the x402 integration differs from the signature format in the existing masumi-payment-service, so these payments require x402 aware tooling for result submission, refunds and dispute handling.
As of September 9, the npm registry did not list @x402/cardano, and its dedicated publishing workflow had not been executed. Developers can inspect and build the merged code from the repository, while direct package installation will become available after its first public npm release.