PaymentRequirements
x402 V2 Payment Requirements Follows the official x402 V2 specification. See: https://github.com/coinbase/x402/blob/main/typescript/packages/core/src/types/payments.ts
Properties
| Property | Type | Required | Description |
|---|---|---|---|
amount |
string | Yes | Amount in atomic units (token decimals) |
asset |
string | Yes | Payment asset address (token contract) |
extra |
any | Yes | Extra information about the payment (scheme-specific) For EVM/exact scheme, this typically contains: - `name`: Asset name (e.g., "USD Coin") - `version`: Asset version - `eip712TypedData`: EIP-712 typed data for signing (EIP-3009) - `paymentRequestId`: Correlation ID - `expires`: Expiration timestamp - `estimate`: Cost breakdown (optional) - `settlementMethod`: "eip3009" or "transfer" |
maxTimeoutSeconds |
integer | Yes | Maximum time in seconds for the resource server to respond |
network |
string | Yes | Network for payment in CAIP-2 format (e.g., "eip155:8453" for Base mainnet) |
payTo |
string | Yes | Address to pay value to (publisher or gateway wallet) |
scheme |
string | Yes | Payment scheme (e.g., "exact") |
View JSON Schema
{
"type": "object",
"description": "x402 V2 Payment Requirements\n\nFollows the official x402 V2 specification.\nSee: https://github.com/coinbase/x402/blob/main/typescript/packages/core/src/types/payments.ts",
"required": [
"scheme",
"network",
"asset",
"amount",
"payTo",
"maxTimeoutSeconds",
"extra"
],
"properties": {
"amount": {
"type": "string",
"description": "Amount in atomic units (token decimals)"
},
"asset": {
"type": "string",
"description": "Payment asset address (token contract)"
},
"extra": {
"description": "Extra information about the payment (scheme-specific)\n\nFor EVM/exact scheme, this typically contains:\n- `name`: Asset name (e.g., \"USD Coin\")\n- `version`: Asset version\n- `eip712TypedData`: EIP-712 typed data for signing (EIP-3009)\n- `paymentRequestId`: Correlation ID\n- `expires`: Expiration timestamp\n- `estimate`: Cost breakdown (optional)\n- `settlementMethod`: \"eip3009\" or \"transfer\""
},
"maxTimeoutSeconds": {
"type": "integer",
"format": "int32",
"description": "Maximum time in seconds for the resource server to respond"
},
"network": {
"type": "string",
"description": "Network for payment in CAIP-2 format (e.g., \"eip155:8453\" for Base mainnet)"
},
"payTo": {
"type": "string",
"description": "Address to pay value to (publisher or gateway wallet)"
},
"scheme": {
"type": "string",
"description": "Payment scheme (e.g., \"exact\")"
}
}
}