From 5ea5befc4ad06a690a2a96485cadaf4c1e23e171 Mon Sep 17 00:00:00 2001 From: Angello-droid <65546134+Angello-droid@users.noreply.github.com> Date: Thu, 16 Oct 2025 20:00:03 +0100 Subject: [PATCH 01/17] Fixed-broken-links I updated the links on the readme and grammar in some areas. --- README.md | 29 ++++++++++++------------ documentation/banks.md | 10 ++++----- documentation/beneficiary.md | 14 ++++++------ documentation/billPayments.md | 24 ++++++++++---------- documentation/collections.md | 40 ++++++++++++++++----------------- documentation/ebills.md | 6 ++--- documentation/misc.md | 12 +++++----- documentation/otp.md | 6 ++--- documentation/payment-plan.md | 23 ++++++++++--------- documentation/settlements.md | 8 +++---- documentation/subaccount.md | 18 +++++++-------- documentation/subscription.md | 10 ++++----- documentation/tokenization.md | 12 +++++----- documentation/transactions.md | 24 ++++++++++---------- documentation/transfers.md | 30 ++++++++++++------------- documentation/virtualAccount.md | 18 +++++++-------- documentation/virtualCard.md | 28 +++++++++++------------ 17 files changed, 157 insertions(+), 155 deletions(-) diff --git a/README.md b/README.md index 7c6b6e1..60910f6 100644 --- a/README.md +++ b/README.md @@ -11,18 +11,18 @@ ## Introduction -The Node library provides easy access to Flutterwave for Business (F4B) v3 APIs for your Node apps. It abstracts the complexity involved in direct integration and allows you to make quick calls to the APIs. +The Node library provides easy access to Flutterwave's v3 APIs for developing your Node application. It abstracts the complexity involved in direct integration and allows you to make quick calls to the APIs. Available features include: -- Collections: Card, Account, Mobile money, Bank Transfers, USSD, Apple Pay, Google Pay, Fawry Pay, eNaira. +- Collections: Card, Account, Mobile Money, Bank Transfers, USSD, Apple Pay, Google Pay, Fawry Pay, and eNaira. - Payouts and Beneficiaries. - Recurring payments: Tokenization and Subscriptions. -- Split payments -- Card issuing +- Split payments. +- Card issuing. - Transactions dispute management: Refunds and Chargebacks. - Transaction reporting: Collections, Payouts, Settlements, Refunds, Chargebacks and Transaction timeline. - Bill payments: Airtime, Data bundle, Cable, Power, Toll, E-bills, and Remitta. -- Identity verification: Resolve bank account, resolve BVN information and generate OTP. +- Identity verification: Bank Account Verification, BVN Verification and OTP Generation. ## Table of Content @@ -39,12 +39,12 @@ Available features include: ## Requirements -1. Flutterwave for business (F4B) [API Keys](https://developer.flutterwave.com/docs/integration-guides/authentication) -2. Node 18 or higher. +1. Your [API Keys](https://developer.flutterwave.com/v3.0.0/docs/authentication#get-your-api-keys). +2. Node version 18 or higher. ## Installation -To install the package, run the following command in your Node terminal: +To install our package, run the following command in your Node terminal: ```sh npm install flutterwave-node-v3 @@ -60,8 +60,7 @@ const flw = new Flutterwave( ); ``` -For staging (Test environment), use the TEST API Keys and for production (Live environment), use LIVE API KEYS. -You can get your process.env.FLW_PUBLIC_KEY and process.env.FLW_SECRET_KEY from the Flutterwave dashboard. Read the [requirement section](#requirements) for more information on how to get your API keys. +For the staging (test) environment, use your test API keys, while for the production (live) environment, use your live API keys. You can get your process.env.FLW_PUBLIC_KEY and process.env.FLW_SECRET_KEY from the Flutterwave dashboard. Read the [requirement section](#requirements) for more information on retrieving your API keys. ## Usage @@ -84,16 +83,18 @@ You can get your process.env.FLW_PUBLIC_KEY and process.env.FLW_SECRET_KEY from ## Testing -All of the libraries tests are run on Mocha. Available tests include `rave.bank.test`, `rave.beneficiaries.test`, `rave.bills.test`, `rave.charge.test`, `rave.ebills.test`, `rave.settlements.test`, `rave.subscriptions.test`. They can be run by running the test command in your terminal. +All of the libraries tests are run on Mocha. Available tests include `rave.bank.test`, `rave.beneficiaries.test`, `rave.bills.test`, `rave.charge.test`, `rave.ebills.test`, `rave.settlements.test`, `rave.subscriptions.test`. You can run all tests by executing the test command in your terminal. ```sh -npm run test or npm test +npm run test +or +npm test ``` ## Debugging Errors -We understand that you may run into some errors while integrating our library. You can read more about our error messages [here](https://developer.flutterwave.com/docs/integration-guides/errors). -For `authorization` and `validation` error responses, double-check your API keys and request. If you get a `server` error, kindly engage the team for support. +We understand that you may encounter errors while integrating our library. You can read more about our error messages [here](https://developer.flutterwave.com/v3.0.0/docs/common-errors). +If you experience` authorization` or `validation` errors, double-check your API keys and request. For server errors, please reach out to our support team for assistance. ## Support diff --git a/documentation/banks.md b/documentation/banks.md index e50d1fe..70bf3e4 100644 --- a/documentation/banks.md +++ b/documentation/banks.md @@ -4,7 +4,7 @@ # BANKS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Fetch Bank details via any of these methods: 1. [Fetch all Banks](#get-all-banks) @@ -12,7 +12,7 @@ Fetch Bank details via any of these methods: ## Get all banks -This describes how to get list of banks you can transfer to +This section describes how to get a list of banks you can make transfers to. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -24,7 +24,7 @@ const getBanks = async () => { try { const payload = { - "country":"NG" //Pass either NG, GH, KE, UG, ZA or TZ to get list of banks in Nigeria, Ghana, Kenya, Uganda, South Africa or Tanzania respectively + "country":"NG" //Pass either NG, GH, KE, UG, ZA or TZ to get list of banks in Nigeria, Ghana, Kenya, Uganda, South Africa or Tanzania respectively. } const response = await flw.Bank.country(payload) @@ -356,7 +356,7 @@ Sample Response ## Get bank branches -This describes how to get a list of bank branches +This section describes how to get a list of bank branches. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -369,7 +369,7 @@ const getBranches = async () => { try { const payload = { - "id":280 //Unique bank ID, it is returned in the call to fetch banks GET /banks/:country + "id":280 //Unique bank ID, it is returned in the call to fetch banks GET /banks/:country. } const response = await flw.Bank.branches(payload) diff --git a/documentation/beneficiary.md b/documentation/beneficiary.md index f6e996c..a0460e3 100644 --- a/documentation/beneficiary.md +++ b/documentation/beneficiary.md @@ -4,7 +4,7 @@ # BENEFICIARIES -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage transfer beneficiaries via any of these methods: 1. [Create a Beneficiary](#create-a-beneficiary) @@ -15,7 +15,7 @@ Manage transfer beneficiaries via any of these methods: ## Create a beneficiary -This describes how to create a transfer beneficiary +This section describes how to create a transfer beneficiary. ```javascript @@ -62,7 +62,7 @@ Sample Response ## List all beneficiaries -This describes how to get all beneficiaries +This section describes how to get all beneficiaries. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -188,7 +188,7 @@ Sample Response ## Fetch a beneficiary -This describes how to get a single transfer beneficiary details +This section describes how to get a single transfer beneficiary details. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -202,7 +202,7 @@ const fetchBeneficiary = async () => { try { const payload = { - "id":"2923" //This is the unique identifier for the beneficiary you intend to fetch. It is returned in the call to create a beneficiary as data.id + "id":"2923" //This is the unique identifier for the beneficiary you intend to fetch. It is returned in the call to create a beneficiary as data.id. } const response = await flw.Beneficiary.fetch(payload) @@ -237,7 +237,7 @@ Sample Response ## Delete a beneficiary -This describes how to delete a transfer beneficiary +This section describes how to delete a transfer beneficiary. ```javascript @@ -251,7 +251,7 @@ const delBeneficiary = async () => { try { const payload = { - "id":"4150" //This is the unique identifier for the beneficiary you intend to fetch. It is returned in the call to create a beneficiary as data.id + "id":"4150" //This is the unique identifier for the beneficiary you intend to fetch. It is returned in the call to create a beneficiary as data.id. } const response = await flw.Beneficiary.delete(payload) diff --git a/documentation/billPayments.md b/documentation/billPayments.md index 35a9898..9da2c4d 100644 --- a/documentation/billPayments.md +++ b/documentation/billPayments.md @@ -4,7 +4,7 @@ # BILLS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Make Bill payments via any of these methods: 1. [Create Bill Payment](#create-a-bill-payment) @@ -22,7 +22,7 @@ Make Bill payments via any of these methods: ## Create a bill payment -This describes how to create bill payments +This section describes how to create bill payments. ```javascript @@ -74,7 +74,7 @@ Sample Response ## Create bulk bills -This describes how to create bulk bills payment +This section describes how to create bulk bills payment. ```javascript @@ -135,7 +135,7 @@ Sample Response ## Get status of a bill payment -This describes how to get the status of a bill purchase +This section describes how to get the status of a bill purchase. ```javascript @@ -189,7 +189,7 @@ Sample Response ## Update bills order -This describes how to update bills order +This section describes how to update bills order. ```javascript @@ -240,7 +240,7 @@ Sample Response ## Validate bill service -This describes how to validate services like DSTV smartcard no, Meter number etc. +This section describes how to validate services like DSTV smartcard no, Meter number etc. ```javascript @@ -294,7 +294,7 @@ Sample Response ## Get bill categories -This describes how to fetch all bill categories on your account +This section describes how to fetch all supported bill payment categories. ```javascript @@ -604,7 +604,7 @@ Sample Response ## Get bill payment agencies -This describes how to get all government agencies you can pay into +This section describes how to get all government agencies you can pay into. ```javascript @@ -652,7 +652,7 @@ Sample Response ## Get amount to be paid for a product -This describes how to get amount to be paid for a product +This section describes how to get the amount to be paid for a product. ```javascript @@ -721,7 +721,7 @@ Sample Response ## Get bill payments -This describes how to get bill payments +This section describes how to get bill payments. ```javascript @@ -806,7 +806,7 @@ Sample Response ## Get products under an agency -This describes how to get all products under a government agency. +This section describes how to get all products under a government agency. ```javascript @@ -867,7 +867,7 @@ Sample Response ## Create order using billing code and product id -This describes how to create an order using the biller code and the product Id +This section describes how to create an order using the biller code and the product Id. ```javascript diff --git a/documentation/collections.md b/documentation/collections.md index d1c265e..2155930 100644 --- a/documentation/collections.md +++ b/documentation/collections.md @@ -4,7 +4,7 @@ # COLLECTIONS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Collect payments from your users via any of these methods: 1. [Cards](#card-collections) @@ -24,20 +24,20 @@ Collect payments from your users via any of these methods: 15. [ApplePay](#apple-pay) 16. [GooglePay](#google-pay) -There are three steps involved in collecting payments from your users: +There are three steps involved in collecting payments from your customers: - Initating the transaction. - Authorizing the transaction. - Verifying the transaction. -Read more about the steps [here](https://developer.flutterwave.com/docs/direct-charge/overview) +Read more about the steps [here](https://developer.flutterwave.com/v3.0.0/docs/paymentsintroduction) ## Card Collections -This section describes how you can collect card payments in the SDK. You can learn more about the payment method [here](https://developer.flutterwave.com/docs/direct-charge/card). +This section describes how to collect card payments. You can learn more about the payment method [here](https://developer.flutterwave.com/v3.0.0/docs/direct-card-charge). -> Kindly note that `enckey` is your encryption key. You can get this from your API setting in the dashboard. You can check [here](https://developer.flutterwave.com/docs/integration-guides/authentication) to get more information on how to get your encryption key. +> Kindly note that `enckey` is your encryption key. You can get this from the API setting in your dashboard. You can check [here](https://developer.flutterwave.com/v3.0.0/docs/authentication) to get more information on retrieving your encryption key. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -109,7 +109,7 @@ chargeCard(); ## Bank Transfers -This section covers how you can collect payments made via bank transfers. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/bank-transfer). +This section describes how to collect payments made via bank transfers. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/bank-transfer-1). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -167,7 +167,7 @@ Sample Response ## Direct debit (Nigerian bank account) -This section covers how you can collect payments made via your customers' bank accounts. The customer authorizes the payment with their bank, and the money is debited from their account. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/bank-account). +This section describes how to collect payments from your customer via their NGN bank accounts. The customer authorizes the payment with their bank, and the money is debited from their account. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/nigeria). ```javascript @@ -244,7 +244,7 @@ Sample Response ## Direct debit (UK & EU bank account) -This section covers how you make EUR and GBP collections via your customers' bank accounts. The customer is redirected to an interface where they select their bank and authorize the payment via their bank apps. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/uk-bank-account). +This section covers how to collect payment from your customer's via their EUR and GBP bank accounts. The customer is redirected to an interface where they select their bank and authorize the payment via their bank apps. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/uk-and-eu). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -322,7 +322,7 @@ Sample Response ## ACH Payement -This shows you how to accept ZAR and USD ACH charges from your customers. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/ach-payment). +This section describes how to collect ZAR and USD ACH charges from your customers. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/ach-payment). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -400,7 +400,7 @@ Sample Response ## USSD -This shows you how to accept payments via Direct USSD charge. You call our API to create a charge, then your customer completes the payment by dialling their bank's USSD code on their mobile phone. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/ussd). +This section describes how to collect payments via Direct USSD charge. You call our API to create a charge, then your customer completes the payment by dialling their bank's USSD code on their mobile phone. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/ussd). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -509,7 +509,7 @@ charg_voucher(); ## Mpesa -This describes how to collect payments via Mpesa. Read more about Mpesa payments [here](https://developer.flutterwave.com/docs/direct-charge/mpesa). +This section describes how to collect payments via Mpesa. Read more about Mpesa payments [here](https://developer.flutterwave.com/v3.0.0/docs/m-pesa). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -580,7 +580,7 @@ Sample Response ## Ghana mobile money -This describes how to collect payments via Ghana mobile money. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/ghana-mobile-money). +This section describes how to collect payments via Ghana mobile money. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/ghana). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -635,7 +635,7 @@ Sample Response ## Rwanda mobile money -This describes how to collect payments via Rwanda mobile money. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/rwanda-mobile-money). +This section describes how to collect payments via Rwanda mobile money. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/rwanda). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -685,7 +685,7 @@ Sample Response ## Uganda mobile money -This describes how to collect payments via Uganda mobile money. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/uganda-mobile-money). +This section describes how to collect payments via Uganda mobile money. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/uganda). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -739,7 +739,7 @@ Sample Response ## Francophone mobile money -This describes how to collect payments via mobile money for Franc (XAF or XOF). We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/francophone-mobile-money). +This section describes how to collect payments via mobile money for Franc (XAF or XOF). We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/francophone). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -817,7 +817,7 @@ Sample Response ## Zambia mobile money -This describes how to collect payments via Zambia mobile money. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/zambia-mobile-money). +This section describes how to collect payments via Zambia mobile money. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/zambia-mobile-money). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -862,7 +862,7 @@ Sample Response ``` ## Tanzania mobile money -This describes how to collect payments via Tanzania mobile money. You can get more information on Tanzania mobile money [here](https://developer.flutterwave.com/reference/endpoints/charge#tanzania-mobile-money) +This section describes how to collect payments via Tanzania mobile money. You can get more information on Tanzania mobile money [here](https://developer.flutterwave.com/v3.0.0/docs/tanzania) ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -935,7 +935,7 @@ Sample Response ## Enaira -This describes how to collect payments via enaira. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/enaira). +This section describes how to collect payments via enaira. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/enaira-payment). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -1009,7 +1009,7 @@ Sample Response ## Apple Pay -This describes how to collect payments via Apple Pay. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/apple-pay). +This sectiondescribes how to collect payments via Apple Pay. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/apple-paytm%EF%B8%8F). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -1095,7 +1095,7 @@ Sample Response ## Google Pay -This describes how to collect payments via Google Pay. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/docs/direct-charge/google-pay). +This section describes how to collect payments via Google Pay. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/google-paytm%EF%B8%8F). ```javascript const Flutterwave = require('flutterwave-node-v3'); diff --git a/documentation/ebills.md b/documentation/ebills.md index 55c744c..1555798 100644 --- a/documentation/ebills.md +++ b/documentation/ebills.md @@ -4,7 +4,7 @@ # EBILLS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage Ebills via any of these methods: 1. [Place Ebills Order](#place-ebills-order) @@ -12,7 +12,7 @@ Manage Ebills via any of these methods: ## Place ebills order -This describes how to create a new Ebills order +This section describes how to create a new Ebills order. ```javascript @@ -67,7 +67,7 @@ Sample Response ## Update ebills order -This describes how to update order for ebills +This section describes how to update order for ebills. ```javascript diff --git a/documentation/misc.md b/documentation/misc.md index 60b50f9..21c1cbe 100644 --- a/documentation/misc.md +++ b/documentation/misc.md @@ -4,7 +4,7 @@ # MISC -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Verify user information via any of these methods: 1. [Get all wallet balances](#get-all-wallet-balances) @@ -15,7 +15,7 @@ Verify user information via any of these methods: ## Get all wallet balances -This describes how to get all wallet balances +This section describes how to get all wallet balances on your account. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -128,7 +128,7 @@ Sample Response ## Get balances per currency -This describes how to get balances for specific currencies +This section describes how to get wallet balance for specific currencies. ```javascript @@ -171,7 +171,7 @@ Sample Response ## Resolve account details -This describes how to resolve a bank account to get the account holder's details +This section describes how to resolve an account and obtain the account holder's details. ```javascript @@ -214,7 +214,7 @@ Sample Response ## Initiate BVN Consent -This describes how to initiate bvn consent flow for your customer. +This section describes how to initiate bvn consent flow for your customer. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -259,7 +259,7 @@ Sample Response ## Verify BVN consent -This describes how to Verify consent and retirve the customer's BVN information. +This section describes how to verify consent and retrieve your customer's BVN information. ```javascript const Flutterwave = require('flutterwave-node-v3'); diff --git a/documentation/otp.md b/documentation/otp.md index 4899915..04d1c76 100644 --- a/documentation/otp.md +++ b/documentation/otp.md @@ -4,7 +4,7 @@ # OTPS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage Otps via any of these methods: 1. [Create Otp](#create-otp) @@ -13,7 +13,7 @@ Manage Otps via any of these methods: ## Create Otp -This describes how to create an otp +This section describes how to create an OTP. ```javascript @@ -79,7 +79,7 @@ Sample Response ## Validate Otp -This describes how to validate an otp +This section describes how to validate an OTP. ```javascript diff --git a/documentation/payment-plan.md b/documentation/payment-plan.md index 115e22b..e496bad 100644 --- a/documentation/payment-plan.md +++ b/documentation/payment-plan.md @@ -4,7 +4,7 @@ # PAYMENT PLANS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage Payment Plans via any of these methods: 1. [Create Payment Plan](#create-payment-plan) @@ -16,7 +16,7 @@ Manage Payment Plans via any of these methods: ## Create payment plan -This describes how to create a payment plan +This section describes how to create a payment plan. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -27,8 +27,8 @@ const createPaymentPlan = async () => { try { const payload = { amount: 1000, - name: 'SDK test Plan', //This is the name of the payment, it will appear on the subscription reminder emails - interval: 'monthly', //This will determine the frequency of the charges for this plan. Could be monthly, weekly, etc. + name: 'SDK test Plan', //This is the name of the payment plan, it will appear on the subscription reminder emails. + interval: 'monthly', //This will determine the interval at which customer is charged. Possible values are monthly, weekly, etc. }; const response = await flw.PaymentPlan.create(payload); @@ -63,7 +63,7 @@ Sample Response ## Get payment plans -This describes how to fetch all payment plans on your account +This section describes how to fetch all payment plans on your account. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -213,7 +213,7 @@ Sample Response ## Get a payment plan -This describes how to get a single payment plan +This section describes how to get a single payment plan. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -223,7 +223,7 @@ const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_K const fetchPlan = async () => { try { const payload = { - id: '52045', //This is the unique ìdof the payment plan you want to fetch. It is returned in the call to create a payment plan asdata.id` + id: '52045', //This is the unique ìd of the payment plan you want to fetch. It is returned in the call to create a payment plan as 'data.id' }; const response = await flw.PaymentPlan.get_plan(payload); @@ -258,7 +258,7 @@ Sample Response ## Update a payment plan -This describes how to update an existing payment plan +This section describes how to update an existing payment plan. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -268,7 +268,7 @@ const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_K const updatePlan = async () => { try { const payload = { - id: '34185', //This is the unique ìdof the payment plan you want to fetch. It is returned in the call to create a payment plan asdata.id` + id: '34185', //This is the unique ìd of the payment plan you want to fetch. It is returned in the call to create a payment plan as 'data.id' name: 'A sample KES monthly plan', status: 'active', }; @@ -304,7 +304,8 @@ Sample Response ``` ## Cancel a payment plan -This describes how to cancel an existing payment plan + +This section describes how to cancel an existing payment plan. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -314,7 +315,7 @@ const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_K const cancelPlan = async () => { try { const payload = { - id: '34185', //This is the unique ìd` of the payment plan you want to cancel + id: '34185', //This is the unique ìd` of the payment plan you want to cancel. }; const response = await flw.PaymentPlan.cancel(payload); diff --git a/documentation/settlements.md b/documentation/settlements.md index 3988ab8..5056192 100644 --- a/documentation/settlements.md +++ b/documentation/settlements.md @@ -4,7 +4,7 @@ # SETTLEMENTS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage Settlements via any of these methods: 1. [Get all Settlements](#get-all-settlements) @@ -12,7 +12,7 @@ Manage Settlements via any of these methods: ## Get all settlements -This describes how to fetch all settlements +This section describes how to fetch all settlements. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -308,7 +308,7 @@ Sample Response ### Get a settlement -This describes how to fetch and search all your settlements +This section describes how to fetch a settlement. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -321,7 +321,7 @@ const fetchSettlement = async () => { try { const payload = { - "id":"41497" ,//This is a unique identifier for the particular settlement you want to fetch. + "id":"41497" ,//This is the unique identifier of the particular settlement you want to fetch. "from":"2019-01-01", "to":"2020-05-22" } diff --git a/documentation/subaccount.md b/documentation/subaccount.md index bb57cf3..e86e5e6 100644 --- a/documentation/subaccount.md +++ b/documentation/subaccount.md @@ -2,9 +2,9 @@

