I enable in backend option payment "cash on delivery".

I want to ask how to customize and add extra cost to customer basket for select payment "cash on delivery:".


Any solution?

sales ---> Payment methods   ---> cash on delivery [enable]

Is any way to display here https://prnt.sc/rqrpgv additional field with extra fee charge?

1 Answer 1


Create file in your module etc/adminhtml/system.xml with following content

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
        <section id="payment">
            <group id="cashondelivery">
                <field id="extra_fee" translate="label" type="text" sortOrder="65" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Extra Fee Charge</label>
                    <validate>validate-number validate-zero-or-greater</validate>

Result: Extra Fee Charge

  • Which module is responsible for Cash On Delivery / shipping options in backend? Thank you for your reply.
    – Sylvester
    Apr 1, 2020 at 12:48
  • Magento_OfflinePayments
    – DuxaBilii
    Apr 1, 2020 at 12:57
  • Can you please let me know with path, where is located this module? I try find on vendor/magento but I do not see. Thank you
    – Sylvester
    Apr 1, 2020 at 13:07
  • vendor/magento/module-offline-payments or app/code/Magento/OfflinePayments
    – DuxaBilii
    Apr 1, 2020 at 13:20
  • Ok I found it. Thank you. Let me check
    – Sylvester
    Apr 1, 2020 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.