  1. [    Home ](/)
2. [Documentation](/docs)
3. [SDKs &amp; Tools](/docs?category=35)
4. SDK Quickstart — JavaScript
 
 SDKs &amp; Tools Latest      7 min read  

# SDK Quickstart — JavaScript

  A  admin  April 15, 2026  

 

 

 

 

 

 

  ## On this page

  
  [    Back to top ](#main-content) 

 ## Installation

npm install @aelix/api-sdk  
\# or  
yarn add @aelix/api-sdk

## Initialise the Client

import { AelixClient } from '@aelix/api-sdk';

const client = new AelixClient({  
 clientId: process.env.AELIX\_CLIENT\_ID,  
 clientSecret: process.env.AELIX\_CLIENT\_SECRET,  
 environment: 'sandbox', // or 'production'  
 timeout: 30\_000, // ms  
});

## Fetch Account Balances

const accounts = await client.banking.accounts.list({  
 limit: 25,  
 status: 'active',  
});

for (const account of accounts.data) {  
 console.log(`${account.nickname}: £${account.balance / 100}`);  
}

## Initiate a Payment

const payment = await client.payments.create({  
 source\_account\_id: 'acc\_abc123',  
 destination: {  
 account\_number: '12345678',  
 sort\_code: '20-00-00',  
 account\_name: 'ACME Ltd',  
 },  
 amount: 5000, // £50.00 in pence  
 currency: 'GBP',  
 reference: 'Invoice INV-2025-042',  
 idempotency\_key: `pay-${Date.now()}`,  
});

console.log('Payment status:', payment.status);  
// → 'pending\_clearance'

## Handle Errors

import { AelixError, RateLimitError } from '@aelix/api-sdk';

try {  
 const result = await client.banking.accounts.get('acc\_invalid');  
} catch (err) {  
 if (err instanceof RateLimitError) {  
 // Retry after err.retryAfter seconds  
 } else if (err instanceof AelixError) {  
 console.error(err.code, err.message);  
 }  
}

## TypeScript Support

The SDK ships with full TypeScript types. No @types package needed:

import type { Account, Payment } from '@aelix/api-sdk';



 

 

 

 ### Tags

Tags

[SDK](/taxonomy/term/44)