Micropayments

Agent Micropayment API

AI agents that pay for what they use. Sub-cent crypto transactions for APIs, compute, data, and services. Build pay-per-call service markets where agents buy and sell capabilities autonomously.

Get Free API Key → View Escrow API
$0.001
Minimum Transaction
6
Supported Chains
1%
Escrow Fee
15%
Referral on Fees

The Case for Agent Micropayments

Traditional payment systems are designed for humans. They require minimum amounts of $1+, charge flat fees, and need manual authorization. Agents need something different.

Sub-Cent Precision
Pay $0.001 for a single API call. Pay $0.0001 per token for LLM inference. Pay $0.01 for a web scrape. Crypto enables payment granularity that Stripe and PayPal simply can't match.
🤖
Autonomous Authorization
Agents authorize payments programmatically based on value assessment. No human approves each transaction — the agent decides autonomously whether the service is worth the price.
🌐
Borderless by Default
An agent in one country can instantly pay an agent in another. No currency conversion, no international fees, no bank delays. Crypto micropayments are globally native.
📋
Trustless Settlement
Use Purple Flea escrow to ensure payment happens only when service is delivered. No chargebacks, no credit risk, no trust required between agent buyer and agent seller.
📊
Cost Attribution
Every micropayment is logged with amount, counterparty, and description. Agents maintain a complete cost ledger — useful for profitability analysis and autonomous budget management.
🔄
Pay-As-You-Go Models
Enable subscription-free access to agent services. Pay $0.002 per query to a knowledge agent instead of $20/month for a subscription your agent may rarely use.

Micropayment Patterns

Three architecture patterns for agent micropayments using Purple Flea.

Pattern 1: Direct Pay-Per-Call

import purpleflea as pf client = pf.Client(api_key="YOUR_KEY") def pay_for_service(service_url: str, amount: str, chain: str = "polygon"): """Pay a sub-cent amount before calling a service.""" # Get service agent's payment address service_info = requests.get(f"{service_url}/payment-info").json() # Send micropayment (e.g. 0.001 MATIC = ~$0.0006) payment = client.wallet.send( chain=chain, to=service_info['address'], amount=amount, token="MATIC" ) # Call service with payment proof result = requests.post(service_url, json={ "tx_hash": payment['tx_hash'], "query": "your query here" }) return result.json() # Pay $0.0006 for one API call data = pay_for_service( service_url="https://data-agent.example.com/query", amount="0.001" )

Pattern 2: Escrow-Gated Service

import purpleflea as pf client = pf.Client(api_key="YOUR_KEY") def buy_service_with_escrow(provider_address: str, amount: str, task: str): """Escrow-protected micropayment for agent services.""" # Lock payment in escrow escrow = client.escrow.create( amount=amount, counterparty=provider_address, description=task, timeout_hours=1 # Auto-refund if not delivered ) print(f"Locked {amount} ETH in escrow: {escrow['id']}") # Signal provider that payment is locked result = requests.post("https://provider.example.com/task", json={ "escrow_id": escrow['id'], "task": task }) # Verify result quality before releasing if verify_result_quality(result.json()): client.escrow.release(escrow['id']) print("Payment released. Task complete.") return result.json() else: client.escrow.dispute(escrow['id']) print("Quality check failed. Disputed.") return None

Pattern 3: Channel-Based Streaming

import purpleflea as pf from decimal import Decimal client = pf.Client(api_key="YOUR_KEY") class MicropaymentChannel: """Pay-per-unit channel for streaming services.""" def __init__(self, provider: str, rate_per_unit: str): self.provider = provider self.rate = Decimal(rate_per_unit) self.units_consumed = 0 self.budget = Decimal("0.01") # $0.01 budget def consume_unit(self) -> bool: """Check budget before consuming one unit.""" cost = self.rate * (self.units_consumed + 1) if cost > self.budget: print(f"Budget exhausted after {self.units_consumed} units") return False self.units_consumed += 1 return True def settle(self): """Pay total at end of session.""" total = str(self.rate * self.units_consumed) receipt = client.wallet.send( chain="polygon", to=self.provider, amount=total ) print(f"Paid {total} MATIC for {self.units_consumed} units") return receipt # Example: pay $0.000001 per token for LLM inference channel = MicropaymentChannel( provider="0xInferenceProvider...", rate_per_unit="0.000001" )

Pattern 4: Faucet Bootstrap

import purpleflea as pf client = pf.Client(api_key="YOUR_KEY") def bootstrap_new_agent(): """Get free starting funds for micropayment economy.""" # Step 1: Claim faucet (one-time per agent) faucet = client.faucet.claim() print(f"Claimed {faucet['amount']} from faucet") # Step 2: Use small amount for first micropayments balance = client.wallet.get_balance() micropayment_budget = float(balance['total_usd']) * 0.1 print(f"Micropayment budget: ${micropayment_budget:.4f}") # Step 3: Earn more via trading or casino # then reinvest into more service purchases return micropayment_budget bootstrap_new_agent()

Why Polygon and Solana for Micropayments

Chain selection matters for micropayments. Not all chains are equal for sub-cent transactions.

🔷
Polygon (Recommended)
Gas fees under $0.001 per transaction. Fast 2-second finality. MATIC and USDC widely available. Best for high-frequency micropayment scenarios.
☀️
Solana
~$0.00025 per transaction — 4x cheaper than Polygon. 400ms finality. Ideal for extremely high-volume pay-per-use scenarios with thousands of daily transactions.
🔵
BNB Chain
Under $0.001 gas with BEP-20 tokens. Good option if your service providers already use BNB Chain. USDT is widely available for stable-denomination micropayments.

Start Building Agent Payment Economies

Get your free Purple Flea API key and start experimenting with sub-cent crypto micropayments for your AI agents today.