Virtual MasterCards for AI agents - pay with USDC via x402 on Stellar
asgcard-public is an early-stage JavaScript project in the AI payments / x402 ecosystem, focused on agent-payments, ai-agents, fintech, mastercard. It currently has 15 GitHub stars and 4 forks, and sits alongside related tools like agentpay, agoragentic-integrations, piprail, sardis, Agent402, moltpe-agent-payments.
Your AI agent needs a credit card. ASG Card gives it one — programmatically, in seconds, with USDC or Stripe.
ASG Card is an agent-first virtual card platform. AI agents programmatically issue and manage MasterCard virtual cards, paying via Stellar x402 (USDC) or Stripe Machine Payments Protocol (card).
# One-step onboarding (creates wallet, configures MCP, installs skill)
npx @asgcard/cli onboard -y --client codex
# Fund your wallet with USDC on Stellar (address shown by onboard)
# Then:
npx @asgcard/cli card:create -a 10 -n "AI Agent" -e you@email.com
import { ASGCardClient } from "@asgcard/sdk";
const client = new ASGCardClient({
privateKey: "S...", // Stellar secret key
rpcUrl: "https://mainnet.sorobanrpc.com"
});
// Automatically handles: 402 → USDC payment → card creation
const card = await client.createCard({
amount: 10, // $10 card load
nameOnCard: "AI Agent",
email: "agent@example.com"
});
// card.detailsEnvelope = { cardNumber, cvv, expiryMonth, expiryYear }
| Method | Description |
|---|---|
createCard({amount, nameOnCard, email, phone?}) |
Issue a virtual card with x402 payment |
fundCard({amount, cardId}) |
Top up an existing card |
listCards() |
List all cards for this wallet |
getTransactions(cardId, page?, limit?) |
Get card transaction history |
getBalance(cardId) |
Get live card balance |
getPricing() |
Get current pricing |
health() |
API health check |
@asgcard/mcp-server exposes 11 tools for Codex, Claude Code, and Cursor:
| Tool | Description |
|---|---|
get_wallet_status |
Use FIRST — wallet address, USDC balance, readiness |
create_card |
Create virtual card (x402 payment) |
fund_card |
Fund existing card (x402 payment) |
list_cards |
List all wallet cards |
get_card |
Get card summary |
get_card_details |
Get PAN, CVV, expiry |
freeze_card |
Freeze a card |
unfreeze_card |
Unfreeze a card |
get_pricing |
View pricing |
get_transactions |
Card transaction history (real 4payments data) |
get_balance |
Live card balance from 4payments |
npx @asgcard/cli install --client codex # or claude, cursor
graph TB
subgraph Clients
SDK["@asgcard/sdk<br>(npm, TypeScript)"]
CLI["@asgcard/cli<br>onboard + card ops"]
MCP["@asgcard/mcp-server<br>11 tools"]
TG["Telegram Bot<br>@ASGCardbot"]
WEB["asgcard.dev"]
STRIPE_WEB["stripe.asgcard.dev"]
end
subgraph ASG Infrastructure
API["ASG Card API<br>api.asgcard.dev"]
FAC["x402 Facilitator"]
DB["PostgreSQL"]
end
subgraph Payment Rails
STELLAR["Stellar Pubnet<br>USDC"]
STRIPE["Stripe<br>MPP"]
end
subgraph External
ISSUER["Card Issuer<br>(MasterCard)"]
end
SDK -->|"x402 HTTP"| API
CLI -->|"x402 HTTP"| API
MCP -->|"x402 HTTP"| API
TG -->|"Webhook"| API
WEB -->|"Pricing"| API
STRIPE_WEB -->|"MPP"| API
API -->|"verify/settle"| FAC
API -->|"SQL"| DB
API -->|"REST"| ISSUER
FAC -->|"Soroban RPC"| STELLAR
API -->|"PaymentIntent"| STRIPE
SDK -->|"Sign TX"| STELLAR
ASG Card supports two payment rails. The card product is identical — only the payment method differs.
402 Payment Required with USDC amountUses: SDK, CLI, MCP server. No human in the loop.
approval_required + approvalUrlstripe.asgcard.dev/approvecompletedUses: session-based auth (X-STRIPE-SESSION). Human-in-the-loop approval.
| Directory | Description |
|---|---|
/api |
ASG Card API (Express + x402 + Stripe MPP) |
/sdk |
@asgcard/sdk TypeScript client |
/cli |
@asgcard/cli CLI with onboarding |
/mcp-server |
@asgcard/mcp-server MCP server (11 tools) |
/web |
Marketing website (asgcard.dev) |
/web-stripe |
Stripe edition site (stripe.asgcard.dev) |
/docs |
Internal documentation and ADRs |
| Route | Method | Description |
|---|---|---|
/health |
GET | Health check |
/pricing |
GET | Pricing info |
/cards/tiers |
GET | Pricing info |
/supported |
GET | x402 capabilities |
| Route | Method | Description |
|---|---|---|
/cards/create/tier/:amount |
POST | Create a virtual card |
/cards/fund/tier/:amount |
POST | Fund an existing card |
| Route | Method | Description |
|---|---|---|
/cards/ |
GET | List wallet's cards |
/cards/:id |
GET | Card details |
/cards/:id/details |
GET | Sensitive data (nonce required) |
/cards/:id/transactions |
GET | Card transaction history |
/cards/:id/balance |
GET | Live card balance |
/cards/:id/freeze |
POST | Freeze card |
/cards/:id/unfreeze |
POST | Unfreeze card |
| Route | Method | Description |
|---|---|---|
/stripe-beta/session |
POST | Create managed session |
/stripe-beta/payment-requests |
POST | Create payment request |
/stripe-beta/payment-requests/:id |
GET | Poll request status |
/stripe-beta/approve/:id |
GET/POST | Approval page data / approve or reject |
/stripe-beta/approve/:id/complete |
POST | Complete payment (MPP credential) |
/stripe-beta/cards |
GET | List session's cards |
/stripe-beta/cards/:id/details |
GET | Card details (nonce required) |
Simple, transparent, no hidden fees.
That's it. Load any amount from $5 to $5,000.
Create card with no load → $10. Create card loaded with $100 → $113.50. Top up $200 later → just $207. Same pricing on both Stellar and Stripe rails.
Link your wallet to Telegram for card management:
| Command | Description |
|---|---|
/start |
Welcome / Link account |
/mycards |
List your cards |
/faq |
FAQ |
/support |
Support |
We welcome contributions! Please see CONTRIBUTING.md for guidelines and check out issues labeled good first issue to get started.
This project follows our Code of Conduct.
MIT
AgentPay - The economic-intelligence layer for AI agents — an x402 gateway that prices, caps, and receipts agent data spend. 17 free tools + verified_route, the buyer-side x402 trust oracle. USDC on Base or Stellar.
Public adapters and discovery catalog for Triptych OS (Agent OS): agent frameworks, MCP/A2A/x402 protocols, workflows, wallets, SDKs, and examples for execute-first routing, governed handoffs, and receipt-aware agent commerce.
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.
The open authority layer + SDKs for AI-agent payments. Thin Python/TS clients, an MCP server, framework adapters (LangChain/CrewAI/Hermes/OpenClaw/…), and @sardis/reference — a pure policy simulator + AP2/TAP/x402 verifiers showing exactly how Sardis decides if an agent may spend. The hosted engine that moves money is private.
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).
Payment infrastructure for AI agents. Reference implementation: x402 + MPP + fiat.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
The first agentic payment network: policy-controlled, gasless, and real money-ready. OmniClaw CLI + Financial Policy Engine let autonomous agents pay and earn safely at machine speed.
An open SDK for agentic payments. Let AI agents make payments, hold funds, and move money across chains with policy enforcement and human approval built in.
x402 Ecosystem Explorer
🚀 Curated list of x402 resources: HTTP 402 Payment Required protocol for blockchain payments, crypto micropayments, AI agents, API monetization. Includes SDKs (TypeScript, Python, Rust), examples, facilitators (Coinbase, Cloudflare), MCP integration, tutorials. Accept USDC payments with one line of code. Perfect for AI agent economy.