To implement a system where fees are deducted per order and
there is a minimum monthly fee of $15, follow these steps:
1. Daily Fee Deduction by Order
Define a per-order fee rate. For example, feePerOrder = 7.5 Cent.
Each time an order is placed, deduct the specified fee from the merchant's account or
balance. For instance, if 100 orders are placed in a day, the total fee for the day
would be 100 × 7.5 = $7.50. Then deduction rate is 35%, So your actual 100 orders fee will be $4.875
2. Track Daily and Monthly Fees
Maintain a daily record of the number of orders and the corresponding fees
At the end of each day, add the daily fee to a cumulative monthly fee total.
3. Ensure a Minimum Monthly Fee
At the end of the month, compare the cumulative fee total to the minimum fee requirement $15.
If the total fees collected during the month are less than $15, calculate the
shortfall and deduct it from the merchant's account. For instance:
If the total fees collected for the month are $12, the system should deduct an
additional $15 - $12 = $3 Tk.
4. Notifications and Reporting
Notify the merchant daily about the fees deducted and their current balance.
At the end of the month, send a report summarizing the total fees deducted, the
shortfall (if any), and the adjustments made to meet the minimum fee requirement.
Example Scenario
Fee Per Order: 7.5 Cent
Orders on Day 1: 50 → Fee
Deducted = 50 × 7.5 Cent = $3.75
Orders on Day 2: 100 → Fee
Deducted = 100 × 7.5 Cent = $7.5
... (similar calculations for the
remaining days)
Monthly Total Fee Collected: $12
Tk (sum of daily fees)
Shortfall: $15 - $12 = $3
At the end of the month, an additional $3 is deducted to
meet the minimum fee requirement.