-# SUBACCOUNTS (COLLECTION) +# COLLECTION SUBACCOUNTS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage Collection Subaccounts via any of these methods: 1. [Create a Subaccount](#create-a-subaccount) @@ -16,7 +16,7 @@ Manage Collection Subaccounts via any of these methods: ## Create a subaccount -This describes how to create a subaccount on Flutterwave +This section describes how to create a subaccount. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -76,7 +76,7 @@ Sample Response ## Fetch all subaccounts -This describes how to get all subaccounts +This section describes how to get all subaccounts. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -275,7 +275,7 @@ Sample Response ## Fetch a subaccount -This describes how to fetch a subaccount using the sub-account's ID +This section describes how to fetch a single subaccount using the subaccount ID. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -325,7 +325,7 @@ Sample Response ## Update a subaccount -This describes how to update a subaccount +This section describes how to update an existing subaccount. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -336,7 +336,7 @@ const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_K const updateSubaccount = async () => { try { const payload = { - "id": '2181', //This is the unique id of the subaccount you want to update. It is returned in the call to create a subaccount as data.id + "id": '2181', //This is the unique id of the subaccount you want to update. It is returned in the call to create a subaccount as data.id. "business_name": "Luxe collectibles", "business_email": "mad@o.enterprises", "account_bank": "044", @@ -387,7 +387,7 @@ Sample Response ## Delete a subaccount -This describes how to delete a subaccount +This section describes how to delete a subaccount. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -397,7 +397,7 @@ const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_K const updateSubaccount = async () => { try { const payload = { - id: '2181', //This is the unique id of the subaccount you want to update. It is returned in the call to create a subaccount as data.id + id: '2181', //This is the unique id of the subaccount you want to delete. It is returned in the call to create a subaccount as data.id. }; const response = await flw.Subaccount.delete(payload); diff --git a/documentation/subscription.md b/documentation/subscription.md index 60cfdb0..1037684 100644 --- a/documentation/subscription.md +++ b/documentation/subscription.md @@ -4,7 +4,7 @@ # SUBSCRIPTION -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage User subscriptions via any of these methods: 1. [Get all Subscriptions](#get-all-subscriptions) @@ -14,7 +14,7 @@ Manage User subscriptions via any of these methods: ## Get all subscriptions -This describes how to get all subscriptions +This section describes how to get all subscriptions on your account. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -74,7 +74,7 @@ Sample Response ## Fetch subscriptions with customer's email -This describes how to fetch subscriptions made by a single user. +This section describes how to fetch subscriptions using your customer's email address. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -126,7 +126,7 @@ Sample Response ## Cancel a subscription -This describes how to cancel a subscription +This section describes how to cancel a subscription. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -173,7 +173,7 @@ Sample Response ## Activate a subscription -This describes how to activate a subscription +This section describes how to activate a subscription. ```javascript const Flutterwave = require('flutterwave-node-v3'); diff --git a/documentation/tokenization.md b/documentation/tokenization.md index 9e9b326..5a702a6 100644 --- a/documentation/tokenization.md +++ b/documentation/tokenization.md @@ -4,7 +4,7 @@ # Tokenization -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage Tokenized charges via any of these methods: 1. [Create a tokenized charge](#charge-with-token) @@ -15,7 +15,7 @@ Manage Tokenized charges via any of these methods: ## Charge with token -This describes how to create a tokenized charge +This section describes how to create a tokenized charge. ```javascript @@ -97,7 +97,7 @@ Sample Response ## Update token details -This describes how to update details tied to a card token +This section describes how to update details tied to a card token. ```javascript @@ -144,7 +144,7 @@ Sample Response ## Create bulk tokenized charge -This describes how to charge multiple payment tokens at once +This section describes how to charge multiple payment tokens at once. ```javascript const charge_bulk = async () => { @@ -211,7 +211,7 @@ Sample Response ## Get a bulk tokenized charge status -This describes how to get the status of a bulk tokenized charge +This section describes how to get the status of a bulk tokenized charge. ```javascript @@ -256,7 +256,7 @@ Sample Response ## Get bulk tokenized charge transactions -This describes how to get specific bulk tokenized charge transactions +This section describes how to get specific bulk tokenized charge transactions. ```javascript diff --git a/documentation/transactions.md b/documentation/transactions.md index c1c4d93..4a6dbbc 100644 --- a/documentation/transactions.md +++ b/documentation/transactions.md @@ -4,7 +4,7 @@ # TRANSACTIONS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage user transactions via any of these methods: 1. [Get all transactions](#get-all-transactions) @@ -18,7 +18,7 @@ Manage user transactions via any of these methods: ## Get all transactions -This describes how to fetch all transactions on your account +This section describes how to fetch all transactions on your account. ```javascript @@ -331,7 +331,7 @@ Sample Response ## Get transaction fee -This describes how Get transaction fees +This section describes how to get transaction fees. ```javascript @@ -381,7 +381,7 @@ Sample Response ## Resend transaction webhook -This describes how resend a failed transaction webhook to your server +This section describes how to resend failed transaction webhooks. ```javascript @@ -424,7 +424,7 @@ Sample Response ## Create a transaction refund -This describes how to initiate a transaction refund +This section describes how to initiate a transaction refund. ```javascript @@ -440,7 +440,7 @@ const refund = async () => { const payload = { - "id": "5708", //This is the transaction unique identifier. It is returned in the initiate transaction call as data.id + "id": "5708", //This is the unique transaction identifier. It is returned in the initiate transaction call as 'data.id'. "amount":"10" } const response = await flw.Transaction.refund(payload) @@ -481,7 +481,7 @@ Sample Response ## Verify transaction -This describes how to verify transactions using the transaction id +This section describes how to verify transaction status using the transaction id. ```javascript @@ -494,7 +494,7 @@ const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_K const verify = async () => { try { - const payload = {"id": "288200108" //This is the transaction unique identifier. It is returned in the initiate transaction call as data.id + const payload = {"id": "288200108" //This is the unique transaction identifier. It is returned in the initiate transaction call as 'data.id'. } const response = await flw.Transaction.verify(payload) console.log(response); @@ -556,7 +556,7 @@ Sample Response ## Verify transaction with reference -This describes how to verify transactions status using the transaction reference (tx_ref). +This section describes how to verify transactions status using the transaction reference (tx_ref). ```javascript @@ -569,7 +569,7 @@ const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_K const verify_by_tx = async () => { try { - const payload = {"tx_ref": "txref-DI0NzMx13" //This is the transaction reference. It is returned in the initiate transaction call as data.tx_ref + const payload = {"tx_ref": "txref-DI0NzMx13" //This is the unique transaction reference generated by you. It is returned in the initiate transaction call as 'data.tx_ref'. } const response = await flw.Transaction.verify_by_tx(payload) console.log(response); @@ -636,7 +636,7 @@ Sample Response ## View transaction timeline -This describes how view Transaction Timeline +This section describes how view a Transaction Timeline. ```javascript @@ -650,7 +650,7 @@ const View_Transaction_Timeline = async () => { try { const payload = { - "id": "1296063" //This is the unique transaction ID. It is returned in the verify transaction call as data.id + "id": "1296063" //This is the unique transaction indentifier. It is returned in the verify transaction call as 'data.id'. } const response = await flw.Transaction.event(payload) console.log(response); diff --git a/documentation/transfers.md b/documentation/transfers.md index 3230991..a0d3e89 100644 --- a/documentation/transfers.md +++ b/documentation/transfers.md @@ -4,7 +4,7 @@ # TRANSFERS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Make Transfers (Payouts) via any of these methods: 1. [Initiate a transfer](#create-a-transfer) @@ -16,9 +16,9 @@ Make Transfers (Payouts) via any of these methods: ## Create a transfer -This describes how to initiate a transfer +This section describes how to initiate a transfer. -For more info about the payload parameteres definition, check [here](https://developer.flutterwave.com/reference#create-a-transfer) +For more information on the parameter definitions, visit [here](https://developer.flutterwave.com/v3.0.0/reference/create-a-transfer). ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -35,7 +35,7 @@ const initTrans = async () => { "amount": 5500, "narration": "Akhlm Pstmn Trnsfr xx007", "currency": "NGN", - "reference": "akhlm-pstmnpyt-r02ens007_PMCKDU_1", //This is a merchant's unique reference for the transfer, it can be used to query for the status of the transfer + "reference": "akhlm-pstmnpyt-r02ens007_PMCKDU_1", //This is the merchant's unique transfer reference, it is used to verify the status of the transfer. "callback_url": "https://www.flutterwave.com/ng/", "debit_currency": "NGN" } @@ -81,7 +81,7 @@ Sample Response ``` ## Create bulk transfer -This describes how to initiate a bulk transfer +This section describes how to initiate a bulk transfer. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -142,7 +142,7 @@ Sample Response ``` ## Get transfer fee -This describes how to get applicable transfer fee +This section describes how to get applicable transfer fee. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -188,7 +188,7 @@ Sample Response ``` ## Get all transfers -This describes how to fetch all transfers on your account +This section describes how to fetch all transfers on your account. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -470,7 +470,7 @@ Sample Response ``` ## Get a transfer -This describes how to fetch a single transfer on your account +This section describes how to fetch a single transfer. ```javascript @@ -516,7 +516,7 @@ Sample Response ## Wallet to Wallet Transfer -This will show you how to initiate a transfer from one Flutterwave wallet to another +This section describes how to initiate transfers from one Flutterwave wallet to another. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -527,13 +527,13 @@ const walletToWallet = async () => { try { const payload = { - "account_bank": "flutterwave", // This should always be set to flutterwave - "account_number": "99992069", //This is the recipient merchant ID - "amount": 500, //This is the amount to transfer to the recipient + "account_bank": "flutterwave", // This should always be set to flutterwave. + "account_number": "99992069", //This is the recipient merchant ID. + "amount": 500, //This is the amount to transfer to the recipient. "narration": "payment for x service provided", - "currency": "NGN", //This can be NGN, GHS, KES, UGX, TZS, USD - "reference": "wallet-transfer998", //This is a merchant's unique reference for the transfer, it can be used to query for the status of the transfer - "debit_currency": "NGN" //You can pass this when you want to debit a currency balance and send money in another currency. + "currency": "NGN", + "reference": "wallet-transfer998", //This is a merchant's unique transfer reference, which can be used to verify the status of the transfer. + "debit_currency": "NGN" //Pass this to select a different currency balance as the source of transfer funds. } const response = await flw.Transfer.wallet_to_wallet(payload) diff --git a/documentation/virtualAccount.md b/documentation/virtualAccount.md index 4c690bd..31ce098 100644 --- a/documentation/virtualAccount.md +++ b/documentation/virtualAccount.md @@ -4,7 +4,7 @@ # VIRTUAL ACCOUNT NUMBERS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage Virtual Accounts via any of these methods: 1. [Create a virtual account number](#create-a-virtual-account-number) @@ -15,10 +15,10 @@ Manage Virtual Accounts via any of these methods: ## Create a virtual account number -This describes how to create a virtual account number +This section describes how to create a virtual account number. Note: BVN is required for creating static account numbers in the Live Environment i.e if the value of is_permanent is True. -Kindly visit our API section found [here](https://developer.flutterwave.com/reference#create-a-virtual-account-number-1) for more information. +Kindly visit our API section found [here](https://developer.flutterwave.com/v3.0.0/reference/create-a-virtual-account-number-1) for further information. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -74,7 +74,7 @@ Sample Response ## Create bulk virtual account numbers -This describes how to create bulk virtual account numbers +This section describes how to create bulk virtual account numbers. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -86,7 +86,7 @@ const createBulkAcct = async () => { try { const payload = { - "accounts": 5, //This is the number of virtual account numbers you want to generate + "accounts": 5, //This is the number of virtual account numbers you want to generate. "email": "sam@son.com", "is_permanent": true, "tx_ref": "jhn-mndkn-012439283422", @@ -121,7 +121,7 @@ Sample Response ## Get bulk virtual account details -This describes how to fetch bulk virtual account numbers using batch id +This section describes how to fetch bulk virtual account numbers using batch id. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -133,7 +133,7 @@ const fetchBulk = async () => { try { const payload = { - "batch_id": "-RND_1311590351499953", // This is the batch ID returned in the bulk virtual account numbers creation + "batch_id": "-RND_1311590351499953", // This is the batch ID returned in the bulk virtual account numbers creation as 'data.batch_id'. } const response = await flw.VirtualAcct.fetch_bulk(payload) console.log(response); @@ -225,7 +225,7 @@ Sample Response ## Get a virtual account number -This describes how to fetch a virtual account number using order reference +This section describes how to fetch a virtual account number using order reference. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -237,7 +237,7 @@ const fetch = async () => { try { const payload = { - "order_ref": "URF_1579513580629_5981535", // This is the order reference returned in the virtual account number creation + "order_ref": "URF_1579513580629_5981535", // This is the order reference returned in the virtual account number creation as 'data.order_ref'. } const response = await flw.VirtualAcct.fetch(payload) console.log(response); diff --git a/documentation/virtualCard.md b/documentation/virtualCard.md index 0eb5b24..4ba00e7 100644 --- a/documentation/virtualCard.md +++ b/documentation/virtualCard.md @@ -4,7 +4,7 @@ # VIRTUAL CARDS -We recommend reading the main readme first, to understand the requirements for using the library and how to initiate this in your apps. This guide assumes you've read that. +We recommend that you first review the [main README](../README.md) to understand the requirements for using our library and how to implement it in your applications. This guide assumes you have done that. Manage Virtual Cards via any of these methods: 1. [Create Virtual Card](#create-virtual-card) @@ -18,7 +18,7 @@ Manage Virtual Cards via any of these methods: ## Create virtual card -This describes how to create a new virtual card +This section describes how to create a new virtual card. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -96,7 +96,7 @@ Sample Response ## Get all virtual cards -This describes how to Get all virtual cards +This section describes how to get all virtual cards. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -179,7 +179,7 @@ Sample Response ## Get a virtual card -This describes how to fetch a virtual card +This section describes how to fetch a virtual card. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -193,7 +193,7 @@ const fetchVCard = async () => { try { const payload = { - "id":"df3f2ba4-f137-4ce0-a6e3-3264c5831f17" //This is the unique id of the particular card you want to fetch its details. You can get this id from the call to create a virtual card or list virtual cards as data.id + "id":"df3f2ba4-f137-4ce0-a6e3-3264c5831f17" //This is the unique id of the particular card you want to fetch. You can get this id from the call to create a virtual card or list virtual cards as data.id. } const response = await flw.VirtualCard.fetch(payload) console.log(response); @@ -241,7 +241,7 @@ Sample Response ## Fund a virtual card -This describes how to fund an existing virtual card +This section describes how to fund an existing virtual card. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -253,7 +253,7 @@ const fundCard = async () => { try { const payload = { - "id":"c6d7f40b-f772-47b7-8136-81256d2f87a2", //This is the unique id of the particular card you want to fund. You can get this id from the call to create a virtual card as data.id + "id":"c6d7f40b-f772-47b7-8136-81256d2f87a2", //This is the unique id of the particular card you want to fund. You can get this id from the call to create a virtual card as data.id. "amount":500, "debit_currency":"NGN" } @@ -281,7 +281,7 @@ Sample Response ## Terminate a virtual card -This describes how to terminate a virtual card +This section describes how to terminate a virtual card. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -319,7 +319,7 @@ Sample Response ## Get virtual card transactions -This describes how to fetch transactions by date range on a single card +This section describes how to fetch transactions by date range on a single card. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -335,8 +335,8 @@ const getTransactions = async () => { "id":"b1405144-3427-4baf-80ea-5c6075a01a74", "from":"2019-01-01", "to":"2022-09-24", - "index":"0", //Pass "0" if you want to start from the beginning - "size":"1" //Specify how many transactions you want to retrieve in a single call + "index":"0", //Pass "0" if you want to start from the beginning. + "size":"1" //Specify how many transactions you want to retrieve in a single call. } const response = await flw.VirtualCard.transactions(payload) console.log(response); @@ -380,7 +380,7 @@ Sample Response ## Withdraw from a virtual card -This describes how to withdraw existing funds from a virtual card +This section describes how to withdraw existing funds from a virtual card. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -421,7 +421,7 @@ Sample Response ## Block Virtual Cards -This describes how to block a virtual card +This section describes how to block a virtual card. ```javascript const Flutterwave = require('flutterwave-node-v3'); @@ -462,7 +462,7 @@ Sample Response ## Unblock Virtual Cards -This describes how to unblock a virtual card +This section describes how to unblock a virtual card. ```javascript const Flutterwave = require('flutterwave-node-v3'); From c7d326b4be56f6c7cb668a516ab96cd8e6b47a7f Mon Sep 17 00:00:00 2001 From: Angello-droid <65546134+Angello-droid@users.noreply.github.com> Date: Wed, 22 Oct 2025 13:10:13 +0100 Subject: [PATCH 02/17] Update README.md minor adjustment --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 60910f6..1b58103 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## Introduction -The Node library provides easy access to Flutterwave's v3 APIs for developing your Node application. It abstracts the complexity involved in direct integration and allows you to make quick calls to the APIs. +The Node library provides easy access to Flutterwave's v3 APIs for developing your Node application. It abstracts the complexity involved in direct integration, enabling you to make quick calls to the APIs. Available features include: - Collections: Card, Account, Mobile Money, Bank Transfers, USSD, Apple Pay, Google Pay, Fawry Pay, and eNaira. @@ -20,11 +20,11 @@ Available features include: - Split payments. - Card issuing. - Transactions dispute management: Refunds and Chargebacks. -- Transaction reporting: Collections, Payouts, Settlements, Refunds, Chargebacks and Transaction timeline. +- Transaction reporting: Collections, Payouts, Settlements, Refunds, Chargebacks, and Transaction timeline. - Bill payments: Airtime, Data bundle, Cable, Power, Toll, E-bills, and Remitta. -- Identity verification: Bank Account Verification, BVN Verification and OTP Generation. +- Identity verification: Bank Account Verification, BVN Verification, and OTP Generation. -## Table of Content +## Table of Contents 1. [Requirements](#requirements) 2. [Installation](#installation) @@ -52,7 +52,7 @@ npm install flutterwave-node-v3 ## Initialization -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave( process.env.FLW_PUBLIC_KEY, @@ -60,7 +60,7 @@ const flw = new Flutterwave( ); ``` -For the staging (test) environment, use your test API keys, while for the production (live) environment, use your live API keys. You can get your process.env.FLW_PUBLIC_KEY and process.env.FLW_SECRET_KEY from the Flutterwave dashboard. Read the [requirement section](#requirements) for more information on retrieving your API keys. +For the staging (test) environment, use your test API keys, and for the production (live) environment, use your live API keys. You can get your process.env.FLW_PUBLIC_KEY and process.env.FLW_SECRET_KEY from the Flutterwave dashboard. For more information on retrieving your API keys, visit the [requirement section](#requirements). ## Usage @@ -83,7 +83,7 @@ For the staging (test) environment, use your test API keys, while for the produc ## Testing -All of the libraries tests are run on Mocha. Available tests include `rave.bank.test`, `rave.beneficiaries.test`, `rave.bills.test`, `rave.charge.test`, `rave.ebills.test`, `rave.settlements.test`, `rave.subscriptions.test`. You can run all tests by executing the test command in your terminal. +All of the library's tests are run on Mocha. Available tests include `rave.bank.test`, `rave.beneficiaries.test`, `rave.bills.test`, `rave.charge.test`, `rave.ebills.test`, `rave.settlements.test`, `rave.subscriptions.test`. You can run all tests by executing the test command in your terminal. ```sh npm run test @@ -94,11 +94,11 @@ npm test ## Debugging Errors We understand that you may encounter errors while integrating our library. You can read more about our error messages [here](https://developer.flutterwave.com/v3.0.0/docs/common-errors). -If you experience` authorization` or `validation` errors, double-check your API keys and request. For server errors, please reach out to our support team for assistance. +If you experience` authorization` or `validation` errors, double-check your API keys and request. For server errors, please contact our support team for assistance. ## Support -For additional assistance using this library, contact the developer experience (DX) team via [email](mailto:developers@flutterwavego.com) or on [slack](https://bit.ly/34Vkzcg). +For additional assistance using this library, contact the Developer Experience (DX) team via [email](mailto:developers@flutterwavego.com) or on [slack](https://bit.ly/34Vkzcg). You can also follow us [@FlutterwaveEng](https://twitter.com/FlutterwaveEng) and let us know what you think 😊. ## Contribution guidelines From c4daa692d4935debee8ef988f482561c8f62d66e Mon Sep 17 00:00:00 2001 From: Angello-droid <65546134+Angello-droid@users.noreply.github.com> Date: Wed, 22 Oct 2025 13:11:59 +0100 Subject: [PATCH 03/17] Update banks.md minor adjustment --- documentation/banks.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/banks.md b/documentation/banks.md index 70bf3e4..8406a28 100644 --- a/documentation/banks.md +++ b/documentation/banks.md @@ -14,7 +14,7 @@ Fetch Bank details via any of these methods: This section describes how to get a list of banks you can make transfers to. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY ); @@ -24,7 +24,7 @@ const getBanks = async () => { try { const payload = { - "country":"NG" //Pass either NG, GH, KE, UG, ZA or TZ to get list of banks in Nigeria, Ghana, Kenya, Uganda, South Africa or Tanzania respectively. + "country": "NG" //Pass either NG, GH, KE, UG, ZA, or TZ to get a list of banks in Nigeria, Ghana, Kenya, Uganda, South Africa, or Tanzania, respectively. } const response = await flw.Bank.country(payload) @@ -40,7 +40,7 @@ getBanks(); ``` Sample Response -```javascript +```JavaScript { "status": "success", "message": "Banks fetched successfully", @@ -358,7 +358,7 @@ Sample Response This section describes how to get a list of bank branches. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY ); @@ -385,7 +385,7 @@ getBranches(); ``` Sample Response -```javascript +```JavaScript { "status": "success", "message": "Bank branches fetched successfully", @@ -425,7 +425,7 @@ Sample Response { "id": 996, "branch_code": "GH190105", - "branch_name": "STANBIC BANK GHANA -NORTH INDUSTIAL AREA", + "branch_name": "STANBIC BANK GHANA -NORTH INDUSTRIAL AREA", "swift_code": "SBICGHAC", "bic": "SBICGHACXXX", "bank_id": 280 From db322254dab9b4bcbb31899a10107cb06bc772fa Mon Sep 17 00:00:00 2001 From: Angello-droid <65546134+Angello-droid@users.noreply.github.com> Date: Wed, 22 Oct 2025 13:13:52 +0100 Subject: [PATCH 04/17] Update beneficiary.md minor adjustment --- documentation/beneficiary.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/documentation/beneficiary.md b/documentation/beneficiary.md index a0460e3..fc52415 100644 --- a/documentation/beneficiary.md +++ b/documentation/beneficiary.md @@ -17,7 +17,7 @@ Manage transfer beneficiaries via any of these methods: This section describes how to create a transfer beneficiary. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -28,7 +28,7 @@ const createBeneficiary = async () => { try { const payload = { "account_number": "0690000034", - "account_bank":"044" // This is the beneficiary’s bank code, you can use the List of Banks to retrieve a bank code. + "account_bank": "044" // This is the beneficiary’s bank code; you can use the List of Banks to retrieve a bank code. "beneficiary_name": 'Ade Bond' } const response = await flw.Beneficiary.create(payload) @@ -45,7 +45,7 @@ createBeneficiary(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Banks fetched successfully", @@ -64,7 +64,7 @@ Sample Response This section describes how to get all beneficiaries. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY ); @@ -88,7 +88,7 @@ fetchAllBeneficiary(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Payout beneficiaries fetched", @@ -188,9 +188,9 @@ Sample Response ## Fetch a beneficiary -This section describes how to get a single transfer beneficiary details. +This section describes how to get a single transfer beneficiary's details. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY ); @@ -202,7 +202,7 @@ const fetchBeneficiary = async () => { try { const payload = { - "id":"2923" //This is the unique identifier for the beneficiary you intend to fetch. It is returned in the call to create a beneficiary as data.id. + "id": "2923" //This is the unique identifier for the beneficiary you intend to fetch. It is returned in the call to create a beneficiary as data.id. } const response = await flw.Beneficiary.fetch(payload) @@ -219,7 +219,7 @@ fetchBeneficiary(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Payout beneficiary fetched", @@ -240,7 +240,7 @@ Sample Response This section describes how to delete a transfer beneficiary. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY ); @@ -251,7 +251,7 @@ const delBeneficiary = async () => { try { const payload = { - "id":"4150" //This is the unique identifier for the beneficiary you intend to fetch. It is returned in the call to create a beneficiary as data.id. + "id": "4150" //This is the unique identifier for the beneficiary you intend to fetch. It is returned in the call to create a beneficiary as data.id. } const response = await flw.Beneficiary.delete(payload) @@ -268,7 +268,7 @@ delBeneficiary(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Beneficiary deleted", From 8eebdffffdecdf4094f8972c475cedd87948475b Mon Sep 17 00:00:00 2001 From: Angello-droid <65546134+Angello-droid@users.noreply.github.com> Date: Wed, 22 Oct 2025 13:16:53 +0100 Subject: [PATCH 05/17] Update billPayments.md minor adjustment --- documentation/billPayments.md | 74 +++++++++++++++++------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/documentation/billPayments.md b/documentation/billPayments.md index 9da2c4d..ffef033 100644 --- a/documentation/billPayments.md +++ b/documentation/billPayments.md @@ -9,8 +9,8 @@ We recommend that you first review the [main README](../README.md) to understand Make Bill payments via any of these methods: 1. [Create Bill Payment](#create-a-bill-payment) 2. [Create Bulk Bills](#create-bulk-bills) -3. [Get Bill Categories)](#get-bill-categories) -4. [Get amount to be paif for a product)](#get-amount-to-be-paid-for-a-product) +3. [Get Bill Categories](#get-bill-categories) +4. [Get the amount to be paid for a product](#get-amount-to-be-paid-for-a-product) 5. [Get Bill Payments](#get-bill-payments) 6. [Get Bill Categories](#get-bill-categories) 7. [Get Bill Payment Agencies](#get-bill-payment-agencies) @@ -24,7 +24,7 @@ Make Bill payments via any of these methods: This section describes how to create bill payments. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -57,7 +57,7 @@ createBill(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Bill payment successful", @@ -74,9 +74,9 @@ Sample Response ## Create bulk bills -This section describes how to create bulk bills payment. +This section describes how to create a bulk bill payment. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -123,7 +123,7 @@ createBulkBill(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Bulk bill Payment was queued for processing", @@ -137,7 +137,7 @@ Sample Response This section describes how to get the status of a bill purchase. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -165,7 +165,7 @@ getStatus(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Bill status fetch successful", @@ -189,9 +189,9 @@ Sample Response ## Update bills order -This section describes how to update bills order. +This section describes how to update Bill's order. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -220,7 +220,7 @@ updateBills(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "bills order updated successfully", @@ -240,9 +240,9 @@ Sample Response ## Validate bill service -This section describes how to validate services like DSTV smartcard no, Meter number etc. +This section describes how to validate services like DSTV smartcard number, Meter number, etc. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -271,7 +271,7 @@ validateBill(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Item validated successfully", @@ -296,7 +296,7 @@ Sample Response This section describes how to fetch all supported bill payment categories. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -320,7 +320,7 @@ getBillsCategories(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "bill categories retrieval successful", @@ -328,7 +328,7 @@ Sample Response { "id": 1, "biller_code": "BIL099", - "name": "MTN NIgeria", + "name": "MTN Nigeria", "default_commission": 0.02, "date_added": "2018-07-03T00:00:00Z", "country": "NG", @@ -604,9 +604,9 @@ Sample Response ## Get bill payment agencies -This section describes how to get all government agencies you can pay into. +This section describes how to get all the government agencies you can pay into. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -631,7 +631,7 @@ paymentAgencies(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "billers retrieval successful", @@ -650,11 +650,11 @@ Sample Response -## Get amount to be paid for a product +## Get the amount to be paid for a product This section describes how to get the amount to be paid for a product. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -685,7 +685,7 @@ amountToBePaid(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "billers products item retrieval successful", @@ -723,7 +723,7 @@ Sample Response This section describes how to get bill payments. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -735,9 +735,9 @@ const getBillsPayment = async () => { try { const payload = { - "from": "2019-08-01", //This is the start date it can be in any of this formats: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DD + "from": "2019-08-01", //This is the start date, it can be in any of these formats: YYYY-MM-DDTHH:MM: SSZ or YYYY-MM-DD "to": "2020-08-27", - "page":"1", //This is the page you want to start from. + "page": "1", //This is the page you want to start from. } const response = await flw.Bills.fetch_bills(payload) @@ -754,7 +754,7 @@ getBillsPayment(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "bills retrieval successful", @@ -808,7 +808,7 @@ Sample Response This section describes how to get all products under a government agency. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -837,7 +837,7 @@ productsUnderAgency(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "billers products retrieval successful", @@ -849,8 +849,8 @@ Sample Response "amount": "0.0", "code": "OT150", "fee": "0.0", - "name": "GENESIS GROUP ACCOMODATION", - "description": "GENESIS GROUP ACCOMODATION PAYMENT" + "name": "GENESIS GROUP ACCOMMODATION", + "description": "GENESIS GROUP ACCOMMODATION PAYMENT" }, { "amount": "0.0", @@ -865,11 +865,11 @@ Sample Response ``` -## Create order using billing code and product id +## Create order using billing code and product ID -This section describes how to create an order using the biller code and the product Id. +This section describes how to create an order using the biller code and the product ID. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); @@ -885,7 +885,7 @@ const Createorder = async () => { "amount": "3500.00", "reference": "FLWTTOT1000000029", "customer": { - "name": "emmanuel", + "name": "Emmanuel", "email": "emmanuel@x.com", "phone_number": "08060811638" }, @@ -917,7 +917,7 @@ Createorder(); Sample Response -```javascript +```JavaScript { "status": "success", "message": "Order processed successfully", From 37ec526a3994cef76a43a46d3f477cb4cf4c414e Mon Sep 17 00:00:00 2001 From: Angello-droid <65546134+Angello-droid@users.noreply.github.com> Date: Wed, 22 Oct 2025 15:34:44 +0100 Subject: [PATCH 06/17] Update collections.md minor adjustment --- documentation/collections.md | 54 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/documentation/collections.md b/documentation/collections.md index 2155930..662f829 100644 --- a/documentation/collections.md +++ b/documentation/collections.md @@ -10,8 +10,8 @@ Collect payments from your users via any of these methods: 1. [Cards](#card-collections) 2. [Bank transfers](#bank-transfers) 3. [Direct debit (Nigerian bank accounts)](#direct-debit-nigerian-bank-account) -4. [Direct debit (UK bank accounts)](#direct-debit-uk-bank-account) -5. [ACH payments](#ach-payement) +4. [Direct debit (UK and EU bank accounts)](#direct-debit-uk-eu-bank-account) +5. [ACH payments](#ach-payment) 6. [Mpesa](#mpesa) 7. [Ghana Mobile Money](#ghana-mobile-money) 8. [Uganda Mobile Money](#uganda-mobile-money) @@ -26,7 +26,7 @@ Collect payments from your users via any of these methods: There are three steps involved in collecting payments from your customers: -- Initating the transaction. +- Initiating the transaction. - Authorizing the transaction. - Verifying the transaction. @@ -39,7 +39,7 @@ This section describes how to collect card payments. You can learn more about th > Kindly note that `enckey` is your encryption key. You can get this from the API setting in your dashboard. You can check [here](https://developer.flutterwave.com/v3.0.0/docs/authentication) to get more information on retrieving your encryption key. -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const open = require('open'); @@ -111,7 +111,7 @@ chargeCard(); This section describes how to collect payments made via bank transfers. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/bank-transfer-1). -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY); @@ -146,7 +146,7 @@ bank_trf(); ``` Sample Response -```javascript +```JavaScript { "status": "success", "message": "Charge initiated", @@ -169,7 +169,7 @@ Sample Response This section describes how to collect payments from your customer via their NGN bank accounts. The customer authorizes the payment with their bank, and the money is debited from their account. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/nigeria). -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY); @@ -200,7 +200,7 @@ charge_ng_acct(); ``` Sample Response -```javascript +```JavaScript { "status": "success", "message": "Charge initiated", @@ -242,11 +242,11 @@ Sample Response } ``` -## Direct debit (UK & EU bank account) +## Direct debit (UK, EU bank account) -This section covers how to collect payment from your customer's via their EUR and GBP bank accounts. The customer is redirected to an interface where they select their bank and authorize the payment via their bank apps. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/uk-and-eu). +This section covers how to collect payment from your customers via their EUR and GBP bank accounts. The customer is redirected to an interface where they select their bank and authorize the payment via their bank apps. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/uk-and-eu). -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY); @@ -279,7 +279,7 @@ charge_uk_acct(); ``` Sample Response -```javascript +```JavaScript { "status": "success", "message": "Charge initiated", @@ -320,11 +320,11 @@ Sample Response } ``` -## ACH Payement +## ACH Payment This section describes how to collect ZAR and USD ACH charges from your customers. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/ach-payment). -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY); @@ -361,7 +361,7 @@ ach_payment(); ``` Sample Response -```javascript +```JavaScript { "status": "success", "message": "Charge initiated", @@ -400,9 +400,9 @@ Sample Response ## USSD -This section describes how to collect payments via Direct USSD charge. You call our API to create a charge, then your customer completes the payment by dialling their bank's USSD code on their mobile phone. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/ussd). +This section describes how to collect payments via a Direct USSD charge. You call our API to create a charge, then your customer completes the payment by dialling their bank's USSD code on their mobile phone. We go into more details on the payment flow itself [here](https://developer.flutterwave.com/v3.0.0/docs/ussd). -```javascript +```JavaScript const Flutterwave = require('flutterwave-node-v3'); const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY); @@ -432,7 +432,7 @@ ussd(); ``` Sample Response -```javascript +```JavaScript { "status": "success", @@ -478,7 +478,7 @@ Sample Response