ASG Card
OfficialASG 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).
Quick Start — First 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.comSDK Usage
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 }SDK Methods
Method | Description |
| Issue a virtual card with x402 payment |
| Top up an existing card |
| List all cards for this wallet |
| Get card transaction history |
| Get live card balance |
| Get current pricing |
| API health check |
MCP Server (AI Agent Integration)
@asgcard/mcp-server exposes 11 tools for Codex, Claude Code, and Cursor:
Tool | Description |
| Use FIRST — wallet address, USDC balance, readiness |
| Create virtual card (x402 payment) |
| Fund existing card (x402 payment) |
| List all wallet cards |
| Get card summary |
| Get PAN, CVV, expiry |
| Freeze a card |
| Unfreeze a card |
| View pricing |
| Card transaction history (real 4payments data) |
| Live card balance from 4payments |
MCP Setup
npx @asgcard/cli install --client codex # or claude, cursorArchitecture
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"| STELLARPayment Rails
ASG Card supports two payment rails. The card product is identical — only the payment method differs.
Stellar Edition (x402)
Agent requests a card → API returns
402 Payment Requiredwith USDC amountAgent signs a Stellar USDC transfer via the SDK
x402 Facilitator verifies and settles the payment on-chain
API issues a MasterCard via the card issuer
Card details returned immediately in the response
Uses: SDK, CLI, MCP server. No human in the loop.
Stripe Edition (MPP)
Agent creates a payment request → API returns
approval_required+approvalUrlOwner opens the approval page at
stripe.asgcard.dev/approveOwner reviews and approves → Stripe Elements form with real-time pricing
Owner pays via Stripe → card/Apple Pay/Google Pay
Card created → agent polls until
completed
Uses: session-based auth (X-STRIPE-SESSION). Human-in-the-loop approval.
Workspace
Directory | Description |
| ASG Card API (Express + x402 + Stripe MPP) |
|
|
|
|
|
|
| Marketing website (asgcard.dev) |
| Stripe edition site (stripe.asgcard.dev) |
| Internal documentation and ADRs |
API Endpoints
Public
Route | Method | Description |
| GET | Health check |
| GET | Pricing info |
| GET | Pricing info |
| GET | x402 capabilities |
Stellar x402 (Payment Required)
Route | Method | Description |
| POST | Create a virtual card |
| POST | Fund an existing card |
Wallet Authenticated
Route | Method | Description |
| GET | List wallet's cards |
| GET | Card details |
| GET | Sensitive data (nonce required) |
| GET | Card transaction history |
| GET | Live card balance |
| POST | Freeze card |
| POST | Unfreeze card |
Stripe MPP (Beta)
Route | Method | Description |
| POST | Create managed session |
| POST | Create payment request |
| GET | Poll request status |
| GET/POST | Approval page data / approve or reject |
| POST | Complete payment (MPP credential) |
| GET | List session's cards |
| GET | Card details (nonce required) |
Pricing
Simple, transparent, no hidden fees.
$10 flat card creation (no initial load required)
3.5% on every top-up
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.
Telegram Bot (@ASGCardbot)
Link your wallet to Telegram for card management:
Command | Description |
| Welcome / Link account |
| List your cards |
| FAQ |
| Support |
Security
Card details encrypted at rest with AES-256-GCM
Agent nonce-based anti-replay protection (5 reads/hour)
Wallet signature authentication (Stellar edition)
Session-based authentication with beta gates (Stripe edition)
Stripe session keys redacted from logs
Telegram webhook secret validation
Ops endpoints protected by API key + IP allowlist
Contributing
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.
License
MIT