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 ...
- Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add the dependency:
dependencies {
implementation 'com.github.olaitanade:PaystackTransactionChargesToCus:1.1'
}
String totalPrice = PaystackTransactionChargesToCus.calculateTotalPrice("1000");
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