Magento 2 Payment Fee

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

  1. Extension Installation Guide
  2. Configuration
  3. Tax Settings
  4. Manage Payment Fees
  5. Add new Fee
  6. Payment Fee in Frontend
  7. Payment Fee in Order View Backend

 

  1. Extension Installation
  • For Magento Marketplace Customers
    • Create a folder structure in Magento root as app/code/Meetanshi/PaymentSurcharge
    • Download and extract the zip folder and upload our extension files to the app/code/Meetanshi/PaymentSurcharge 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
  • 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

 

  1. 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.


 

  1. 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.


  1. 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.


 

  1. 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.


 

  1. 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.



 

  1. 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.