Core Concepts/Spending Rules
Spending Rules
Every card issued via MPPFinance can carry programmable spending rules that are enforced on-chain. Rules cannot be modified after issuance — they are immutable for the card lifecycle.
Available rules
| Rule | Type | Description |
|---|---|---|
| merchant | string | Lock card to a single domain (e.g. aws.com) |
| singleUse | boolean | Card is revoked after the first charge |
| expiresIn | number | TTL in seconds from issuance time |
| maxAmount | number | Maximum single-charge amount in cents |
| dailyCap | number | Maximum total spend per calendar day |
| network | string | Restrict to solana or ethereum settlement |
Full example
rules.ts
const card = await client.issue({
amount: 200_00,
currency: 'USD',
rules: {
merchant: 'vercel.com',
singleUse: false,
expiresIn: 86400, // 24 hours
maxAmount: 50_00, // max $50 per charge
dailyCap: 200_00, // max $200 per day
},
})