x402 protocol implementation using EIP-2612 Permit signatures for gasless token transfers on BNB Chain. Payment authorization through cryptographic signatures, executed by a facilitator service.
Browser access shows paywall interface (1 USD1 → 5000 PENG!). API access returns 402 Payment Required.
curl http://localhost:4024/peng
{
"x402Version": 1,
"accepts": [
{
"scheme": "exact",
"network": "bsc",
"maxAmountRequired": "1000000000000000000",
"asset": "0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d",
"payTo": "0x..."
}
]
}
Access PENG allocation (5000 PENG!) with 1 USD1 payment via X-PAYMENT header.
curl -X POST \
-H "X-PAYMENT: <base64-encoded-payload>" \
http://localhost:4024/peng
Browser access shows paywall interface (5 USD1 → 20000 PENG!). API access returns 402 Payment Required.
curl http://localhost:4024/PENG!
{
"x402Version": 1,
"accepts": [
{
"scheme": "exact",
"network": "bsc",
"maxAmountRequired": "5000000000000000000",
"asset": "0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d",
"payTo": "0x..."
}
]
}
Access PENG allocation (20000 PENG!) with 5 USD1 payment via X-PAYMENT header.
curl -X POST \
-H "X-PAYMENT: <base64-encoded-payload>" \
http://localhost:4024/PENG!