Builders/ UTILITY 22Live
Seller SDK
There is no separate Axonpay SDK to lock you in. Sellers use the official x402 packages, and the seller kit in the dApp writes the code for you, pointed at the facilitator you choose.
Packages
| Package | Role |
|---|---|
@x402/core | Protocol types, resource server, facilitator client, header encoders and decoders |
@x402/svm | Solana schemes: exact (server, client, facilitator), upto and batch-settlement |
@x402/next | withX402 for route handlers, paymentProxy for proxy.ts |
@x402/express, @x402/hono | Middleware for those frameworks |
@x402/fetch | A fetch that pays 402s, for agents and tests |
@coinbase/x402 | Only with Coinbase CDP's facilitator: createCdpAuthHeaders signs requests with your CDP key |
@x402/extensions | Optional: discovery (bazaar), Sign-In-With-X, signed offers and receipts, idempotency ids |
Code in these docs targets version 2.28 of the x402 packages.
The seller kit
In the dApp, the seller kit asks for a framework (Next.js, Hono or Express), a route, a price, a network, a payTo address and a facilitator, and outputs a ready file plus the install line. It runs in your browser and needs no account. With the default facilitator the output is the same code as Quickstart: sellers.
Facilitator choices
| Facilitator | Networks | Notes |
|---|---|---|
| Axonpay (default) | Mainnet, devnet | https://axonpay.fun/api/facilitator. Free; receipts and Axon Score; settles only to payTo wallets listed in the Agent Shop. |
https://x402.org/facilitator | Devnet | Free public facilitator for test networks |
| Coinbase CDP | Mainnet | https://api.cdp.coinbase.com/platform/v2/x402 with createAuthHeaders: createCdpAuthHeaders(keyId, secret) from @coinbase/x402 |
https://facilitator.payai.network | Mainnet, devnet | Open facilitator run by PayAI |
| Custom URL | Any | Any x402 v2 facilitator you trust or run yourself |
Receipts, Axon Score and Agent GDP only see payments settled by Axonpay’s facilitator. A seller on another facilitator still sells normally but stays unrated in the shop.
Pricing recipes
// $0.001, settled in USDC
price: "$0.001"
// exactly 0.25 USDC, in atomic units (USDC has 6 decimals)
price: { amount: "250000", asset: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" }
// decided per request
price: async (ctx) => (ctx.path.startsWith("/api/large") ? "$0.05" : "$0.01")A dollar string is converted to USDC on the offer’s network. An { amount, asset } object is taken literally in atomic units. A function receives the request context (path, method, headers through the adapter) and returns either form. On mainnet, Axonpay’s facilitator settles nothing under $0.001.
Common errors
| Symptom | Likely cause |
|---|---|
axon_payto_not_listed | Axonpay's facilitator needs an Agent Shop listing for your payTo on that network. List the endpoint first. |
axon_amount_below_minimum | A mainnet price under $0.001 |
axon_facilitator_unfunded | The fee payer is awaiting funding on that network; check /api/facilitator/status |
| Buyer pays and gets another 402 | payTo has no token account for the mint, so the simulated transfer fails; or the signed transaction's blockhash expired |
| Every request fails at startup | The facilitator doesn't serve that network (x402.org is devnet only) |
invalid_exact_svm_payload_amount_mismatch | The client signed a different amount than the offer; usually a stale price |
Payment creation aborted: … | The buyer's own mandate or budget refused, not your server |