Find your error message or symptom in the table, apply the fix, and follow the link if you need the background.

Quick diagnosis

All facilitator codes are explained on Error codes.

LocalNet not reachable

  1. Start LocalNet: algokit localnet start.
  2. Check algod:
  3. Check the endpoints and tokens: algod http://localhost:4001 and KMD http://localhost:4002 use 64 × a; the indexer at http://localhost:8980 needs no token.

Asset not opted in

An account must opt in to an ASA, such as USDC, before it can receive it, and both the vendor’s pay_to account and the buyer need it. The opt-in code is in Accept USDC.

Balance below the minimum

Every account must keep 100,000 microALGO (0.1 ALGO), plus 100,000 microALGO for each asset it has opted in to (applications add more). An account cannot spend below this, so a payment that would cross it fails simulation. Top the account up with ALGO.

The client keeps getting 402 after paying

The server rejected the payment and answered with the challenge again. Look at the server’s logs, or decode the response, for the failure reason. Common causes:
  • The transactions expired (their last valid round passed) between building and sending.
  • The group was modified after signing, so the group id or signature no longer matches.
  • The buyer cannot cover the amount.
  • The client is on a different network from the server.
The official x402 httpx client does not loop: after a bounded number of paid retries it returns the server’s answer, so a 402 after paying reaches your code.

Prices below the fee floor

Charge more than 2,000 microALGO, or pass allow_loss=True to subsidize calls on purpose. See the fee floor.

LocalNet was reset

A reset creates a new genesis hash, so the LocalNet network id changes. Restart servers and clients so they read the new id; see LocalNet.

Still stuck

Search the examples for a working configuration close to yours, and open an issue in the relevant repository with the error, the package versions and the network.