Official and community SDKs that implement the x402 client and server flows. Pick the language you ship in, install the package, and start accepting or sending payments with a handful of lines.
x402-axios
npm install x402-axios
import axios from 'axios';
import { withPayment } from 'x402-axios';
const client = withPayment(axios.create(), { signer });
const res = await client.get('https://api.example.com/paid');
x402-next
npm install x402-next
// app/api/paid/route.ts
import { withPayment } from 'x402-next';
export const GET = withPayment(handler, { amount: '0.01' });
x402
pip install x402
from x402 import Client
client = Client(signer=signer)
res = client.get('https://api.example.com/paid')
go-x402
go get github.com/coinbase/x402/go
client := x402.NewClient(signer)
res, _ := client.Get("https://api.example.com/paid")
x402-rs (community)
cargo add x402
let client = X402Client::new(signer);
let res = client.get("https://api.example.com/paid").await?;
One email each morning. Free. Unsubscribe anytime.