mageprince / magento2-paymentfee
Magento 2 Add Payment Fee To Order
Installs: 80 103
Dependents: 0
Suggesters: 0
Security: 0
Stars: 28
Watchers: 3
Forks: 20
Open Issues: 3
Type:magento2-module
README
The Magento 2 Payment Fee extension by MagePrince allows store owners to add extra charges for specific payment methods. These fees are shown throughout the customer journey — on the cart, checkout, order summary, invoice, credit memo, and sales emails. Admins can configure different types of fees, control visibility based on customer groups or store views, and even apply rules like disabling fees over a certain order amount. The extension also supports tax and refund settings for complete flexibility.
✨ Features
- Enable or disable the extension from admin configuration
- Add payment fees for specific payment methods (e.g., COD, PayPal)
- Fee types supported:
- Fixed Price
- Percentage of Order
- Per Item
- Per Row
- Display fees on:
- Checkout Page
- Order Summary
- Sales Emails (Order, Invoice, Credit Memo)
- Admin Order View
- Set custom titles for fees
- Refundable fee option in credit memo
- Disable fees for orders exceeding a maximum amount
- Customer group restrictions
- Store view restrictions
- Set sort order for fee display
- Supports tax calculation on the fee
- Assign tax class
- Choose display type: Incl., Excl., or Both
- Multi-store and multi-currency support
- Option to include discount/shipping in subtotal for calculation
💡 Payment Fee Types Explained
1. Fixed Price
A flat fee is added to the order, no matter what’s in the cart.
Example: Fee = 10 → You pay 10 extra.
2. Percentage Price
The fee is a percentage of the cart subtotal.
- If “Include shipping in subtotal” is Yes:
- Subtotal = Products + Shipping
- If “Include discount in subtotal” is Yes:
- Subtotal = Subtotal - Discount
Example: Fee = 10%, Subtotal = 36 → Extra = 3.60
3. Per Row
Fee is added based on the number of products (rows) in the cart.
Example: Fee = 10, Cart = 2 products → Extra = 20
4. Per Item
Fee is based on the total quantity of all products in the cart.
Example: Fee = 10, Cart = 3 items total → Extra = 30
🧪 Demo
🚀 Installation Instructions
Option 1: Install via Composer (recommended)
composer require mageprince/magento2-paymentfee
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
Option 2: Manual Installation
- Copy the content of the repo to the Magento 2
app/code/Mageprince/Paymentfee
- Run the following Magento CLI commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
✅ Compatibility
- Magento Open Source (Community Edition): 2.4.4 – 2.4.8
- Adobe Commerce (Enterprise Edition): 2.4.4 – 2.4.8
🤝 Contribution
Want to contribute to this extension? The quickest way is to open a pull request on GitHub.
🛠 Support
If you encounter any problems or bugs, please open an issue on GitHub.