The core of Miko402. This is where HTTP 402 meets blockchain—where payment happens seamlessly between your request and the data you receive. Miko handles the entire flow so you don't have to.
What Are Autonomous Payments?
Traditional API payments: Find service → Register → Add payment method → Subscribe → Wait for approval → Access data
Miko402 autonomous payments: You → "Get me weather data" → Miko handles everything → 2 seconds later → Data delivered
No clicking. No forms. No manual approvals. Set your spending limits once, and Miko operates within them automatically.
The Payment Flow
1. Detection — Miko Intercepts HTTP 402
You: "Get me weather data for London"
↓
Miko reaches out: GET https://weather-api.x402.org/v1/current?city=London
↓
API responds: HTTP 402 Payment Required
↓
Miko reads payment details:
{
"amount": "0.001",
"token": "SOL",
"recipient": "weather-api.sol",
"chain": "solana"
}
The API is saying: "This data costs 0.001 SOL. Pay and I'll deliver."
2. Verification — Limit Checks
Before spending a single lamport, Miko verifies:
Daily limit — Have you hit today's cap?
Weekly limit — Still within weekly budget?
Monthly limit — Month-to-date within bounds?
Wallet balance — Enough crypto for payment + gas?
If any check fails, the payment is rejected and you're notified. No money leaves your wallet.
If all checks pass, payment proceeds.
3. Processing — Transaction Execution
Your funds are now on-chain. Immutable, verified, and complete.
4. Delivery — Data Returned
Total time from request to data: 3–5 seconds on Solana.
Payment Types
Native Tokens
Pay with a blockchain's native currency:
Solana: SOL (~$0.01 gas fees)
Ethereum: ETH (~$1–20 gas fees)
Polygon: MATIC (~$0.05 gas fees)
Base: ETH (~$0.05 gas fees)
Solana is recommended for routine payments due to its low, consistent fees.
ERC-20 Tokens
Pay with standard tokens:
USDC — Dollar-pegged stablecoin, widely accepted
USDT — Tether
DAI — Decentralized stablecoin
Custom tokens — Service-specific or protocol tokens
Routes to the cheapest option when multiple chains are available
You don't pick the chain. Miko selects the optimal one.
Real-World Example
Total time: 5.2 seconds from request to image.
Security Features
Smart Contract Spending Limits
Your limits are enforced on-chain:
On-chain enforcement means limits cannot be bypassed, manipulated, or tampered with. Mathematics enforces your rules.
Transaction Transparency
Every payment is:
Recorded on blockchain — Permanent, public record
Verifiable by anyone — Check on any block explorer
Fully detailed — Service, amount, gas, timestamp
Linked to your wallet — Complete audit trail
No hidden charges. No surprise fees.
Non-Custodial Architecture
Miko402 respects the fundamental principle: your keys, your crypto.
You hold your private keys at all times
Miko never has direct access to your funds
All transactions are signed by your wallet
You can revoke access instantly
Miko facilitates. You control.
Payment States
🟡 Pending
Transaction submitted, waiting for validator processing.
Solana: 1–3 seconds typical
Ethereum: 12–15 seconds typical
🔵 Confirming
Transaction included in a block, achieving finality.
Solana: 1–2 additional seconds
Ethereum: Additional confirmations may be required
🟢 Completed
Payment confirmed. Service accessed. Data delivered. Transaction is now immutable.
🔴 Failed
Transaction reverted or rejected.
Common causes:
Insufficient balance
Gas price too low (network congestion)
Smart contract revert (limits exceeded)
Failed transactions do not deduct the service fee—only gas is consumed.
🟣 Refunded
Service failed to deliver; provider issued a refund via a new on-chain transaction.
Gas Fees
What Are Gas Fees?
Gas is the fee paid to blockchain validators for processing your transaction. Every on-chain operation incurs a gas cost.
Gas Costs by Chain
Chain
Typical Gas
Variability
Solana
~$0.01
Consistent
Polygon
~$0.05
Low
Base
$0.05–0.20
Moderate
Ethereum
$1–20
High (congestion-dependent)
Gas Optimization
Miko optimizes gas automatically:
Estimates before sending
Uses efficient transaction structures
Alerts you when gas is unusually high
Batch payments coming soon
Handling Failures
Service Unavailable
Miko routes to alternatives automatically when possible.
Insufficient Balance
Daily Limit Exceeded
Transaction Reverted
Payment History
View your complete transaction history:
Every transaction includes a clickable link to the block explorer with full details.
Best Practices
1. Start Conservative
Begin with low limits:
Learn the system risk-free. Scale up when comfortable.
2. Monitor Daily
Review transaction history each day. Verify charges match expectations. Look for unusual activity. Adjust limits based on actual usage patterns.
3. Verify Services First
Before using a new service:
Check verification status in the x402 registry
Test with the smallest possible payment
Verify the service delivered as promised
Then scale up usage
4. Maintain Adequate Balance
Keep a buffer in your wallet:
5. Verify on Block Explorer
Always check transactions on-chain. Miko provides clickable links to block explorers for every payment, giving you a permanent, verifiable receipt.
Advanced Features (Coming Soon)
Scheduled Recurring Payments
Set-and-forget payment schedules for regular data feeds and subscriptions.
Multi-Signature Support
Require 2-of-3 approvals for organizational use, with role-based spending limits and complete audit trails.
Smart Payment Routing
Automatic chain selection, L2 optimization, token bridging, and batch payments for maximum efficiency.
Troubleshooting
Payment stuck pending for >5 minutes
Check the block explorer. Transaction may be queued due to congestion, or gas may be too low. Wait 15–30 minutes, or cancel and retry with higher gas.
Limits exceeded unexpectedly
Check all three limit tiers (daily, weekly, monthly). You may be consistently near one limit. Increase that specific limit to match your usage pattern.
Transaction fails immediately
Check wallet balance (payment + gas + buffer), service status on x402 registry, and block explorer for error details. Try a different service as a diagnostic step.
⚡ 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"
Miko402:
🔍 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 (65% 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
[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
✓ Success
❌ Insufficient balance
Required: 0.01 SOL (including gas)
Available: 0.005 SOL
Add 0.005+ SOL to continue.
❌ 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 a different wallet
❌ Transaction failed
Reason: Gas price too low
Suggested: 0.00002 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
🟢 AI 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)
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