Hybrid x402 + Stripe machine payments: agents pay USDC via x402, Spraay executes multi-chain DeFi ops, Stripe settles fiat for merchants
spraay-stripe-machine-payments is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on agentic-commerce, ai-agents, base, defi. It currently has 1 GitHub stars and 0 forks, and sits alongside related tools like x402-wiki, djdagentscore, solcex-autonomous-vanguard, piprail, Agent402, APIMesh.
Hybrid x402 + Stripe gateway for AI agent commerce.
Agents pay USDC via x402. Spraay executes multi-chain DeFi operations. Stripe settles the fiat equivalent into the merchant's dashboard — with tax, reporting, refunds, and fraud protection built in.
Agent (wallet) Merchant
│ │
│ 1. POST /batch-payment │
│ 2. x402: pay $0.01 USDC │
│ │
▼ │
┌────────────────────┐ │
│ x402 Middleware │ │
│ (verify payment) │ │
└────────┬───────────┘ │
│ │
▼ │
┌────────────────────┐ │
│ Spraay Gateway │ │
│ (on-chain exec) │ │
│ 13 chains, 76+ │ │
│ DeFi primitives │ │
└────────┬───────────┘ │
│ │
▼ ▼
┌────────────────────┐ ┌──────────────────┐
│ Base / Ethereum │ │ Stripe Dashboard │
│ Solana / Bitcoin │ │ PaymentIntent │
│ + 9 more chains │ │ Tax · Refunds │
└────────────────────┘ │ Reporting · API │
└──────────────────┘
AI agents need to pay for services. The internet has two payment rails:
This hybrid gateway bridges both. The agent pays crypto. The merchant sees fiat. Everyone's happy.
git clone https://github.com/plagtech/spraay-stripe-machine-payments.git
cd spraay-stripe-machine-payments
npm install
cp .env.example .env
# Fill in PAY_TO_ADDRESS and STRIPE_SECRET_KEY
npm run dev
| Method | Path | x402 Price | What happens |
|---|---|---|---|
POST |
/batch-payment |
$0.01 USDC | Spraay sends tokens to multiple recipients → Stripe records fiat |
POST |
/payroll |
$0.05 USDC | Spraay runs crypto payroll → Stripe creates invoice record |
POST |
/ai/inference |
$0.03 USDC | Spraay calls AI model (43+ providers) → Stripe tracks usage |
POST |
/rtp/task |
$0.05 USDC | Spraay hires a robot via RTP → Stripe records the transaction |
GET |
/discover |
Free | Returns full endpoint catalog and architecture info |
curl http://localhost:4021/discover
Returns endpoint catalog, pricing, supported chains, and Stripe integration details.
import { withPaymentInterceptor } from "@x402/axios";
import axios from "axios";
const api = withPaymentInterceptor(
axios.create({ baseURL: "http://localhost:4021" }),
walletClient // agent's wallet
);
// Agent pays $0.01 USDC → Spraay batch sends → Stripe records
const result = await api.post("/batch-payment", {
chain: "base",
token: "USDC",
recipients: ["0xAlice...", "0xBob...", "0xCharlie..."],
amounts: ["10.00", "25.00", "15.00"],
});
{
"txHash": "0xabc123...",
"recipients": 3,
"totalAmount": "50.00",
"chain": "base",
"stripe": {
"stripe_payment_intent_id": "pi_3abc123...",
"stripe_status": "requires_capture"
}
}
The PaymentIntent shows up in the merchant's Stripe Dashboard with:
PAY_TO_ADDRESS=0xYourAddress
STRIPE_SECRET_KEY=sk_test_...
NETWORK=eip155:84532
FACILITATOR_URL=https://x402.org/facilitator
PAY_TO_ADDRESS=0xYourAddress
STRIPE_SECRET_KEY=sk_live_...
NETWORK=eip155:8453
FACILITATOR_URL=https://api.cdp.coinbase.com/platform/v2/x402
Stripe machine payments must be enabled for your account — request access here.
Spraay is a multi-chain batch payment protocol and x402 gateway. It provides 76+ paid API endpoints across 16 categories and 13 blockchains:
Live gateway: gateway.spraay.app · Docs: docs.spraay.app · MCP Server: @plagtech/spraay-x402-mcp
Stripe's machine payments support lets merchants accept payments from AI agents. Combined with Spraay:
This is the "best of both worlds" — crypto speed for agents, fiat compliance for businesses.
MIT
The x402 Service Encyclopedia — Every service ranked, reviewed, and documented. Community knowledge base for the AI agent economy.
On-chain reputation scoring API for AI agent wallets on Base, monetized via x402 micropayments. Scores wallets 0-100 across reliability, viability, identity, behavior, and capability dimensions.
Autonomous AI BD Agent for SolCex Exchange: 24/7 Cross-Chain Token Scoring & Payments 2026
x402 (HTTP 402 Payment Required) SDK + MCP server: let any API charge for itself and any AI agent pay for itself, USDC & stablecoins across EVM, Solana & 8 more chain families, in a couple of lines. Backendless, no fee, self-custodial, paid straight to your wallet. TypeScript, MIT.
500+ pay-per-call web tools + skill packs for AI agents — every one tested, priced, and settled on-chain. Paid in USDC over x402 on 8 chains, or free via proof-of-work on the pure-CPU tools. Self-hostable, MCP-native, deterministic. Plus the open x402 index (Find / Route / Leaderboard).
APIMesh — 23 pay-per-call web analysis APIs + 16-tool MCP server with autonomous API generation. Security audits, SEO, tech stack detection. x402 + Stripe MPP payments.
Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes instantly, manages risk while you sleep. Agent commerce protocol for machine-to-machine payments. Self-hosted. Built on Claude.
The self-improving LLM router that optimize your agentic workflows with every runs, works with any harnesses, any models, any loops.