Skip to main content

x402 Facilitator

Access Required

x402 is now available. Contact help@arkhia.io to request access.

x402 Facilitator via Arkhia

April 2026

Arkhia now supports x402 — an open standard for machine-to-machine HTTP payments using tokens like USDC on various networks like Ethereum. Route your facilitation requests through Arkhia's authenticated proxy for usage tracking, rate limiting, and credit-based billing.


What is x402?

x402 is an HTTP-native payment protocol where the server responds with a 402 Payment Required status and payment instructions. The client creates an ERC-3009 TransferWithAuthorization signature and submits it to a facilitator, which executes the on-chain token transfer.

Arkhia acts as an authenticated proxy between agents and the x402 payment protocol — your API key is part of the URL, enabling per-project usage tracking.


🌐 URL Format

https://starter.arkhia.io/x402/{chain}/{network}/{api-key}/{endpoint}
SegmentValuesDescription
chainethereum, polygon, base, solanaTarget blockchain
networkmainnet, testnetTarget network environment
api-keyYour project API keyFrom the Arkhia dashboard
endpointsupported, verify, settleFacilitator endpoint

Example:

https://starter.arkhia.io/x402/ethereum/testnet/YOUR_API_KEY/supported

Prerequisites

  1. An Arkhia account with x402 access enabled
  2. A project created in the Arkhia Dashboard — the network will show x402 Facilitator
  3. Your project API key from the Project Details → Endpoints section
  4. A network-appropriate wallet ready to receive token payments

Endpoints

NOTE: Ethereum Testnet (Sepolia) with the USDC token are used in the examples.

GET /supported

Returns the payment schemes and networks the facilitator supports.

curl "https://starter.arkhia.io/x402/ethereum/testnet/YOUR_API_KEY/supported"

Response:

{
"kinds": [
{ "x402Version": 1, "scheme": "exact", "network": "sepolia" },
{ "x402Version": 2, "scheme": "exact", "network": "eip155:11155111" }
]
}

GET /health

Check that the facilitator service is running and ready to receive requests.

curl "https://starter.arkhia.io/x402/ethereum/testnet/YOUR_API_KEY/health"

Response:

{ "status": "ok" }

POST /verify

Verifies an x402 payment against the provided payment requirements.

Code Example:

curl -X POST "https://starter.arkhia.io/x402/ethereum/testnet/YOUR_API_KEY/verify" \
-H "Content-Type: application/json" \
-d '{
"x402Version": 1,
"paymentPayload": {
"x402Version": 1,
"scheme": "exact",
"network": "eip155:11155111",
"payload": {
"authorization": {
"from": "0xPAYER_ADDRESS",
"to": "0xFACILITATOR_ADDRESS",
"value": "1000000",
"validAfter": 1700000000,
"validBefore": 1700003600,
"nonce": "0xNONCE"
},
"signature": "0xSIGNED_ERC3009_SIGNATURE"
}
},
"paymentRequirements": {
"scheme": "exact",
"network": "eip155:11155111",
"maxAmountRequired": "1000000",
"asset": "0xUSDC_CONTRACT_ADDRESS",
"payTo": "0xFACILITATOR_ADDRESS"
}
}'

Request:

Supports both x402 v1 and v2 formats.

  • v1: requirements provided separately
  • v2: requirements embedded in accepted for deterministic validation

V1 (EIP-3009 / Permit2)

{
"x402Version": 1,
"paymentPayload": {
"x402Version": 1,
"scheme": "exact",
"network": "eip155:11155111",
"payload": {
"authorization": {
"from": "0xPAYER_ADDRESS",
"to": "0xFACILITATOR_ADDRESS",
"value": "1000000",
"validAfter": 1700000000,
"validBefore": 1700003600,
"nonce": "0xNONCE"
},
"signature": "0xSIGNED_ERC3009_SIGNATURE"
}
},
"paymentRequirements": {
"scheme": "exact",
"network": "eip155:11155111",
"maxAmountRequired": "1000000",
"asset": "0xUSDC_CONTRACT_ADDRESS",
"payTo": "0xFACILITATOR_ADDRESS"
}
}

V2

{
"x402Version": 2,
"paymentPayload": {
"x402Version": 2,
"accepted": {
"scheme": "exact",
"network": "eip155:11155111",
"amount": "1000000",
"asset": "0xUSDC_CONTRACT_ADDRESS",
"payTo": "0xFACILITATOR_ADDRESS"
},
"payload": {
"authorization": {
"from": "0xPAYER_ADDRESS",
"to": "0xFACILITATOR_ADDRESS",
"value": "1000000",
"validAfter": 1700000000,
"validBefore": 1700003600,
"nonce": "0xNONCE"
},
"signature": "0xSIGNED_ERC3009_SIGNATURE"
}
},
"paymentRequirements": {
"scheme": "exact",
"network": "eip155:11155111",
"amount": "1000000",
"asset": "0xUSDC_CONTRACT_ADDRESS",
"payTo": "0xFACILITATOR_ADDRESS"
}
}

Response:

{
"isValid": true,
"payer": "0x...",
"invalidReason": null,
"details": {}
}

POST /settle

Submit a signed ERC-3009 authorization for on-chain settlement. This is the core endpoint of the x402 flow.

Code Example:

