x402 payment check
x402_checkCheck a signed x402 USDC payment before submitting it: recovers the EIP-712 signer, runs USDC's own checks and the seller's terms, and when the signature fails names the domain it was really made for (e.g. Base Sepolia's 'USDC' used on Base, where USDC is 'USD Coin').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | With authorization: base, base-sepolia, … or eip155:<id> | |
| signature | No | With authorization: the 65-byte hex signature | |
| x_payment | No | The X-PAYMENT header (base64) | |
| requirements | No | The 402's accepts entry: payTo, amount, asset, network | |
| authorization | No | Instead of x_payment: from, to, value, validAfter, validBefore, nonce |