402 Payment Required status onto stablecoin payments. Syntalic speaks x402 v2 on Solana and Base, in USDC. Version 1 clients (the old X-PAYMENT header) are refused.
The server is also listed on x402scan, so x402-aware agents can find it without knowing the URL.
How it works
Retry the original URL and query parameters. Do not treat a transfer authorization as a reusable API credential. See errors and retries for the optional payment-identifier extension and ambiguous settlement.Use @x402/fetch
The wrapper handles the 402, signing and retry. Install the SDKs. These versions match the ones the Syntalic MCP server uses:
new x402Client(...).
Without the SDK
- Call the URL with no payment. Read the
acceptsarray from the JSON body, or base64-decode thepayment-requiredheader. Each entry hasscheme,network,asset,amount,payTo,maxTimeoutSecondsandextra; you needextrato sign. - Sign a transfer for that
amountofassettopayTo, in the format of the x402 spec. - Retry the same request with a
PAYMENT-SIGNATUREheader holding your base64-encoded payment, which must include the entry you chose asaccepted.
payTo. Read it from each 402; the address can change.
Chains
Settlement latency varies.
Failed payments
A rejected payment can return402 again. Read the error before retrying. A timeout or missing confirmation does not establish that no transfer settled; do not blindly sign a fresh authorization. See errors and retries.