The magic behind Yuki402. This is where HTTP 402 meets blockchain, AI meets crypto, and payments happen faster than you can say "approve transaction." Welcome to the future.
🎯 What Are Autonomous Payments?
Traditional payments: You → Click "Pay" → Enter card details → Wait 2-3 days → Hope it goes through → Maybe get charged twice → Dispute with bank
Yuki402 autonomous payments: You → "Get me weather data" → Yuki handles everything → 2 seconds later → Data delivered
That's it. No clicking. No approvals. No waiting. Just pure, frictionless automation.
⚡ The Flow (It's Fast)
1. Detection: Yuki Spots the HTTP 402
You: "Get me weather data for London"
↓
Yuki reaches out: GET https://weather-api.x402.org/v1/current?city=London
↓
API responds: HTTP 402 Payment Required
↓
Yuki reads payment details:
{
"amount": "0.001",
"token": "SOL",
"recipient": "weather-api.sol",
"chain": "solana"
}
Human translation: "This'll cost you 0.001 SOL (~$0.25). Pay me and I'll give you the data."
2. Verification: Yuki Checks Your Limits
Before spending a single lamport, Yuki verifies:
✅ Daily limit - Have you hit today's cap? ✅ Weekly limit - Still good for the week? ✅ Monthly limit - Month-to-date within bounds? ✅ Wallet balance - Enough crypto for payment + gas?
If ANY check fails: Payment rejected, you're notified, no money leaves your wallet.
If ALL checks pass: Let's gooooo 🚀
3. Processing: Yuki Strikes
Your funds are now on-chain. Immutable. Verified. Complete.
4. Access: Data Delivered
Total time from request to data: 3-5 seconds. Faster than any credit card transaction. Faster than you filling out a form. Faster than thinking "should I approve this?"
🔄 Payment Types Supported
Native Tokens (The Simplest)
Pay with the blockchain's currency:
Solana: SOL (~$0.01 gas fees)
Ethereum: ETH (~$1-20 gas fees, yikes)
Polygon: MATIC (~$0.05 gas fees)
Base: ETH (~$0.05 gas fees)
Pro tip: Use Solana for small payments. Ethereum gas will eat your lunch.
ERC-20 Tokens (Stablecoins FTW)
Pay with standard tokens:
USDC - Dollar-pegged stablecoin, most widely accepted
USDT - Tether, also popular
DAI - Decentralized stablecoin
Custom tokens - Service-specific or protocol tokens
Routes to cheapest option when multiple chains work
You don't pick the chain. Yuki picks the optimal one.
🎬 Real-World Example
Let's see autonomous payments in action:
Total time: 5.2 seconds from request to image. That's autonomous payments.
🛡️ Security Features (You're Protected)
Smart Contract Spending Limits
Your limits are enforced on-chain:
Why on-chain? Can't be bypassed. Can't be hacked. Can't be manipulated. Math enforces your rules.
Transaction Transparency
Every payment is:
✅ Recorded on blockchain - Permanent, public record ✅ Verifiable by anyone - Check it on block explorer ✅ Includes full details - Service, amount, gas, timestamp ✅ Linked to you - Full audit trail
No hidden charges. No surprise fees. 100% transparent.
Non-Custodial Architecture
The golden rule of crypto: Not your keys, not your crypto.
Yuki402 respects this:
✅ You hold your private keys
✅ Yuki never touches your funds
✅ All transactions signed by YOUR wallet
✅ Revoke access instantly anytime
We facilitate. You control.
📊 Payment States (Know What's Happening)
Every payment goes through states:
🟡 Pending
Transaction submitted to blockchain, waiting for validators to process.
Typical duration: 1-3 seconds on Solana, 12-15 seconds on Ethereum
What's happening: Miners/validators are including your transaction in the next block.
🔵 Confirming
Transaction included in a block, waiting for finality.
Typical duration: 1-2 seconds on Solana, additional confirmations on Ethereum
What's happening: Network is achieving consensus on your transaction.
🟢 Completed
Payment confirmed, service accessed, data delivered.
This is success. Transaction is now immutable and irreversible.
🔴 Failed
Transaction reverted or rejected by the blockchain.
Common causes:
Insufficient balance (you don't have enough SOL/ETH)
Gas too low (network congestion, need higher fees)
Good news: Failed transactions don't deduct the service fee (only gas is paid to validators).
🟣 Refunded
Service failed to deliver, provider issued refund.
How it works: Service provider sends NEW transaction refunding your payment. You get your crypto back (minus the original gas—that's gone forever).
⛽ Gas Fees (The Cost of Doing Business On-Chain)
What Are Gas Fees?
Gas = the fee paid to blockchain validators for processing your transaction.
Think of it like:
Ethereum gas = Manhattan taxi fare (expensive, surge pricing)
Polygon gas = Uber in the suburbs (reasonable)
Solana gas = Bus fare (cheap and consistent)
Gas Costs by Chain
Chain
Typical Gas
When It Spikes
Solana
$0.01
Never (consistent)
Polygon
$0.05
Rarely
Base
$0.05-0.20
Moderate congestion
Ethereum
$1-20
NFT drops, DeFi rushes
Pro tip: Yuki defaults to Solana when possible. Your wallet will thank you.
Gas Optimization
Yuki402 optimizes gas automatically:
✅ Estimates before sending - Shows expected gas ✅ Efficient transaction types - Uses optimal tx structure ✅ Batching (coming soon) - Multiple payments in one tx ✅ High fee alerts - Warns if gas is unusually expensive
You don't need to think about gas. Yuki handles it.
Fix: Retry with higher gas. Network congestion happens.
📜 Payment History (Track Everything)
View your complete transaction history:
Click any transaction to see full details:
Transaction hash (link to block explorer)
Service name and URL
Amount sent
Gas paid
Timestamp
Block number
Current status
Everything is tracked. Nothing is hidden.
✅ Best Practices (Learn from the Pros)
1. Start Conservative
Your first limits should be LOW:
Why: Learn the system risk-free. Scale up after you're comfortable.
2. Monitor Daily
Check your dashboard every day:
✅ Review transaction history ✅ Verify service charges match expectations ✅ Look for unusual activity ✅ Adjust limits based on usage patterns
5 minutes a day = total peace of mind.
3. Verify Services First
Before using a new service:
✅ Check if it's verified in x402 Registry ✅ Read reviews from other users (when available) ✅ Test with smallest possible payment ✅ Verify the service delivered as promised ✅ THEN scale up usage
Trust, but verify.
4. Keep Adequate Balance
Always maintain buffer in your wallet:
Why buffer: Gas prices spike unexpectedly. Don't get caught unable to pay.
5. Verify on Block Explorer
ALWAYS check your transactions on-chain:
Confirms payment actually happened
Shows exact costs (no hidden fees)
Provides permanent record/receipt
Catches any discrepancies immediately
Links provided automatically by Yuki402.
🚀 Advanced Features (Coming Soon)
Scheduled Recurring Payments
Set it and forget it:
Use cases: Subscriptions, regular data feeds, automated services.
Multi-Signature Support
For organizations:
Require 2-of-3 approvals for payments
Set role-based spending limits
Complete audit trail
Enterprise-grade controls
Perfect for: DAOs, companies, shared wallets.
Smart Payment Routing
Optimize every transaction:
Automatically select cheapest chain
Use L2 solutions when available (Arbitrum, Optimism)
Bridge tokens as needed
Batch multiple payments to save gas
Maximum efficiency. Minimum cost.
🔧 Troubleshooting
"Payment stuck in pending for >5 minutes"
Check block explorer:
Transaction might be queued (high network congestion)
Solution: Increase daily limit to 0.015 SOL to match actual usage.
"Transaction fails immediately every time"
Common causes:
❌ Insufficient gas - Increase gas price ❌ Network congestion - Try off-peak hours ❌ Invalid service - Service might be delisted ❌ Wrong chain - Service requires different blockchain
Debug steps:
Check wallet balance (need payment + gas + buffer)
⚡ Constructing Solana transaction...
⚡ Signing with your wallet...
⚡ Broadcasting to blockchain...
⚡ Waiting for confirmation...
✓ Confirmed in 2.1 seconds!
Transaction: solscan.io/tx/abc123...
Amount: 0.001 SOL
Gas: 0.00001 SOL
Total: 0.00101 SOL
⚡ Retrying request with payment proof...
⚡ API verifying transaction on-chain...
✓ Payment verified!
✓ Data delivered!
Weather in London:
Temperature: 15°C
Conditions: Partly cloudy
Humidity: 72%
You: "Generate an AI image of a cyberpunk cityscape at night"
Yuki402:
🔍 Searching for AI image generation services...
✓ Found: Heurist Mesh (Solana)
💰 Cost Analysis:
Service fee: 0.005 SOL (~$1.25)
Gas estimate: 0.00001 SOL (~$0.0025)
Total: 0.00501 SOL (~$1.25)
📊 Limit Check:
✓ Daily: 0.0035/0.01 SOL used (70% remaining)
✓ Weekly: 0.012/0.05 SOL used (76% remaining)
✓ Monthly: 0.045/0.2 SOL used (77.5% remaining)
✓ Balance: 0.156 SOL (sufficient)
⚡ Processing payment...
✓ Transaction signed
✓ Broadcast to Solana
✓ Confirmed: solscan.io/tx/5h7k...
⏱️ Time: 1.8 seconds
🎨 Generating image...
✓ Payment verified by Heurist
✓ AI model processing...
✓ Image generated!
[Stunning cyberpunk cityscape displayed]
📝 Transaction Receipt:
Amount: 0.005 SOL
Gas: 0.00001 SOL
Total: 0.00501 SOL
Block: 235,847,293
Timestamp: 2026-02-03 14:23:51 UTC
❌ Service temporarily offline
Trying alternative service...
✓ Found backup: AlternativeWeatherAPI
⚡ Retrying...
✓ Success!
❌ Insufficient balance
Required: 0.01 SOL (including gas)
Available: 0.005 SOL
💡 Add 0.005+ SOL to continue
📱 Quick options:
• Transfer from another wallet
• Buy on exchange (Coinbase, Kraken)
• Use faucet (devnet only)
❌ Daily spending limit reached
Limit: 0.01 SOL
Spent today: 0.01 SOL
Resets in: 8 hours 23 minutes
💡 Options:
• Wait for reset
• Increase daily limit (requires wallet signature)
• Use different wallet
❌ Transaction failed
Reason: Gas price too low
Suggested: 0.00002 SOL
You set: 0.00001 SOL
⚡ Retry with recommended gas? [Yes] [No]
Recent Payments
──────────────────────────────────────────────────
🟢 WeatherAPI 0.001 SOL 2 min ago
🟢 Heurist Mesh 0.005 SOL 15 min ago
🟢 IPFS Pinning 0.0005 SOL 1 hr ago
🔴 DataAPI Failed 2 hr ago
🟢 OpenAI Proxy 0.002 SOL 3 hr ago
──────────────────────────────────────────────────
Today: 0.0085 SOL (85% of daily limit)
Week: 0.0234 SOL (47% of weekly limit)
Month: 0.089 SOL (44.5% of monthly limit)
Recommended starter limits:
Daily: 0.01 SOL (~$2.50)
Weekly: 0.05 SOL (~$12.50)
Monthly: 0.2 SOL (~$50)
Service payment: 0.01 SOL
Gas estimate: 0.0001 SOL
Buffer (20%): 0.002 SOL
─────────────────────────
Recommended: 0.0121 SOL
Schedule Example:
Service: WeatherAPI
Amount: 0.001 SOL
Frequency: Daily at 9am UTC
Duration: 30 days
Total: 0.03 SOL
Current limits:
Daily: 0.01 SOL
Weekly: 0.05 SOL
Your usage:
Mon: 0.008 SOL
Tue: 0.009 SOL ← You're consistently near limit
Wed: 0.011 SOL ← Exceeded!