Skip to main content
Glama
ASGCompute

ASG Card

Official
by ASGCompute

ASG Card 是一个以代理为先的虚拟卡平台。AI 代理可以通过程序化方式发行和管理万事达虚拟卡,并使用 Stellar x402 (USDC) 或 Stripe 机器支付协议 (银行卡) 进行支付。

快速入门 — 第一张卡

# 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

SDK 使用

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 方法

方法

描述

createCard({amount, nameOnCard, email, phone?})

使用 x402 支付发行虚拟卡

fundCard({amount, cardId})

为现有卡片充值

listCards()

列出该钱包的所有卡片

getTransactions(cardId, page?, limit?)

获取卡片交易历史

getBalance(cardId)

获取实时卡片余额

getPricing()

获取当前定价

health()

API 健康检查

MCP 服务器 (AI 代理集成)

@asgcard/mcp-server 为 Codex、Claude Code 和 Cursor 提供了 11 个工具

工具

描述

get_wallet_status

首先使用 — 钱包地址、USDC 余额、就绪状态

create_card

创建虚拟卡 (x402 支付)

fund_card

为现有卡片充值 (x402 支付)

list_cards

列出钱包所有卡片

get_card

获取卡片摘要

get_card_details

获取 PAN、CVV、有效期

freeze_card

冻结卡片

unfreeze_card

解冻卡片

get_pricing

查看定价

get_transactions

卡片交易历史 (真实的 4payments 数据)

get_balance

来自 4payments 的实时卡片余额

MCP 设置

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 支持两种支付轨道。卡片产品本身是一样的,只是支付方式不同。

Stellar 版 (x402)

  1. 代理请求一张卡 → API 返回 402 Payment Required 以及 USDC 金额

  2. 代理通过 SDK 签署 Stellar USDC 转账

  3. x402 协调器在链上验证并结算支付

  4. API 通过发卡机构发行万事达卡

  5. 卡片详情在响应中立即返回

使用:SDK、CLI、MCP 服务器。无需人工干预。

Stripe 版 (MPP)

  1. 代理创建支付请求 → API 返回 approval_required + approvalUrl

  2. 所有者在 stripe.asgcard.dev/approve 打开审批页面

  3. 所有者审核并批准 → 使用实时定价的 Stripe Elements 表单

  4. 所有者通过 Stripe 支付 → 银行卡/Apple Pay/Google Pay

  5. 卡片创建 → 代理轮询直到状态为 completed

使用:基于会话的身份验证 (X-STRIPE-SESSION)。需要人工干预审批。

工作区

目录

描述

/api

ASG Card API (Express + x402 + Stripe MPP)

/sdk

@asgcard/sdk TypeScript 客户端

/cli

@asgcard/cli 带有引导功能的 CLI

/mcp-server

@asgcard/mcp-server MCP 服务器 (11 个工具)

/web

营销网站 (asgcard.dev)

/web-stripe

Stripe 版网站 (stripe.asgcard.dev)

/docs

内部文档和 ADR

API 端点

公共

路由

方法

描述

/health

GET

健康检查

/pricing

GET

定价信息

/cards/tiers

GET

定价信息

/supported

GET

x402 功能

Stellar x402 (需要支付)

路由

方法

描述

/cards/create/tier/:amount

POST

创建虚拟卡

/cards/fund/tier/:amount

POST

为现有卡片充值

钱包身份验证

路由

方法

描述

/cards/

GET

列出钱包的卡片

/cards/:id

GET

卡片详情

/cards/:id/details

GET

敏感数据 (需要 nonce)

/cards/:id/transactions

GET

卡片交易历史

/cards/:id/balance

GET

实时卡片余额

/cards/:id/freeze

POST

冻结卡片

/cards/:id/unfreeze

POST

解冻卡片

Stripe MPP (测试版)

路由

方法

描述

/stripe-beta/session

POST

创建托管会话

/stripe-beta/payment-requests

POST

创建支付请求

/stripe-beta/payment-requests/:id

GET

轮询请求状态

/stripe-beta/approve/:id

GET/POST

审批页面数据 / 批准或拒绝

/stripe-beta/approve/:id/complete

POST

完成支付 (MPP 凭证)

/stripe-beta/cards

GET

列出会话的卡片

/stripe-beta/cards/:id/details

GET

卡片详情 (需要 nonce)

定价

简单、透明,无隐藏费用。

  • $10 固定开卡费 (无需初始充值)

  • 3.5% 每次充值手续费

就是这样。充值金额从 $5 到 $5,000 不等。

不充值开卡 → $10。开卡并充值 $100 → $113.50。稍后充值 $200 → 只需 $207。 Stellar 和 Stripe 轨道定价相同。

Telegram 机器人 (@ASGCardbot)

将你的钱包连接到 Telegram 以进行卡片管理:

命令

描述

/start

欢迎 / 关联账户

/mycards

列出你的卡片

/faq

常见问题

/support

支持

安全性

  • 卡片详情使用 AES-256-GCM 加密存储

  • 基于代理 nonce 的防重放保护 (每小时 5 次读取)

  • 钱包签名身份验证 (Stellar 版)

  • 带有测试版门控的基于会话的身份验证 (Stripe 版)

  • Stripe 会话密钥已从日志中脱敏

  • Telegram Webhook 密钥验证

  • 操作端点受 API 密钥 + IP 白名单保护

贡献

欢迎贡献!请参阅 CONTRIBUTING.md 获取指南,并查看标记为 good first issue 的问题以开始。

本项目遵循我们的 行为准则

许可证

MIT


-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ASGCompute/asgcard-public'

If you have feedback or need assistance with the MCP directory API, please join our Discord server