Skip to main content
x402 maps the HTTP 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:
Register a scheme for each chain you hold USDC on. If you register both, the client pays with the first option in the 402 that you registered (Syntalic lists Solana first) and doesn’t fall back to the other chain if that wallet is short. Register only the chain you’ve funded, or pass your own selector to new x402Client(...).

Without the SDK

  1. Call the URL with no payment. Read the accepts array from the JSON body, or base64-decode the payment-required header. Each entry has scheme, network, asset, amount, payTo, maxTimeoutSeconds and extra; you need extra to sign.
  2. Sign a transfer for that amount of asset to payTo, in the format of the x402 spec.
  3. Retry the same request with a PAYMENT-SIGNATURE header holding your base64-encoded payment, which must include the entry you chose as accepted.
Never hardcode payTo. Read it from each 402; the address can change.

Chains

Settlement latency varies.

Failed payments

A rejected payment can return 402 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.