Autonomous Payments

Alfred402's core feature is autonomous payment processing using the x402 protocol. This page explains how the system automatically handles payments on your behalf.

Overview

Autonomous payments allow Alfred402 to:

  • Detect when a service requires payment (HTTP 402)

  • Process blockchain transactions automatically

  • Complete payments without manual approval

  • Stay within your configured spending limits

How It Works

1. Payment Detection

When you request access to a paid service, the flow works like this:

You: "Get me weather data from WeatherAPI"

Alfred402 makes HTTP request to service

Service returns: HTTP 402 Payment Required

Alfred402 reads x402 payment details

2. Limit Verification

Before processing any payment, Alfred402 checks:

  • Daily Spending Limit: Have you exceeded today's limit?

  • Weekly Spending Limit: Have you exceeded this week's limit?

  • Monthly Spending Limit: Have you exceeded this month's limit?

  • Single Transaction Limit: Is this payment within acceptable range?

If any limit would be exceeded, the payment is rejected and you're notified.

3. Automatic Processing

If limits check out:

4. Service Access

Once payment is confirmed:

Total time: ~3-5 seconds from request to delivery!

Payment Types Supported

Native Token Payments

Pay with the blockchain's native currency:

  • Ethereum: ETH

  • Solana: SOL

  • Polygon: MATIC

  • Base: ETH

ERC20 Token Payments

Pay with standard tokens:

  • USDC, USDT, DAI

  • Custom x402 tokens

  • Service-specific tokens

Multi-Chain Support

Alfred402 is blockchain agnostic:

  • Automatically detects required chain

  • Uses appropriate wallet connection

  • Handles gas fees correctly per chain

Payment Flow Example

Here's a real-world example:

Security Features

Spending Limits

You maintain full control with configurable limits:

Transaction Transparency

Every payment is:

  • ✅ Recorded on-chain (publicly verifiable)

  • ✅ Displayed with transaction hash

  • ✅ Includes service details

  • ✅ Shows exact costs

Non-Custodial

  • You control your private keys

  • Alfred402 never holds your funds

  • All transactions signed by your wallet

  • Revoke access anytime

Payment States

Payments go through these states:

  1. Pending - Transaction submitted to blockchain

  2. Confirming - Waiting for block confirmation

  3. Completed - Payment confirmed, service accessed

  4. Failed - Transaction reverted or rejected

  5. Refunded - Service failed to deliver, funds returned

Gas Fees

What Are Gas Fees?

Gas fees are transaction costs paid to blockchain validators:

  • Variable based on network congestion

  • Typically $0.01 - $1.00

  • Added to service payment cost

Gas Optimization

Alfred402 optimizes gas usage:

  • Estimates fees before transaction

  • Uses efficient transaction types

  • Batches multiple payments when possible

  • Alerts if fees are unusually high

Handling Payment Failures

If a payment fails:

Service Unavailable

Insufficient Funds

Limit Exceeded

Transaction Reverted

Payment History

View all your transactions:

Click any transaction to see:

  • Full transaction hash

  • Block explorer link

  • Service details

  • Timestamp

  • Gas fees

Best Practices

Start Conservative

Begin with low limits while learning:

Monitor Spending

Check your dashboard daily:

  • Review transaction history

  • Verify service charges

  • Adjust limits as needed

Verify Services

Before using a new service:

  • Check if it's verified in x402 Registry

  • Read reviews from other users

  • Test with small payments first

Keep Wallet Funded

Maintain sufficient balance:

  • Service payment amount

  • Gas fees (buffer ~20%)

  • Emergency reserve

Review Transaction Hashes

Always verify payments on block explorer:

  • Confirms transaction was successful

  • Shows actual cost (including gas)

  • Provides permanent record

Advanced Features

Scheduled Payments

Coming soon:

  • Set up recurring service payments

  • Auto-renew subscriptions

  • Batch process multiple services

Multi-Signature Support

For organizations:

  • Require multiple approvals

  • Set role-based limits

  • Audit trail for all transactions

Payment Routing

Optimize costs:

  • Automatically select cheapest chain

  • Use L2 solutions when available

  • Bridge tokens as needed

Troubleshooting

"Payment stuck in pending"

Solution: Check blockchain explorer

  • May need higher gas price

  • Wait for network congestion to clear

  • Contact support if >10 minutes

"Limits keep getting exceeded"

Solution: Adjust your limits

"Transaction fails immediately"

Possible causes:

  • Insufficient gas

  • Network congestion

  • Invalid service endpoint

Learn More


Questions? Email [email protected]

Last updated