Accept Payments

Crypto Payment Processor
for AI Agents

AI agents that provide services โ€” data analysis, trading signals, domain research โ€” can now charge other agents and humans in USDC. Purple Flea's payment processor handles invoicing, confirmation, and settlement end to end.

Start Accepting Payments โ†’ Read Docs

How Agent Payments Work

Three steps from service request to settled payment. No intermediaries, no bank accounts, no waiting periods.

1
Generate Invoice

Your agent creates a USDC invoice with a unique payment address, amount, description, and expiry time via the API.

2
Payer Sends USDC

The paying agent or human sends the exact USDC amount to the invoice address. Payment can come from any wallet on any supported chain.

3
Webhook Confirms

Within seconds of on-chain confirmation, a webhook fires to your endpoint. The service is unlocked and funds are settled to your wallet.

โœ“ Payments settle directly to your agent wallet โ€” no custodial holding periods, no manual withdrawal steps, no platform risk.

Python: Create Invoice

Generate a payment invoice with one API call. The response includes everything needed to display a payment UI or send payment instructions to the buying agent.

import purpleflea

payments = purpleflea.PaymentProcessorClient(api_key="YOUR_KEY")

# Create a payment invoice
invoice = payments.create_invoice(
    agent_id="agent_data_service",
    amount_usdc=2.50,
    description="30-day market data subscription",
    customer_agent_id="agent_buyer_001",  # optional
    expires_in_minutes=60,
    webhook_url="https://myagent.example.com/payment-confirmed"
)

print(f"Invoice ID:  {invoice['invoice_id']}")
print(f"Pay to:      {invoice['payment_address']}")
print(f"Amount:      ${invoice['amount_usdc']} USDC")
print(f"Expires:     {invoice['expires_at']}")
print(f"QR code:     {invoice['qr_code_url']}")

# Check payment status
status = payments.get_invoice_status(invoice["invoice_id"])
print(f"Status: {status['status']}")  # pending | paid | expired
Sample Invoice Response
invoice_id: inv_8a2f3c91d7
payment_address: 0xA0b86991...eB48
amount_usdc: 2.50
description: "30-day market data..."
status: pending
expires_at: 2026-03-04T14:00Z
qr_code_url: https://purpleflea.com/qr/...
chain: ethereum
status: paid (after payment)
Multi-chain invoices

Generate invoices on Ethereum, Polygon, Arbitrum, Solana, and more. The payer picks their preferred chain and the payment is bridged automatically.

Webhook Confirmation Example

A minimal Flask server that receives payment confirmations and unlocks services automatically โ€” no polling required.

from flask import Flask, request
import purpleflea

app = Flask(__name__)

@app.route("/payment-confirmed", methods=["POST"])
def handle_payment():
    event = request.json

    if event["type"] == "payment.confirmed":
        invoice_id = event["data"]["invoice_id"]
        amount     = event["data"]["amount_usdc"]
        from_agent = event["data"]["from_agent_id"]

        print(f"Payment received: ${amount} USDC from {from_agent}")
        # Unlock the purchased service
        unlock_service(invoice_id)

    return {"status": "ok"}
โšก
Sub-second delivery

Webhooks fire within 1-2 seconds of blockchain confirmation โ€” faster than any polling interval.

๐Ÿ”
Automatic retry

If your endpoint returns a non-200 response, Purple Flea retries with exponential backoff for up to 24 hours.

๐Ÿ”
HMAC signatures

Every webhook is signed with your secret key. Verify the signature header to confirm authenticity before processing.

Use Cases

Any AI agent that produces value can monetize it with the payment processor. Here are the three most common patterns.

๐Ÿค–
Agent SaaS

Charge per API call or per time period for any service your agent provides. Create an invoice automatically each time a client requests access, and gate the response behind payment confirmation via webhook.

$0.001 per API call โ†’ micropayments
๐Ÿ“Š
Data Marketplace

Sell curated market data subscriptions, sentiment analysis feeds, or on-chain analytics to other agents. The payment processor handles subscription renewal invoices automatically at configurable intervals.

$2.50/month โ†’ market data subscription
๐Ÿ’ก
Consulting

Agents specializing in trading strategy, risk analysis, or domain valuation can charge for recommendations on a per-report basis. Generate an invoice, deliver the report on payment confirmation, fully automated.

$15 per trading signal report
Instant
Settlement to your wallet
0.5%
Processing fee
USDC + USDT + ETH
Accepted currencies

Start Accepting Crypto Payments

Your agent built something valuable. Now charge for it. USDC invoices, webhooks, and automatic settlement in one API.