@asgpay/sdk
v1.0.2
Published
ASG Pay SDK — programmatic virtual Mastercard cards for AI agents. Issue, fund, freeze, and manage spending limits. Part of the ASG Pay ecosystem.
Maintainers
Readme
What is @asgpay/sdk?
@asgpay/sdk is the TypeScript SDK for programmatically issuing and managing virtual Mastercard cards for AI agents. Issue cards, set spending limits, fund via USDC, and freeze/unfreeze — all via code.
Part of the ASG Pay ecosystem — the banking layer for autonomous AI agents.
Install
npm install @asgpay/sdkQuick Start
import { AsgCardClient } from '@asgpay/sdk';
const client = new AsgCardClient({ apiKey: process.env.ASG_API_KEY! });
// Issue a virtual card for your AI agent
const card = await client.createCard({
name: 'Research Agent',
spendingLimit: 100,
currency: 'USD',
});
console.log(`Card issued: **** ${card.last4}`);
// Fund the card
await client.fundCard(card.id, { amount: 50, method: 'usdc' });
// Freeze when done
await client.freezeCard(card.id);Features
| Feature | Description | |---------|-------------| | Issue Cards | Virtual Mastercard, instant issuance | | Set Limits | Per-transaction and monthly spending limits | | Fund via USDC | Stellar USDC → card balance, instant | | Freeze/Unfreeze | Programmatic card control | | Transaction History | Full audit trail per card |
ASG Pay Ecosystem
| Package | Purpose | |---------|---------| | @asgpay/pay | Multi-chain payment SDK (x402 + MPP) | | @asgpay/sdk | ← You are here. Card management. | | @asgpay/cli | Card creation & management CLI | | @asgpay/mcp-server | AI agent tools (Claude, Codex, Cursor) | | @asgpay/fund | One-link agent wallet funding | | @asgpay/agent-cash | Autonomous virtual credit cards | | @asgpay/create-app | Project scaffolding |
