import Limitry from '@limitry/sdk';const client = new Limitry({ apiKey: process.env['LIMITRY_API_KEY'], // This is the default and can be omitted});const response = await client.balances.debit({ amount: 1, customerId: 'x', description: 'description', name: 'x',});console.log(response.success);
Uses atomic operations with optimistic locking to prevent overdrafts. Returns success: false if insufficient funds.
POST
/
balances
/
debit
JavaScript
Copy
import Limitry from '@limitry/sdk';const client = new Limitry({ apiKey: process.env['LIMITRY_API_KEY'], // This is the default and can be omitted});const response = await client.balances.debit({ amount: 1, customerId: 'x', description: 'description', name: 'x',});console.log(response.success);