paystack-transaction-charges-to-cus

Paystack transaction charges to customer library for JavaScript and Node.js

Usage no npm install needed!

<script type="module">
  import paystackTransactionChargesToCus from 'https://cdn.skypack.dev/paystack-transaction-charges-to-cus';
</script>

README

PASS PAYSTACK TRANSACTION CHARGE TO CUSTOMER

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 .

Before getting started

This library currently only works with the Nigerian Paystack Charges

Flat Fee - 100 Naira | Decimal Fee - 1.5%

Get Started

This library would help you calculate the total amount to charge the customer including the Paystack charges. All you need to do is ...

Version Downloads Build Status Maintenance

Usage

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

Constants

Name Type Required Default Value Description
DECIMAL_FEE Double true 0.0150
FEE_CAP int true 2000
FLAT_FEE int true 100

Done

Checkout Paystack API