PaystackTransactionChargeToCustomer provides the implementation to the formula provided by the Paystack support team as regards passing the Paystack transaction charge to customers Here's the article .
This library currently only works with the Nigerian Paystack Charges
Flat Fee - 100 Naira | Decimal Fee - 1.5%
This library would help you calculate the total amount to charge the customer including the Paystack charges. All you need to do is ...
paystack-transaction-charges-to-cus.js can be used in both node.js and in the browser.
Install paystack-transaction-charges-to-cus.js using npm:
npm install paystack-transaction-charges-to-cus
import {
calculateTotalPrice
} from 'paystack-transaction-charges-to-cus'
// functions and constants
calculateTotalPrice(100) // 101
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
DECIMAL_FEE |
Double |
true | 0.0150 | |
FEE_CAP |
int |
true | 2000 | |
FLAT_FEE |
int |
true | 100 |
Checkout Paystack API