Overview
Cards are the core primitive. Each card is a virtual payment instrument backed by your USDC or pathUSD treasury balance. Agents use cards to pay for APIs, services, and resources.Card lifecycle
CLOSED is a terminal, one-way state. A closed card stops working immediately and leaves the wallet view, but its records are never deleted: full history stays available through the account activity feed.
Issue a card
Bulk issuance
Create up to 1,000 cards atomically:Spending controls
MCC locks
Restrict which merchant categories a card can pay:Freeze / unfreeze
Instantly block all transactions on a compromised card:Move funds back to treasury
Sweep a card’s unspent balance back into your treasury, where it can be withdrawn off-platform. ForEXPIRED cards this always performs a full sweep. For ACTIVE or FROZEN cards, omit the amount to sweep everything, or pass an amount for a partial claim (the card stays active with the remainder). Pending charges and mandate holds are excluded from the sweepable balance, so a claim can never strand an in-flight payment.
Close a card
Retire a card you no longer need. Closing is a one-way action allowed only when the card is empty and has no open obligations:- Remaining balance is zero (sweep with a claim first if needed)
- No in-flight pending transaction
- No open payment stream
- No active, unexpired AP2 mandate
Audit trail
Every transaction is recorded with full metadata. Read a single card’s history, or the whole wallet’s activity across every card (including closed ones):Sandbox & testnet
mag3nt uses network-based environment isolation:no separate test API keys needed. Issue a card on a testnet network to activate sandbox mode:How it works
|eip155:8453 (Base) | production | Real USDC |
| solana:mainnet (Solana) | production | Real USDC |
| eip155:4217 (Tempo) | production | Real USDC or pathUSD |
| eip155:84532 (Base Sepolia) | sandbox | Test USDC:no real value |
Every payment response includes an environment field:
Sandbox transactions deduct from your card balance just like production, but use test tokens with no real value. Use sandbox to validate your integration before going live.