npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@adsesugh/flutterwave-v3-ts

v1.0.3

Published

Flutterwave v3 Node SDK rewritten in TypeScript

Readme

Flutterwave Node v3 (TypeScript SDK)

npm version npm downloads License: MIT Build Status

A fully typed TypeScript SDK for the Flutterwave v3 API.
This library simplifies integrating payments, transfers, card issuing, and more with Flutterwave in your Node.js/TypeScript applications.


📦 Installation

npm install flutterwave-v3-ts

or

yarn add flutterwave-v3-ts

🚀 Usage

import { Flutterwave } from "flutterwave-v3-ts";

const flw = new Flutterwave({
  publicKey: process.env.FLW_PUBLIC_KEY!,
  secretKey: process.env.FLW_SECRET_KEY!
});

// Example: Verify a transaction
(async () => {
  const response = await flw.transactions.verify({ id: "1234567890" });
  console.log(response);
})();

🔑 Configuration

Set your Flutterwave API keys in environment variables:

FLW_PUBLIC_KEY=your_public_key
FLW_SECRET_KEY=your_secret_key
BASE_URL=api_base_url
FLW_ENCRYPTION_KEY=your_encryption_key

Pass your public and secret keys when initializing:

const flw = new Flutterwave({
  publicKey: "FLWPUBK_TEST-xxxxxxxxxxxxxxxxxxxxx",
  secretKey: "FLWSECK_TEST-xxxxxxxxxxxxxxxxxxxxx",
  baseUrl: "https://api.flutterwave.com/v3", // Optional, defaults to Flutterwave's API URL
  encryptionKey: "your encryption_key"
});

📚 Features

  • Collections (Card, Bank, Mobile Money, USSD, etc.)
  • Tokenization
  • Split payments
  • Scheduled payments
  • Transfers
  • Card Issuing
  • Virtual Accounts
  • Bill Payments
  • Transactions & Reporting
  • Beneficiaries
  • Banks
  • Settlements
  • OTP
  • eBills
  • Miscellaneous Endpoints

🔍 Usage Examples

See the examples directory for more usage examples.

Collections

const response = await flw.collections.cardCharge({
  card_number: "5531886652142950",
  cvv: "564",
  expiry_month: "09",
  expiry_year: "32",
  currency: "NGN",
  amount: "100",
  fullname: "Flutterwave Developer",
  email: "[email protected]",
  tx_ref: "MC-3243e"
});
console.log(response);

Tokenization

const response = await flw.tokenization.chargeToken({
  token: "CARD_TOKEN",
  currency: "NGN",
  country: "NG",
  amount: 5000,
  email: "[email protected]",
  tx_ref: "ref-1234"
});
console.log(response);

Transfers

const response = await flw.transfers.initiate({
  account_bank: "044",
  account_number: "0690000031",
  amount: 5500,
  narration: "Test transfer",
  currency: "NGN",
  reference: "transfer-12345",
  debit_currency: "NGN"
});
console.log(response);

Card Issuing

const response = await flw.cardIssuing.createCard({
  currency: "NGN",
  amount: 1000,
  billing_name: "John Doe",
  billing_address: "123, Test Street",
  billing_city: "Lagos",
  billing_state: "LA",
  billing_postal_code: "100001",
  billing_country: "NG"
});
console.log(response);

Virtual Accounts

const response = await flw.virtualAccounts.create({
  email: "[email protected]",
  is_permanent: true,
  bvn: "12345678901",
  tx_ref: "VA-12345"
});
console.log(response);

Bill Payments

const response = await flw.bills.pay({
  country: "NG",
  customer: "08012345678",
  amount: 1000,
  recurrence: "ONCE",
  type: "AIRTIME",
  reference: "bill-1234"
});
console.log(response);

Transactions

const response = await flw.transactions.verify({ id: "123456789" });

console.log(response);

Banks

const response = await flw.banks.list({ country: "NG" });
console.log(response);

Settlements

const response = await flw.settlements.fetch({ from: "2023-01-01", to: "2023-02-01" });
console.log(response);

OTP

const response = await flw.otp.create({ length: 6, customer: "[email protected]", send: true });
console.log(response);

eBills

const response = await flw.ebills.create({
  currency: "NGN",
  amount: 5000,
  email: "[email protected]",
  tx_ref: "EBILL-12345"
});
console.log(response);

Miscellaneous

const response = await flw.misc.fetchBalance({ currency: "NGN" });
console.log(response);

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.