Getting Started/Quick Start
Quick Start
Get your first virtual Visa card issued in under 5 minutes. This guide walks through installation, initialization, and issuing a card.
Installation
npm install mppfinanceInitialize client
Create a client instance with your agentId and target network. Use testnet: true during development.
client.ts
import { MPPFinance } from 'mppfinance'
const client = new MPPFinance({
agentId: 'your-agent-id',
network: 'solana',
testnet: true,
})Issue your first card
Call client.issue() with an amount, currency, and optional spending rules. The card is ready in under 300ms.
issue-card.ts
const card = await client.issue({
amount: 50_00, // $50.00
currency: 'USD',
rules: {
merchant: 'aws.com',
singleUse: true,
expiresIn: 300,
},
})
console.log(card.number) // "4111 •••• •••• 9821"
console.log(card.cvv) // "***"
console.log(card.expiry) // "12/27"✓
Your card is ready in under 300ms and can be used at aws.com for one charge up to $50.
Revoke a card
Revoke any card at any time. Once revoked, all further charges are declined instantly.
revoke.ts
await client.revoke(card.id)