Guides/Merchant Whitelisting
Merchant Whitelisting
Restrict a card to a single merchant domain so it can only be charged by that merchant. All other charge attempts are declined at the network level.
Single merchant
merchant.ts
const card = await client.issue({
amount: 100_00,
currency: 'USD',
rules: {
merchant: 'aws.com', // only aws.com charges are approved
},
})ℹ
The
merchant rule matches the full domain including subdomains. Use aws.com to allow console.aws.com too.Multiple merchants
To allow spending at multiple merchants, issue a separate card per merchant.
multi-merchant.ts
// Issue separate cards per merchant
const [awsCard, vercelCard] = await Promise.all([
client.issue({ amount: 50_00, currency: 'USD', rules: { merchant: 'aws.com' } }),
client.issue({ amount: 50_00, currency: 'USD', rules: { merchant: 'vercel.com' } }),
])