Magento 2 Payment Fee helps admin to set payment fees to charge customers with the extra fee for using certain payment methods of your Magento 2 store.
Table of Content
- Extension Installation Guide
- Configuration
- Tax Settings
- Manage Payment Fees
- Add new Fee
- Payment Fee in Frontend
- Payment Fee in Order View Backend
For Magento Marketplace Customers:
Find the extension’s Composer name and version in its composer.json file.
- Login to your SSH and run:
- composer require meetanshi/magento2-payment-fee --ignore-platform-reqs
- Enter your authentication keys. Your public key is your username; your private key is your password.
- Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
- To verify that the extension is installed properly, run the command:
- php bin/magento module:status Meetanshi_PaymentSurcharge
- By default, the extension is probably disabled. Enable the extension and clear static view files:
- php bin/magento module:enable Meetanshi_PaymentSurcharge --clear-static-content
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
- php bin/magento cache:flush
For Meetanshi Customers
- Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
- Login to your SSH and run below commands step by step:
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
- php bin/magento cache:flush
- Configuration
For configuring the extension, login to Magento 2, move to Stores > Configuration > Payment Fees where you can find various settings to enable the extension.
- Payment Fee: Enable the Payment Fee extension from here.
- Refund Payment Fees: Set YES to refund the fees while refunding orders.
- Tax Settings
From here, you can configure tax settings to add tax on payment fees.
- Apply Tax for Payment Fees: Select YES to apply tax on payment fees.
- Set Tax Class for Payment Fees: Select the tax class for payment fees.
- Display Payment Fees: Select how you want to display payment fees with the tax on the frontend.
- Assign Tax Class to Products
Once you have selected the tax class to apply on payment fees, make sure to assign the same tax class to the products. It will then calculate tax on the payment fee.
- Manage Payment Fees
The extension facilitates a backend grid where all the payment fee details are saved. Go to Sales > Manage Payment Fees to see the list of already created and saved payment fees. Any new payment fee can be added by clicking the “Add New Fee” button. Admin can activate or deactivate any payment fees for Magento 2 store from here.
- Add New Fee
On click of the “Add New Fee” button from “Manage Payment Fees”, you can see the following settings to add a new payment fee.
- Fee Title: Add payment fee title.
- Status: Set the status to enable to activate the payment fee.
- Amount: Add the fee amount.
- Fee Type: Select the fee type from the dropdown.
- Payment Methods: Select the payment methods to apply fee on.
- Store View: Select the store view.
- Customer Groups: Select the customer groups to enable payment fees for.
- Payment Fee in Frontend
Once configured, the payment fee gets applied on the order in frontend.
- Payment Fee Applied on Order in Checkout Page
Customers can see the payment fee applied on order on the checkout page in the frontend. Here, the Cash on Delivery payment method is selected and hence its fee is charged and added to the order total. Also, tax is applied on the payment fees based on the settings and it’s displayed based on the selected option.
- Payment Fee in My Account
The extension also displays the payment fee details in order view section under “My Account”, as shown below.
- Payment Fee in Order View Backend
After the successful order, payment fee details can also be seen in the Sales > Orders > Order View in the backend.