import { GlideClient } from './glide-client';
const client = new GlideClient({ grantToken: process.env.GLIDE_GRANT_TOKEN! });
const result = await client.call('payments.simulate', {
counterparty: {
address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
chain: 'base',
token: 'USDC',
},
amount_cents: 75000,
currency: 'USD',
mcc: '7372',
});
if (result.verdict === 'deny') {
console.error('Payment would be denied:', result.reasons);
} else if (result.verdict === 'allow_with_step_up') {
console.log('Payment requires step-up before initiating');
} else {
console.log('Payment would be allowed — safe to call payments.initiate');
}