x402 Protocol

How x402 Works

An on-chain protocol for trustless instant payouts

1

Payment Received

USD payment is sent directly to x402 smart contract on Solana. No account creation required.

POST /api/x402/payment
{
"wallet": "5xK9...nQ2m",
"amount": "54.59",
"currency": "USD"
}
2

Pack Opening

x402 verifies on-chain payment and executes pack opening logic. Card values are calculated based on rarity.

GET /api/x402/verify
{
"cards": [3, 1, 2, 2, 3],
"payout": "127.45",
"verified": true
}
3

Instant Payout

Smart contract automatically transfers USD to your wallet. Trustless, instant, non-custodial.

POST /api/x402/payout
{
"status": "success",
"txId": "7a3c9e...4f21",
"amount": "127.45"
}
End-to-End Flow Time: ~2-3 seconds

One Piece Card Integration

How x402 connects card values to instant USDC payouts

Card Value Calculation

Common (60%)
$8-12 USD
Uncommon (25%)
$15-25 USD
Rare (10%)
$30-50 USD
Ultra Rare (4%)
$60-100 USD
Legendary (1%)
$150-500 USD

Smart Contract Logic

// x402 Payout Calculator
function calculatePayout(cards) {
let total = 0;
cards.forEach(card => {
total += card.getValue();
});
await x402.transfer(
wallet, total, "USD"
);
}

Each card's rarity determines its USD value. The smart contract sums all card values and executes an atomic transfer to your wallet.

Trustless Verification

All pack openings are recorded on-chain with cryptographic proof. Card pulls use verifiable randomness (VRF) to ensure fairness. Every payout is publicly auditable on the Solana blockchain.

Why x402?

x402 is an open on-chain protocol that cannot be stopped or censored. Your money goes directly to your wallet in USD without delays and without the platform holding it. Everything happens on-chain, verifiable, and trustless. No intermediaries, no custody, no trust required.