Documentation Index
Fetch the complete documentation index at: https://docs.mag3nt.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Cards are the core primitive. Each card is a virtual payment instrument backed by your USDC treasury balance. Agents use cards to pay for APIs, services, and resources.
Card lifecycle
Issue a card
const card = await mag3nt.cards.cardsCreate({
purpose: "Research Agent",
limitAmount: 50, // Max spend in USDC
network: "eip155:8453", // Base
asset: "USDC",
singleUse: false, // Reusable
expiresIn: 24, // Hours (0 = never)
});
Bulk issuance
Create up to 1,000 cards atomically:
const batch = await mag3nt.cards.cardsBulkCreate({
cards: [
{ purpose: "Agent Alpha", limitAmount: 25 },
{ purpose: "Agent Beta", limitAmount: 25 },
{ purpose: "Agent Gamma", limitAmount: 50 },
],
network: "eip155:8453",
asset: "USDC",
});
// All-or-nothing: if total exceeds balance, none are created
Spending controls
MCC locks
Restrict which merchant categories a card can pay:
await mag3nt.cards.cardsUpdateControls(cardId, {
mccLocks: "5411,5812", // Only grocery and restaurants
});
Freeze / unfreeze
Instantly block all transactions on a compromised card:
await mag3nt.cards.cardsFreeze(cardId);
// Card is immediately blocked — no payments can process
await mag3nt.cards.cardsUnfreeze(cardId);
// Card is restored to ACTIVE
Audit trail
Every transaction is recorded with full metadata:
const txns = await mag3nt.cards.cardsListTransactions(cardId);
for (const txn of txns.transactions) {
console.log(`${txn.amount} USDC to ${txn.merchant} via ${txn.protocol}`);
}