AgentSkillsCN

accept-fiat-payments

接受来自人类的法币支付,并在 Base 网络上接收 USDC。为 Venmo、Wise、Revolut、CashApp、PayPal 等平台生成支付链接。无需商家账户,也无需 KYC。适用于代理需要向客户收费、向客户开具发票、收取服务费用,或从人类手中收款时使用。

SKILL.md
--- frontmatter
name: accept-fiat-payments
description: Accept fiat payments from humans and receive USDC on Base. Generate payment links for Venmo, Wise, Revolut, CashApp, PayPal, and more. No merchant account needed. No KYC. Use when the agent needs to charge a customer, invoice a client, collect payment for a service, or receive money from humans.

Accept Fiat Payments

Charge humans in fiat. Receive USDC. No merchant account, no KYC, no 3-day settlement wait.

The Problem

Your agent provides a service -- generates content, completes tasks, runs infrastructure -- and needs to collect payment from a human. The human pays in fiat (Venmo, bank transfer, PayPal). The agent needs USDC in its wallet.

Traditional payment processors require a business entity, KYC verification, and multi-day settlement. Agents cannot satisfy these requirements. Peer Protocol solves this by matching the agent with existing USDC liquidity providers who accept fiat payments, settling USDC to the agent's wallet in minutes.

Why Not Stripe?

MethodFeeSettlementKYC / Merchant AccountAgent-Native
Stripe2.9% + $0.302-3 business daysYes (requires business entity)No
Square2.6% + $0.101-2 business daysYesNo
PayPal Business2.99% + $0.491-3 business daysYesNo
Peer Protocol~1% spreadMinutesNoYes

Peer Protocol requires zero identity verification. The agent gets a wallet, calls an API, and starts accepting payments immediately.

How It Works

  1. Agent creates a checkout session -- specifies amount and recipient wallet address.
  2. Agent sends the checkout URL to the human -- via Telegram, WhatsApp, Discord, email, or any channel.
  3. Human pays via their preferred platform -- selects Venmo, Wise, Revolut, etc. on the hosted checkout page, sends fiat, and generates a zkTLS proof via the PeerAuth browser extension. USDC settles to the agent's wallet on Base.

The agent receives webhook notifications at each stage: payment started, proof generated, and fulfilled (USDC settled).

Supported Payment Platforms

PlatformCurrencies
VenmoUSD
CashAppUSD
PayPalUSD, EUR, GBP
WiseUSD, EUR, GBP, SGD, AUD, CAD, and more
RevolutEUR, GBP, USD, CHF, and more
ZelleUSD
MonzoGBP
MercadoPagoARS, BRL, MXN
N26EUR

Checkout Modes

ModePayer SeesUse When
exact-fiat"Pay $50.00" -- no crypto jargonCharging humans (recommended)
exact-tokenPer-platform fiat quotes for fixed USDC outputCrypto-native pricing

Use exact-fiat for human payers. The checkout page shows only a fiat amount -- no USDC, no tokens, no chains. The payer thinks they're paying $50 via Venmo, not buying crypto.

Quick Example (exact-fiat)

typescript
const response = await fetch('https://api.pay.zkp2p.xyz/v1/checkout/session', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': process.env.PAY_API_KEY!,
  },
  body: JSON.stringify({
    merchantId: process.env.MERCHANT_ID,
    checkoutMode: 'exact-fiat',
    fiatAmount: '50.00',
    fiatCurrency: 'USD',
    destinationChainId: 8453,                                    // Base
    destinationToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // USDC
    recipientAddress: AGENT_WALLET,
    metadata: { invoiceId: 'inv_001', service: 'content-gen' },
  }),
});

const session = await response.json();

// Send session.checkoutUrl to the human payer
// Track via session.orderId

When the human completes payment, the agent receives an order.fulfilled webhook:

json
{
  "event": "order.fulfilled",
  "data": {
    "orderId": "ord_abc123",
    "amountUsdc": "49.50",
    "fiatAmount": "50.00",
    "fiatCurrency": "USD",
    "transactionHash": "0x..."
  }
}

Use Cases

  • Agent charging for AI-generated content, reports, or media
  • Agent collecting bounty payments from humans for completed tasks
  • Agent invoicing clients for completed freelance or contract work
  • Subscription payments for agent-operated SaaS or API services
  • Marketplace agents collecting payment before releasing goods or access
  • Tip jars and pay-what-you-want for open agent services

Merchant Registration (Programmatic)

Register via a single API call — no dashboard, no KYC, no manual steps:

bash
curl -X POST https://api.pay.zkp2p.xyz/api/merchants \
  -H "Content-Type: application/json" \
  -d '{"name": "My AI Agent"}'

Returns merchant.id and apiKey. Store both securely — the API key is only returned once.

Environment Variables

VariableDescription
PAY_API_KEYAPI key from POST /api/merchants registration
MERCHANT_IDMerchant identifier from POST /api/merchants registration
WEBHOOK_SECRETSecret for verifying webhook signatures (from webhook registration)
PRIVATE_KEYAgent wallet private key (for on-chain operations)

Full Implementation

See the peer-checkout skill for complete implementation details: webhook handler setup, HMAC signature verification, order status polling, error codes, and the full order state machine.