Cardano x402 Package Launches on npm for AI Payments

The official @x402/cardano release gives developers installable components for clients, servers and payment facilitators, allowing applications and AI agents to connect API access with payments in ADA or Cardano native tokens.

By SongMarketCap

Updated:

Cardano News - Cardano x402 Package Launches on npm for AI Payments

Cardano Foundation has announced that Cardano is now available through the official x402 SDK, an open payment standard built around the HTTP 402 Payment Required status. Cardano code entered the x402 repository earlier in September, but the standalone package is now published on npm and ready to be added to TypeScript applications.

Official Cardano x402 Package Reaches npm

The @x402/cardano package was published on September 18 as version 2.26.0. It provides separate modules for the client, server and facilitator components used to process Cardano payments through x402.

The client prepares and signs a Cardano transaction. The server defines the price, accepted asset, network and recipient address for a protected digital resource. The facilitator verifies that the signed transaction matches those conditions and handles settlement.

Cardano support was merged into the official x402 SDK on September 9, covering mainnet, preprod and preview. At that stage, developers could inspect and build the code from the repository, but the dedicated npm package had not been released.

The new publication removes that installation gap. Cardano Foundation has also shared a demonstration that developers can run and adapt when adding x402 payments to their own applications.

How x402 Processes Cardano API Payments

X402 turns the HTTP 402 Payment Required status into a programmable payment flow between a client and a server. Coinbase originally developed the protocol, which is now governed by the x402 Foundation under the Linux Foundation.

When an application or AI agent requests a paid API, the server can return an HTTP 402 response containing the price, Cardano network, accepted asset, recipient address and payment deadline. The client signs a transaction that satisfies those conditions and resubmits the request with payment proof.

A facilitator checks the transaction and confirms settlement before the server releases the requested data, computing capacity or other digital resource. The payment and access decision therefore take place within the same web request and response process.

The model allows an API operator to charge for individual calls without requiring a traditional checkout page, prepaid balance or subscription. A service can configure payment in ADA or a selected Cardano native token, although the operator must specify which assets it accepts.

This structure is designed for applications and autonomous agents that need to purchase data or computing resources programmatically. It gives Cardano a standardized connection to services already built around the wider x402 protocol instead of requiring a separate payment format for each integration.

Cardano Facilitator Completes Preprod Testing

Cardano Foundation has also published a separate x402 facilitator developed in Java. The service implements the Cardano exact payment scheme and verifies transactions already signed by a user or agent. It holds no private keys and cannot move funds independently.

The facilitator supports direct address payments, Masumi’s vested_pay escrow for AI agent transactions and configurable Plutus script transfers. Its repository reports 166 completed tests and an end-to-end transaction on Cardano preprod, covering transaction construction, signing, verification, settlement and independent onchain confirmation.

The service has not yet been tested against Cardano mainnet. The available implementation is therefore a preproduction-tested facilitator rather than a publicly operating mainnet payment service.

The npm release changes what developers can use today. Cardano’s x402 components no longer need to be built manually from the main repository. They can now be installed as an official package, connected to the available demo and configured with a facilitator for application or agent payments. A production deployment still requires supported asset settings, operational infrastructure and completed mainnet settlement testing.