Autonomous Payments

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

Stablecoins eliminate price volatility: $1 today = $1 tomorrow.

Multi-Chain Routing

Miko402 is chain-agnostic:

  • Detects which chains the service accepts

  • Uses the appropriate wallet connection

  • Handles gas calculations automatically

  • 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.

External Resources:


Questions about autonomous payments?

📧 Email: [email protected]envelope 𝕏 Twitter: @miko402xyzarrow-up-right

Ready to try it? Visit miko402.xyzarrow-up-right and experience autonomous payments firsthand.

Last updated