{
"x402Version": 2,
"resource": {
"url": "https://api.example.com/x402/access",
"method": "POST",
"description": "Acme Photo API — Pay-per-use access with USDC. POST with { planId } to start a payment flow, or POST with { planId, requestId } + PAYMENT-SIGNATURE header to complete payment.",
"mimeType": "application/json"
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:84532",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "100000",
"payTo": "0xSellerWalletAddress",
"maxTimeoutSeconds": 900,
"extra": {
"name": "USDC",
"version": "2",
"planId": "basic",
"description": "basic — $0.10 USDC"
}
},
{
"scheme": "exact",
"network": "eip155:84532",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "500000",
"payTo": "0xSellerWalletAddress",
"maxTimeoutSeconds": 900,
"extra": {
"name": "USDC",
"version": "2",
"planId": "pro",
"description": "pro — $0.50 USDC"
}
}
],
"extensions": {
"key0": {
"inputSchema": {
"type": "object",
"properties": {
"planId": {
"type": "string",
"description": "Tier to purchase. Available tiers: basic, pro"
},
"requestId": {
"type": "string",
"description": "Client-generated UUID for idempotency (auto-generated if omitted)"
},
"resourceId": {
"type": "string",
"description": "Optional: Specific resource identifier (defaults to 'default')"
}
},
"required": ["planId"]
},
"outputSchema": {
"type": "object",
"properties": {
"accessToken": { "type": "string", "description": "JWT token for API access" },
"tokenType": { "type": "string", "description": "Token type (usually 'Bearer')" },
"resourceEndpoint": { "type": "string", "description": "URL to access the protected resource" },
"txHash": { "type": "string", "description": "On-chain transaction hash" },
"explorerUrl": { "type": "string", "description": "Blockchain explorer URL" }
}
},
"description": "Pay-per-use access to high-resolution stock photos via USDC on Base."
}
},
"error": "Payment required"
}