Skip to content

alexasomba/lenco-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lenco-node

Node.js SDK for Lenco API - Payments, Transfers, Collections

Installation

npm install lenco-node
# or
yarn add lenco-node
# or
pnpm add lenco-node

Quick Start

import { Lenco } from 'lenco-node';

const lenco = new Lenco({
  apiKey: process.env.LENCO_API_KEY,
  environment: 'production', // or 'sandbox'
});

// Get accounts
const accounts = await lenco.accounts.list();

// Transfer to bank account
const transfer = await lenco.transfers.toBankAccount({
  accountId: 'your-account-uuid',
  accountNumber: '0123456789',
  bankId: 'bank-uuid',
  amount: 10000,
  reference: 'payment-001',
  narration: 'Payment for services',
});

// Collect via mobile money
const collection = await lenco.collections.fromMobileMoney({
  amount: 5000,
  reference: 'order-123',
  phone: '0971234567',
  operator: 'airtel',
  country: 'zm',
});

Features

  • Full TypeScript support
  • Accounts, Banks, Transfers, Collections, Settlements, Transactions APIs
  • Webhook signature verification
  • Automatic retries with exponential backoff
  • Request/response logging
  • ESM and CommonJS support

Documentation

Full API documentation available at docs.lenco.co

Author

Alexander Asomba (@alexasomba) · 𝕏 @alexasomba

License

MIT

About

Node.js SDK for Lenco API - Payments, Transfers, Collections

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published