Making Payments
This guide walks you through making your first autonomous payment and understanding the payment process.
Quick Start
1. Connect Your Wallet
First, connect a Web3 wallet:
Click "Connect Wallet" button
Choose MetaMask, Coinbase Wallet, or another provider
Approve the connection
2. Make a Request
Tell Jarvis402 what you need:
"Get me weather data for San Francisco"3. Review Payment
Jarvis402 will show you:
Found: WeatherAPI Premium
Cost: 0.001 ETH (~$2.50)
✓ Within spending limits4. Automatic Processing
Payment happens automatically:
Transaction submitted
Confirmed in ~2 seconds
Service accessed
Data delivered
Detailed Payment Flow
Step 1: Service Discovery
When you make a request, Jarvis402:
Parses your intent: Understands what service you need
Queries x402 Registry: Finds compatible services
Checks availability: Ensures service is online
Retrieves pricing: Gets current cost
Step 2: Pre-Flight Checks
Before processing payment:
Checking:
✓ Wallet connected
✓ Sufficient balance (0.01 ETH available)
✓ Within daily limit (0.003/0.01 ETH used)
✓ Within weekly limit (0.015/0.05 ETH used)
✓ Within monthly limit (0.08/0.2 ETH used)
✓ Service verifiedStep 3: Transaction Construction
Jarvis402 builds the transaction:
{
to: servicePaymentAddress,
value: "0.001 ETH",
data: paymentProofData,
gas: estimatedGas,
nonce: nextNonce
}Step 4: Signing & Submission
Your wallet automatically:
Signs the transaction
Submits to blockchain
Returns transaction hash
Step 5: Confirmation
Wait for blockchain confirmation:
Transaction: 0x1234...
Status: Pending...
Block: Waiting...
───────────────────
✓ Confirmed in block 12345678
✓ 2.1 seconds elapsedStep 6: Service Access
With payment confirmed:
Jarvis402 retries service request
Includes payment proof in headers
Service validates payment
Returns requested data
Payment Methods
Native Tokens
Pay with blockchain's native currency:
Ethereum
Amount: 0.001 ETH
Gas: ~0.00015 ETH
Total: 0.00115 ETHSolana
Amount: 0.01 SOL
Gas: ~0.000005 SOL
Total: 0.010005 SOLERC20 Tokens
Pay with stablecoins or other tokens:
USDC
Amount: 2.50 USDC
Gas: 0.00015 ETH
Note: Gas still paid in native tokenAutomatic Chain Selection
Jarvis402 automatically uses the correct chain:
Service specifies accepted chains
Jarvis402 selects cheapest/fastest
Prompts wallet to switch if needed
Understanding Costs
Service Fee
What the service charges:
Base Price: 0.001 ETH
Per-request fee determined by serviceGas Fee
Blockchain transaction cost:
Gas Price: 20 gwei
Gas Limit: 21,000
Total Gas: 0.00042 ETH
Varies by:
- Network congestion
- Transaction complexity
- Chain (Ethereum > Polygon)Total Cost
Service Fee: 0.001 ETH
Gas Fee: 0.00042 ETH
──────────────────────
Total: 0.00142 ETHPayment Examples
Example 1: Simple Data Request
User: "Get current Bitcoin price"
Jarvis402:
Service: CoinGecko API
Cost: 0.0005 ETH
Processing...
✓ Transaction: 0xabc...
✓ Confirmed
Bitcoin: $42,150.23
24h Change: +2.5%Example 2: AI Image Generation
User: "Generate an image of a sunset"
Jarvis402:
Service: Heurist Mesh
Cost: 0.002 ETH
Processing...
✓ Transaction: 0xdef...
✓ Confirmed
✓ Generating...
[Image displayed]
Download: sunset_001.pngExample 3: File Storage
User: "Pin this file to IPFS"
Jarvis402:
Service: Pinata
Cost: 0.001 ETH
File size: 2.5 MB
Processing...
✓ Transaction: 0xghi...
✓ Confirmed
✓ Uploading...
IPFS Hash: Qm...
Gateway URL: https://...Payment Status
Pending
⏳ Transaction submitted
Hash: 0x1234...
Status: Pending
Time: 3 secondsWhat's happening: Transaction in mempool, waiting for miners
Confirming
🔄 Transaction confirming
Hash: 0x1234...
Block: 12345678
Confirmations: 1/3What's happening: Included in block, waiting for more confirmations
Completed
✅ Payment successful
Hash: 0x1234...
Block: 12345678
Cost: 0.00142 ETHWhat's happening: Payment confirmed, service accessed
Failed
❌ Transaction failed
Hash: 0x1234...
Reason: Gas too lowWhat's happening: Transaction reverted, funds returned
Handling Issues
Insufficient Balance
❌ Cannot process payment
Required: 0.01 ETH
Balance: 0.005 ETH
Action: Add 0.005+ ETH to walletGas Price Spike
⚠️ High gas prices detected
Normal: $1-2
Current: $15
Continue anyway? [Yes] [No] [Wait]Service Unavailable
❌ Service temporarily unavailable
Service: WeatherAPI
Status: 503
⟳ Retry in 30 seconds? [Yes] [No]Limit Exceeded
❌ Daily spending limit exceeded
Limit: 0.01 ETH
Spent: 0.01 ETH
Attempted: 0.002 ETH
Options:
- Wait until tomorrow
- Increase limit
- Use different walletBest Practices
Before Making Payments
Verify Service: Check if service is verified in registry
Check Price: Ensure cost is reasonable
Review Limits: Confirm within your spending limits
Check Balance: Ensure sufficient funds + gas buffer
During Payment
Don't Close: Keep browser open during transaction
Wait for Confirmation: Don't retry immediately
Check Status: Monitor transaction hash on explorer
After Payment
Verify Receipt: Check transaction on block explorer
Save Hash: Keep transaction hash for records
Review Service: Was the service satisfactory?
Update Limits: Adjust if needed based on usage
Security Tips
Protect Your Wallet
Never share private keys
Use hardware wallet for large amounts
Keep seed phrase offline
Enable 2FA where possible
Verify Services
Before first use:
Check service verification status
Read reviews from other users
Test with small payment first
Verify service URL/address
Monitor Spending
Review transaction history daily
Set conservative limits initially
Enable spending alerts
Use separate wallet for testing
Recognize Scams
Red flags:
Unverified services
Unusually low prices
Requests for private keys
Off-chain payment requests
Advanced Features
Batch Payments
Coming soon:
"Pay for 10 API requests in advance"Scheduled Payments
Coming soon:
"Set up recurring weekly payment"Multi-Chain Routing
Coming soon:
Auto-select cheapest chain
Bridge tokens when needed
Optimize for speed vs cost
Transaction History
View all payments:
Recent Transactions
────────────────────────────────────
Jan 31 WeatherAPI 0.001 ETH ✓
Jan 31 Heurist Mesh 0.002 ETH ✓
Jan 30 IPFS Pin 0.001 ETH ✓
Jan 30 DataAPI 0.001 ETH ❌
────────────────────────────────────
Filters:
[All] [Successful] [Failed] [Pending]
Export: [CSV] [JSON]Troubleshooting
Payment Stuck
Solution:
Check block explorer
Verify transaction is pending
Wait 5-10 minutes
Contact support if persists
Wrong Amount Charged
Solution:
Check transaction on explorer
Verify service pricing
Account for gas fees
Contact service provider
Service Didn't Deliver
Solution:
Save transaction hash
Contact service support
Request refund if eligible
Report to Jarvis402 support
Learn More
Need help? Email [email protected]
Last updated