x402 activates the HTTP 402 status code for real payments. When you request protected content, the server returns payment requirements. Your client signs a permit, payment settles on BNB Chain, and content is delivered instantly.
Valyn Core uses USDC (BEP-20) on BNB Smart Chain for all transactions. View all payments on BSCScan. Fast ~2 second finality with minimal gas fees paid by the facilitator.
Users sign permit messages (EIP-3009) instead of sending transactions. No BNB needed for gas - the facilitator covers it. Payments are verified via cryptographic signatures and settled automatically on-chain.
x402 is transport-agnostic and works over HTTP, WebSocket, MCP, and Agent-to-Agent protocols. Anyone can implement it. No platform lock-in, no middleman fees - direct wallet-to-wallet transfers on BNB Chain.
Agent or application requests protected resource from x402-enabled endpoint
GET /api/premium-data HTTP/1.1
Server returns payment requirements with pricing and wallet address
HTTP/1.1 402 Payment Required
X-Payment-Amount: 0.01
X-Accept-Payment: USDC
Client signs EIP-2612 permit for gasless payment on BNB Chain
X-Payment: {signature, amount, token}
Payment verified in ~2s, content delivered instantly
HTTP/1.1 200 OK
{"data": "premium content"}
import { ValynCore } from '@valyn/sdk';
const valyn = new ValynCore({
network: 'bnb',
apiKey: process.env.VALYN_API_KEY
});
// Enable x402 payments on your routes
app.use('/premium', valyn.middleware({
price: '0.01',
token: 'USDC'
}));