Supported Tokens
The facilitator supports any ERC-20 token on ApeChain that implements EIP-2612 (Permit).
Primary Token
USDC (Bridged via Stargate)
RECOMMENDEDThe standard stablecoin for agent commerce. Bridged USDC has native EIP-2612 permit support, making it ideal for gasless transactions.
0xF1815bd50389c46847f0Bda824eC8da914045D1462Using USDC in the SDK
The SDK exports the USDC address as a constant for convenience:
import { APECHAIN_USDC, toTokenUnits } from '@x402apechain/sdk';
// APECHAIN_USDC = '0xF1815bd50389c46847f0Bda824eC8da914045D14'
const invoice = {
chainId: 33139,
tokenAddress: APECHAIN_USDC,
recipient: '0x...',
amount: toTokenUnits('10.00', 6) // 10 USDC = 10000000 units
};Token Requirements
For a token to work with the X402 facilitator, it must implement the EIP-2612 Permit extension. This adds a permit() function that allows approvals via signatures.
Required Functions
- •
permit(owner, spender, value, deadline, v, r, s) - •
nonces(owner)- returns current nonce - •
DOMAIN_SEPARATOR()- for EIP-712 signing
Permit Interface
// IERC20Permit interface (EIP-2612)
interface IERC20Permit {
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
}Getting USDC on ApeChain
To get USDC on ApeChain for testing or production use:
Bridge from Ethereum/Arbitrum
Use Stargate Finance to bridge USDC from other chains.
Stargate Bridge →Adding Custom Tokens
The facilitator can work with any EIP-2612 compatible token. To use a custom token:
- Ensure your token implements the Permit interface
- Pass the token address in your invoice
- The SDK will automatically fetch token metadata (name, decimals, version)
// Using a custom EIP-2612 token
const invoice = {
chainId: 33139,
tokenAddress: '0xYourCustomToken...',
recipient: '0x...',
amount: toTokenUnits('100', 18) // Adjust decimals for your token
};
await agent.pay({ invoice });Token Compatibility Check
Before using a new token, verify it supports EIP-2612 by checking if the permit() function exists on the contract. You can do this on ApeScan or by calling the contract directly.