Install
openclaw skills install @plagtech/agent-paymentsUnified payment skill for AI agents. Four payment rails in one skill: Stripe for credit card and fiat payments, Coinbase Commerce for accepting crypto from customers, Coinbase CDP for crypto wallets and transfers, and Spraay x402 for batch crypto payments and payroll. Use when an agent needs to accept payments, charge customers, create checkout sessions, accept crypto, manage wallets, send transfers, batch pay, run payroll, or create invoices.
openclaw skills install @plagtech/agent-paymentsUnified payment orchestration for AI agents. Four payment rails, one skill.
| Rail | What It Does | Env Var |
|---|---|---|
| Stripe | Accept fiat — cards, invoices, subscriptions | STRIPE_SECRET_KEY |
| Coinbase Commerce | Accept crypto — BTC, ETH, USDC checkout | COINBASE_COMMERCE_API_KEY |
| Coinbase CDP | Send crypto — wallets, single transfers | CDP_API_KEY |
| Spraay x402 | Batch send — payroll, multi-recipient, invoices | SPRAAY_GATEWAY_URL |
All requests go exclusively to the declared API endpoints for each provider. No data is sent to any other external services. The skill works with any combination of rails — set only the env vars you need.
All payment operations involve real funds. Whether fiat or crypto, every transaction in this skill moves real money. The agent must always confirm the following with the user before executing any payment:
Never execute payments without explicit user confirmation.
| Use Case | Rail |
|---|---|
| Charge a customer in USD | Stripe |
| Create an invoice (fiat) | Stripe |
| Recurring subscription | Stripe |
| Accept BTC/ETH/USDC from a customer | Coinbase Commerce |
| Create an agent crypto wallet | Coinbase CDP |
| Send crypto to one address | Coinbase CDP |
| Pay 10-1000 people at once | Spraay x402 |
| Monthly payroll in USDC | Spraay x402 |
| Invoice a client in crypto | Spraay x402 |
Accept credit card payments, create invoices, manage subscriptions.
Requires STRIPE_SECRET_KEY.
Confirm the product, price, and currency with the user first.
curl -X POST "https://api.stripe.com/v1/checkout/sessions" \
-u "$STRIPE_SECRET_KEY:" \
-d "mode=payment" \
-d "success_url=https://example.com/success" \
-d "cancel_url=https://example.com/cancel" \
-d "line_items[0][price_data][currency]=usd" \
-d "line_items[0][price_data][unit_amount]=5000" \
-d "line_items[0][price_data][product_data][name]=Service Payment" \
-d "line_items[0][quantity]=1"
Returns a checkout URL to share with the customer.
curl -X POST "https://api.stripe.com/v1/payment_intents" \
-u "$STRIPE_SECRET_KEY:" \
-d "amount=5000" \
-d "currency=usd" \
-d "payment_method_types[]=card"
Confirm invoice details with the user first.
curl -X POST "https://api.stripe.com/v1/invoiceitems" \
-u "$STRIPE_SECRET_KEY:" \
-d "customer=cus_..." \
-d "amount=5000" \
-d "currency=usd" \
-d "description=Consulting — March 2026"
curl -X POST "https://api.stripe.com/v1/subscriptions" \
-u "$STRIPE_SECRET_KEY:" \
-d "customer=cus_..." \
-d "items[0][price]=price_..."
curl "https://api.stripe.com/v1/payment_intents/pi_..." \
-u "$STRIPE_SECRET_KEY:"
Confirm refund with the user first.
curl -X POST "https://api.stripe.com/v1/refunds" \
-u "$STRIPE_SECRET_KEY:" \
-d "payment_intent=pi_..."
Accept cryptocurrency payments from customers. They pay in BTC, ETH, USDC,
or other supported coins via a hosted checkout page. Funds settle to your
Coinbase account. Requires COINBASE_COMMERCE_API_KEY.
Confirm the amount and currency with the user first.
curl -X POST "https://api.commerce.coinbase.com/charges" \
-H "Content-Type: application/json" \
-H "X-CC-Api-Key: $COINBASE_COMMERCE_API_KEY" \
-d '{
"name": "Service Payment",
"description": "Payment for consulting services",
"pricing_type": "fixed_price",
"local_price": {
"amount": "100.00",
"currency": "USD"
}
}'
Returns hosted_url (Coinbase checkout page to share with customer) and
expires_at (charges expire after 60 minutes).
curl "https://api.commerce.coinbase.com/charges/CHARGE_ID" \
-H "X-CC-Api-Key: $COINBASE_COMMERCE_API_KEY"
Status flow: NEW → PENDING → CONFIRMED / FAILED / EXPIRED
curl -X POST "https://api.commerce.coinbase.com/charges/CHARGE_ID/cancel" \
-H "X-CC-Api-Key: $COINBASE_COMMERCE_API_KEY"
Create wallets and send crypto. For agent-managed funds and single transfers.
Requires CDP_API_KEY.
curl -X POST "https://api.developer.coinbase.com/platform/v1/wallets" \
-H "Authorization: Bearer $CDP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"network": "base"}'
Confirm recipient, amount, and token with the user first.
curl -X POST "https://api.developer.coinbase.com/platform/v1/wallets/WALLET_ID/transfers" \
-H "Authorization: Bearer $CDP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination": "0xRecipient...",
"amount": "100",
"asset": "usdc",
"network": "base"
}'
curl "https://api.developer.coinbase.com/platform/v1/wallets/WALLET_ID/balances" \
-H "Authorization: Bearer $CDP_API_KEY"
Pay multiple recipients in one transaction. 60-80% gas savings vs individual
transfers. Pay-per-call via x402 micropayments, no API key needed.
Uses SPRAAY_GATEWAY_URL.
Confirm all recipients, amounts, token, and chain with the user first.
curl -X POST "$SPRAAY_GATEWAY_URL/api/batch-payment" \
-H "Content-Type: application/json" \
-d '{
"recipients": [
{"address": "alice.eth", "amount": "3000"},
{"address": "bob.base", "amount": "2500"},
{"address": "0xCCC...999", "amount": "4000"}
],
"token": "USDC",
"chain": "base",
"memo": "March 2026 payroll"
}'
If you receive HTTP 402, pay the micropayment and retry with the
X-PAYMENT proof header.
curl -X POST "$SPRAAY_GATEWAY_URL/api/create-invoice" \
-H "Content-Type: application/json" \
-d '{
"recipient": "0xABC...123",
"amount": "500",
"token": "USDC",
"chain": "base",
"memo": "March consulting"
}'
curl "$SPRAAY_GATEWAY_URL/api/price?symbol=ETH"
curl "$SPRAAY_GATEWAY_URL/api/resolve?name=vitalik.eth"
Supported chains: Base, Ethereum, Arbitrum, Polygon, BNB Chain, Avalanche, Solana, Unichain, Plasma, BOB.
No payment or API key required:
GET $SPRAAY_GATEWAY_URL/api/price?symbol=ETH — Token pricesGET $SPRAAY_GATEWAY_URL/api/resolve?name=vitalik.eth — Name resolutionGET $SPRAAY_GATEWAY_URL/api/health — Gateway health checkGET $SPRAAY_GATEWAY_URL/api/chains — Supported chains402 — x402 payment required. Follow response body instructions.400 — Bad request. Check parameters.401 — Missing or invalid API key (Stripe, Commerce, or CDP).404 — Endpoint not found.500 — Server error. Retry after a moment./api/price to show USD equivalents for crypto payments.