curl -X POST "https://starter.arkhia.io/x402/ethereum/testnet/YOUR_API_KEY/settle" \
-H "Content-Type: application/json" \
-d '{
"x402Version": 1,
"paymentPayload": {
"x402Version": 1,
"scheme": "exact",
"network": "eip155:11155111",
"payload": {
"authorization": {
"from": "0xPAYER_ADDRESS",
"to": "0xFACILITATOR_ADDRESS",
"value": "1000000",
"validAfter": 1700000000,
"validBefore": 1700003600,
"nonce": "0xNONCE"
},
"signature": "0xSIGNED_ERC3009_SIGNATURE"
}
},
"paymentRequirements": {
"scheme": "exact",
"network": "eip155:11155111",
"maxAmountRequired": "1000000",
"asset": "0xUSDC_CONTRACT_ADDRESS",
"payTo": "0xFACILITATOR_ADDRESS"
}
}'

Request:

Supports both x402 v1 and v2 formats.

  • v1: requirements provided separately
  • v2: requirements embedded in accepted for deterministic validation

V1 (EIP-3009 / Permit2)

{
"x402Version": 1,
"paymentPayload": {
"x402Version": 1,
"scheme": "exact",
"network": "eip155:11155111",
"payload": {
"authorization": {
"from": "0xPAYER_ADDRESS",
"to": "0xFACILITATOR_ADDRESS",
"value": "1000000",
"validAfter": 1700000000,
"validBefore": 1700003600,
"nonce": "0xNONCE"
},
"signature": "0xSIGNED_ERC3009_SIGNATURE"
}
},
"paymentRequirements": {
"scheme": "exact",
"network": "eip155:11155111",
"maxAmountRequired": "1000000",
"asset": "0xUSDC_CONTRACT_ADDRESS",
"payTo": "0xFACILITATOR_ADDRESS"
}
}

V2

{
"x402Version": 2,
"paymentPayload": {
"x402Version": 2,
"accepted": {
"scheme": "exact",
"network": "eip155:11155111",
"amount": "1000000",
"asset": "0xUSDC_CONTRACT_ADDRESS",
"payTo": "0xFACILITATOR_ADDRESS"
},
"payload": {
"authorization": {
"from": "0xPAYER_ADDRESS",
"to": "0xFACILITATOR_ADDRESS",
"value": "1000000",
"validAfter": 1700000000,
"validBefore": 1700003600,
"nonce": "0xNONCE"
},
"signature": "0xSIGNED_ERC3009_SIGNATURE"
}
},
"paymentRequirements": {
"scheme": "exact",
"network": "eip155:11155111",
"amount": "1000000",
"asset": "0xUSDC_CONTRACT_ADDRESS",
"payTo": "0xFACILITATOR_ADDRESS"
}
}

Response:

{
"success": true,
"transaction": "0x...",
"payer": "0x...",
"network": "eip155:11155111",
"errorReason": null
}

Settlement Flow

Your App → GET /supported → Get the facilitator's supported networks and payment schemes
Your App → POST /verify → Validate the the user's attempted payment matches your requirements
Your App → POST /settle → Facilitator processes the payment on-chain and returns a confirmation

Code Examples

# 1. Check supported schemes
curl "https://starter.arkhia.io/x402/ethereum/testnet/YOUR_API_KEY/supported"

# 2. Submit a settlement (v1 format)
curl -X POST "https://starter.arkhia.io/x402/ethereum/testnet/YOUR_API_KEY/settle" \
-H "Content-Type: application/json" \
-d '{
"x402Version": 1,
"paymentPayload": {
"x402Version": 1,
"scheme": "exact",
"network": "sepolia",
"payload": {
"authorization": {
"from": "0xPAYER_ADDRESS",
"to": "0xFACILITATOR_ADDRESS",
"value": "1000000",
"validAfter": 1700000000,
"validBefore": 1700003600,
"nonce": "0xRANDOM_NONCE_32_BYTES"
},
"signature": "0xSIGNED_ERC3009_SIGNATURE"
}
},
"paymentRequirements": {
"scheme": "exact",
"network": "sepolia",
"maxAmountRequired": "1000000",
"asset": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
"payTo": "0xFACILITATOR_ADDRESS"
}
}'

Credit Tracking

All x402 requests are tracked in the Arkhia credit system:

  • Each request to the x402 proxy consumes your credits
  • Usage is visible in the Analytics section of your Arkhia dashboard per project
  • x402 requests appear as API type x402 in the usage breakdown

Supported Networks

ChainNetworkURL SegmentProtocol IdentifierEnvironment
EthereumMainnetethereum/mainneteip155:1Mainnet
EthereumSepoliaethereum/testneteip155:11155111Testnet
PolygonMainnetpolygon/mainneteip155:137Mainnet
PolygonAmoypolygon/testneteip155:80002Testnet
BaseMainnetbase/mainneteip155:8453Mainnet
BaseSepoliabase/testneteip155:84532Testnet
SolanaMainnetsolana/mainnetsolana-mainnetMainnet
SolanaTestnetsolana/testnetsolana-testnetTestnet

Troubleshooting

ErrorCauseFix
Unauthorized access to x402 facilitator serviceProject not enabled for x402Contact support to enable x402 on your plan
ERC20: transfer amount exceeds balancePayer wallet has insufficient tokensFund the wallet
x402 request body is requiredPOST body is empty or missingEnsure you send a valid JSON payload
x402 Payment request failedUpstream facilitator errorCheck your network selection and payment payload structure

Resources