X402 Extensions
This crate provides concrete extension type implementations for the X402 protocol.
Extensions enable modular optional functionality beyond core payment mechanics.
Servers advertise supported extensions in PaymentRequired, and clients echo them
in PaymentPayload.
Available Extensions
- [
bazaar]: Resource discovery and cataloging for x402-enabled endpoints and MCP tools - [
sign_in_with_x]: Authenticated sign-in alongside payment
Defining Custom Extensions
You can define your own extensions by implementing the ExtensionInfo
trait from x402-core:
use ;
use ;
use json;
let ext = typed;
let = ext.into_pair;
assert_eq!;