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.

On this page+

Packages

PackageRole
@x402/coreProtocol types, resource server, facilitator client, header encoders and decoders
@x402/svmSolana schemes: exact (server, client, facilitator), upto and batch-settlement
@x402/nextwithX402 for route handlers, paymentProxy for proxy.ts
@x402/express, @x402/honoMiddleware for those frameworks
@x402/fetchA fetch that pays 402s, for agents and tests
@coinbase/x402Only with Coinbase CDP's facilitator: createCdpAuthHeaders signs requests with your CDP key
@x402/extensionsOptional: 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

FacilitatorNetworksNotes
Axonpay (default)Mainnet, devnethttps://axonpay.fun/api/facilitator. Free; receipts and Axon Score; settles only to payTo wallets listed in the Agent Shop.
https://x402.org/facilitatorDevnetFree public facilitator for test networks
Coinbase CDPMainnethttps://api.cdp.coinbase.com/platform/v2/x402 with createAuthHeaders: createCdpAuthHeaders(keyId, secret) from @coinbase/x402
https://facilitator.payai.networkMainnet, devnetOpen facilitator run by PayAI
Custom URLAnyAny 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

price field
// $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

SymptomLikely cause
axon_payto_not_listedAxonpay's facilitator needs an Agent Shop listing for your payTo on that network. List the endpoint first.
axon_amount_below_minimumA mainnet price under $0.001
axon_facilitator_unfundedThe fee payer is awaiting funding on that network; check /api/facilitator/status
Buyer pays and gets another 402payTo has no token account for the mint, so the simulated transfer fails; or the signed transaction's blockhash expired
Every request fails at startupThe facilitator doesn't serve that network (x402.org is devnet only)
invalid_exact_svm_payload_amount_mismatchThe 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