Types
Accepts
Union type for payment configuration. Supports a single payment option, free access, or an array of payment options for multi-network support:
AcceptsX402
Requires x402 exact payment:
AcceptsX402Entry
A single payment option within a multi-accepts array. Same as AcceptsX402 but network is required — the server needs an explicit network to register each payment scheme:
AcceptsX402Multi
An array of payment entries, enabling multi-network support. Must contain at least one entry:
AcceptsFree
No payment required:
Exports
normalizeAcceptsX402
Converts a single or multi accepts value into a uniform array:
isAcceptsPaid
Type guard that returns true if the accepts config requires payment (i.e., is not { scheme: "free" }):
HTTPFacilitatorClient
Client for communicating with an x402 facilitator service. Re-exported from @x402/core/server.
facilitator
The default facilitator client used by AixyzApp. Points to the Agently-hosted x402 facilitator.
AcceptsScheme
Zod schema for validating Accepts objects at runtime. Accepts a single object or an array of payment entries:
Usage
Agents and tools declare anaccepts export to control x402 payment gating. Endpoints without accepts are not registered.
app/agent.ts
app/tools/lookup.ts
Multiple payment options
Accept payment across multiple networks by passing an array. Each entry requires an explicitnetwork:
app/agent.ts
Custom facilitator
Createapp/accepts.ts to override the default facilitator:
app/accepts.ts