Creates a payment header for the X402 protocol.
The chain is base-sepolia or base
The x402 payload must be a dict with this structure:
{
"accepts": [
{
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"description": "Payment for GET https://proxy402.com/7Yhuf2O3zs",
"extra": {
"name": "USDC",
"version": "2"
},
"maxAmountRequired": "10",
"maxTimeoutSeconds": 300,
"mimeType": "",
"network": "base-sepolia",
"payTo": "0xbA5Ae80f48E0C74878c1a362D69c27c2135Aa594",
"resource": "https://proxy402.com/7Yhuf2O3zs",
"scheme": "exact"
}
],
"error": "X-PAYMENT header is required",
"x402Version": 1
}
Returns a dict with the payment_header field that must be set in X-PAYMENT header in a x402 http request.