X402 Network and Payment Methods

YuJun X402 currently settles around USDC and supports two types of chains: EVM and Solana. The signature methods, asset addresses, gas behaviors, and applicable scenarios differ across networks, so it is necessary to select the network before integration.

Network Identifier Using CAIP-2

The accepts[].network in x402 v2 is a CAIP-2 identifier, not abbreviations like base or skale. Clients must match networks by comparing CAIP-2 strings:

Network CAIP-2 Identifier
Base eip155:8453
SKALE Base eip155:1187947933
Solana mainnet solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp

Support Matrix

Network Scheme Asset Signature Method Applicable Scenarios
Base exact Base USDC EIP-3009 TransferWithAuthorization Default recommendation, mature wallet and liquidity support.
Base upto Base USDC + Permit2 Permit2 PermitWitnessTransferFrom Chat, model, and other post-measurement APIs.
SKALE exact SKALE bridged USDC EIP-3009 TransferWithAuthorization Low gas cost, suitable for EVM payment verification and low-cost calls.
Solana exact Solana USDC SPL TransferChecked Solana wallet, Agent, or on-chain application scenarios.

upto is currently only available on Base. The actual available items are subject to the accepts returned by the API. You can also check the Facilitator:

curl https://facilitator.acedata.cloud/supported

Response from Facilitator /supported:

{
  "kinds": [
    { "x402Version": 2, "scheme": "exact", "network": "eip155:8453" },
    {
      "x402Version": 2,
      "scheme": "upto",
      "network": "eip155:8453",
      "extra": { "facilitatorAddress": "0xd019238EAA8a9Ca13C5792Ca10B4029D6ce25708" }
    },
    { "x402Version": 2, "scheme": "exact", "network": "eip155:1187947933" },
    {
      "x402Version": 2,
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "extra": { "feePayer": "3SPm6qbgsDkj24MuR8Ss4sH97fziqyCiqFKDyeVU2igq" }
    }
  ]
}

Result Explanation:

  • The exact for Base, SKALE, and Solana is a fixed amount payment path.
  • Only Base provides the upto post-measurement path, relying on Permit2 approval.
  • The extra.facilitatorAddress in the upto entry is the address that must be written into the witness during client signing and must match the server's returned value.

Base

Base uses the official USDC contract:

0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

In the exact scheme, the client signs EIP-712 TransferWithAuthorization. The signed content includes:

  • from: Payment wallet address
  • to: YuJun receiving address
  • value: Payment amount
  • validAfter / validBefore: Signature validity time window
  • nonce: 32-byte random nonce

After the Facilitator verifies the signature, it will call USDC's transferWithAuthorization on-chain to complete the transfer.

Base is the most recommended formal access network, especially suitable for upto post-measurement, as Permit2, USDC, and wallet ecosystems are more mature.

Example of Base exact verification result:

payer 0x5d4f08D5c2bb60703284bc06671Eb680fA41B105
content ADC_BASE_E2E_OK
tx 0x408430ab3451bc22a51e510cdb4b063d6b9686724fea7a31fc109af20f5cd2f3
block 46726299
explorer https://basescan.org/tx/0x408430ab3451bc22a51e510cdb4b063d6b9686724fea7a31fc109af20f5cd2f3
transfer value 95215 atomic USDC

Result Explanation:

  • The API paid retry returns the model content ADC_BASE_E2E_OK.
  • The on-chain transaction can be checked on BaseScan, with block number 46726299.
  • 95215 atomic USDC corresponds to 0.095215 USDC, which is the actual settlement amount for this API call.

Order payment Base exact program run result:

order 78481793-304e-47f7-bc0c-8231aec9cc1e
state Finished
tx 0xfec08cc00a159ea1ec692b32faa9bf3d17595a986301169e689d94f58bc44151
block 46726704
explorer https://basescan.org/tx/0xfec08cc00a159ea1ec692b32faa9bf3d17595a986301169e689d94f58bc44151
transfer value 1200000 atomic USDC

Result Explanation:

  • The final state of the platform order is Finished.
  • The order pay_id is written into the same Base transaction hash.
  • 1200000 atomic USDC corresponds to 1.2 USDC, which is the actual payment amount after applying the X402 discount for the 10 Credits order.

SKALE

SKALE uses bridged USDC, and the signature method is similar to Base, also EIP-3009. It is suitable for EVM payment scenarios with low gas costs; actual calls are still subject to the accepts returned by the API.

A typical 402 accepts for SKALE will include:

{
  "network": "eip155:1187947933",
  "scheme": "exact",
  "extra": {
    "name": "Bridged USDC (SKALE Bridge)",
    "version": "2",
    "chainId": 1187947933,
    "verifyingContract": "0x85889c8c714505E0c94b30fcfcF64fE3Ac8FCb20"
  }
}

SKALE currently only provides exact. If you need post-measurement, please use Base upto.

Example of SKALE exact verification result:

content ADC_SKALE_E2E_OK
tx 0x9fd09901e74c763325fe118b2bc64765c3fca785b86b24a78b97964384db084f
block 1969317
explorer https://skale-base-explorer.skalenodes.com/tx/0x9fd09901e74c763325fe118b2bc64765c3fca785b86b24a78b97964384db084f
paid 0.095215 USDC

Result Explanation:

  • The API paid retry returns the model content ADC_SKALE_E2E_OK.
  • The transaction can be checked on the SKALE explorer, with block number 1969317.
  • The settlement amount for this exact payment is 0.095215 USDC.

Solana

Solana uses SPL USDC TransferChecked. The client will construct a transfer transaction, sign it, and submit it, then place the signed or serialized transaction into the PAYMENT-SIGNATURE envelope.

Characteristics of Solana:

  • Uses Solana wallet adapter or base58 secret key;
  • The asset is Solana USDC mint;
  • Currently only supports exact;
  • The Facilitator will verify the transfer instruction's mint, destination, authority, and amount.

If using wallet fee payer mode, the wallet will directly submit the transaction, and the Facilitator is responsible for confirming the transaction and returning the settlement result.

Solana exact verification result example:

payer AY2RmGm2zPxB1uKvvF4dKyYdr2VySyL3wcD1MKJZoLRd
HTTP 402 -> HTTP 200
content ADC_SOLANA_E2E_OK
chain signature not confirmed in this run

Result explanation:

  • Paid retry has already returned HTTP 200, and the model output is ADC_SOLANA_E2E_OK.
  • Public RPC queries for on-chain signatures may encounter rate limiting.
  • Due to potential rate limiting on public RPC queries, Solana explorer is not written here. For strict reconciliation, please use your own Solana RPC or platform-side settlement records to confirm transaction signatures.

How to choose

What you want to do Recommended network
Quickly run through the minimum link SKALE exact or Base exact
Targeting regular Web3 users Base
Doing chat completion and other post-measurement Base upto
Solana ecosystem applications Solana exact
Low-cost EVM payment verification SKALE exact

Regardless of which chain you choose, do not hardcode prices in the client. Prices are determined by the server's returned accepts[].maxAmountRequired.