Merchant restrictions for virtual cards

5. Example flow

Tutorials

Step 1 — Request a card:

// Call: create_card
// Arguments: {}

// Response:
{
  "cardId": null,
  "depositAddress": "0x4384B5305D7d416D0f876e281b1FdF54062B4895",
  "depositQrCodeUrl": "https://.../qrcode.html?text=0x4384...",
  "minAmount": "1.00",
  "maxAmount": "20.00",
  "acceptedCurrencies": ["USDG", "ETH"],
  "message": "Send between $1 and $20 worth of USDG or ETH to this address. A card will be issued automatically for the exact amount received."
}
// Call: create_card
// Arguments: {}

// Response:
{
  "cardId": null,
  "depositAddress": "0x4384B5305D7d416D0f876e281b1FdF54062B4895",
  "depositQrCodeUrl": "https://.../qrcode.html?text=0x4384...",
  "minAmount": "1.00",
  "maxAmount": "20.00",
  "acceptedCurrencies": ["USDG", "ETH"],
  "message": "Send between $1 and $20 worth of USDG or ETH to this address. A card will be issued automatically for the exact amount received."
}
// Call: create_card
// Arguments: {}

// Response:
{
  "cardId": null,
  "depositAddress": "0x4384B5305D7d416D0f876e281b1FdF54062B4895",
  "depositQrCodeUrl": "https://.../qrcode.html?text=0x4384...",
  "minAmount": "1.00",
  "maxAmount": "20.00",
  "acceptedCurrencies": ["USDG", "ETH"],
  "message": "Send between $1 and $20 worth of USDG or ETH to this address. A card will be issued automatically for the exact amount received."
}

Step 2 — Send funds to depositAddress, then poll:

// Call: card_details
// Arguments: {}

// Response, before funding clears:
"Card creation not complete. This may be caused by insufficient top-up funds or pending payment arrival."

// Response, once funded:
{
  "cardId": "e217e507-08e0-4ead-a3b8-a6bdbba29a16",
  "pan": "4549241817900517",
  "cvv": "892",
  "expMonth": "07",
  "expYear": "2029",
  "bin": "45492418",
  "cardLastFour": "0517",
  "status": "ACTIVE",
  "balance": "5.00"
}
// Call: card_details
// Arguments: {}

// Response, before funding clears:
"Card creation not complete. This may be caused by insufficient top-up funds or pending payment arrival."

// Response, once funded:
{
  "cardId": "e217e507-08e0-4ead-a3b8-a6bdbba29a16",
  "pan": "4549241817900517",
  "cvv": "892",
  "expMonth": "07",
  "expYear": "2029",
  "bin": "45492418",
  "cardLastFour": "0517",
  "status": "ACTIVE",
  "balance": "5.00"
}
// Call: card_details
// Arguments: {}

// Response, before funding clears:
"Card creation not complete. This may be caused by insufficient top-up funds or pending payment arrival."

// Response, once funded:
{
  "cardId": "e217e507-08e0-4ead-a3b8-a6bdbba29a16",
  "pan": "4549241817900517",
  "cvv": "892",
  "expMonth": "07",
  "expYear": "2029",
  "bin": "45492418",
  "cardLastFour": "0517",
  "status": "ACTIVE",
  "balance": "5.00"
}

Step 3 — Check just the balance any time (lighter than card_details, no sensitive fields):

// Call: card_balance
// Arguments: {}

// Response:
{
  "cardLastFour": "0517",
  "balance": "1.00",
  "status": "ACTIVE"
}
// Call: card_balance
// Arguments: {}

// Response:
{
  "cardLastFour": "0517",
  "balance": "1.00",
  "status": "ACTIVE"
}
// Call: card_balance
// Arguments: {}

// Response:
{
  "cardLastFour": "0517",
  "balance": "1.00",
  "status": "ACTIVE"
}

Step 4 — Check wallet balance any time:

// Call: wallet_balance
// Arguments: {}

// Response:
{
  "balances": [
    { "currency": "USDG", "available": "0.00", "pending": "0.00", "frozen": "0.00", "walletId": "wal_...", "updatedAt": 1783732276771 },
    { "currency": "ETH",  "available": "0.000000", "pending": "0.000000", "frozen": "0.000000", "walletId": "wal_...", "updatedAt": 1783732304919 }
  ],
  "message": "Stablecoin wallet balances returned."
}
// Call: wallet_balance
// Arguments: {}

// Response:
{
  "balances": [
    { "currency": "USDG", "available": "0.00", "pending": "0.00", "frozen": "0.00", "walletId": "wal_...", "updatedAt": 1783732276771 },
    { "currency": "ETH",  "available": "0.000000", "pending": "0.000000", "frozen": "0.000000", "walletId": "wal_...", "updatedAt": 1783732304919 }
  ],
  "message": "Stablecoin wallet balances returned."
}
// Call: wallet_balance
// Arguments: {}

// Response:
{
  "balances": [
    { "currency": "USDG", "available": "0.00", "pending": "0.00", "frozen": "0.00", "walletId": "wal_...", "updatedAt": 1783732276771 },
    { "currency": "ETH",  "available": "0.000000", "pending": "0.000000", "frozen": "0.000000", "walletId": "wal_...", "updatedAt": 1783732304919 }
  ],
  "message": "Stablecoin wallet balances returned."
}

Next Blog

Next Blog

Explore practical guidance for issuing cards, enforcing agent policies, monitoring transactions, and building payment-safe autonomous workflows.

Explore practical guidance for issuing cards, enforcing agent policies, monitoring transactions, and building payment-safe autonomous workflows.