x402 Facilitator
The DeepNexus Facilitator verifies and settles x402 payments for your API. It checks the payer's EIP-3009 signature, balance and validity window, then submits transferWithAuthorization on-chain and pays the gas — funds go directly from the payer to your payTo address and never pass through DeepNexus.
Get a facilitator key
- Open the Facilitator console and log in by signing a message with your wallet (MetaMask, OKX, Rabby, Coinbase Wallet or any EIP-6963 wallet). Signing is free and sends no transaction.
- Create a key under API keys. Keys start with
fk_and are shown once. - Every payment verified or settled with your key appears under Settlements.
Base URL
http://localhost:3000/x402
/verify and /settle require Authorization: Bearer fk_.... /supported is public.
GET /supported
Returns the scheme / network pairs this facilitator can settle.
{ "kinds": [ { "x402Version": 1, "scheme": "exact", "network": "base" } ] }
POST /verify
Checks a payment without moving funds.
{
"x402Version": 1,
"paymentPayload": {
"x402Version": 1,
"scheme": "exact",
"network": "base",
"payload": {
"signature": "0x...",
"authorization": {
"from": "0xPayer",
"to": "0xYourWallet",
"value": "10000",
"validAfter": "1767225600",
"validBefore": "1767225660",
"nonce": "0x...32 bytes"
}
}
},
"paymentRequirements": { "scheme": "exact", "network": "base", "maxAmountRequired": "10000", "payTo": "0xYourWallet", "asset": "0x8335...2913", "resource": "https://api.example.com/weather", "description": "", "mimeType": "", "maxTimeoutSeconds": 60, "extra": { "name": "USD Coin", "version": "2" } }
}
{ "isValid": true, "payer": "0xPayer" }
On failure isValid is false and invalidReason is one of:
| Reason | Meaning |
|---|---|
invalid_scheme, invalid_network, invalid_x402_version | Payload and requirements don't match, or the network isn't supported |
invalid_exact_evm_payload_signature | Signature doesn't recover to from |
invalid_exact_evm_payload_recipient_mismatch | to is not payTo |
invalid_exact_evm_payload_authorization_value | value is less than maxAmountRequired |
invalid_exact_evm_payload_authorization_valid_after / _valid_before | Authorization not yet valid or expired |
invalid_transaction_state | Nonce already used on-chain |
insufficient_funds | Payer's token balance is too low |
invalid_payload, invalid_payment_requirements | A required field is missing or malformed |
unexpected_verify_error, unexpected_settle_error | The RPC node failed or the transaction could not be sent — safe to retry |
POST /settle
Same request body as /verify. Verifies again, then broadcasts the transfer and waits for it to be mined.
{ "success": true, "transaction": "0x...", "network": "base", "payer": "0xPayer" }
On failure: { "success": false, "errorReason": "...", "transaction": "", "network": "base", "payer": "0xPayer" }.
Supported assets
The facilitator settles tokens that implement EIP-3009 transferWithAuthorization, such as USDC on Base, Ethereum, Arbitrum and Polygon. The networks enabled on this server are listed by /supported.