Payment Fee & COD Charges: Surcharge or Discount per Payment Method
by Modvanta https://modvantaapps.tech/odoo-apps/payment-fee-surcharge/$ 9.97

Charge a fee or give a discount for each payment method at checkout
Add a Cash on Delivery charge, a credit card processing fee or a bank transfer discount to Odoo eCommerce orders. The shopper sees the fee and the new total the moment they pick a payment method, before paying.
Written and supported by Modvanta - modvantaapps@gmail.com
What it does
Payment methods do not cost a shop the same. Cash on delivery means handling and collection, cards come with processing fees, and a bank transfer costs almost nothing. Standard Odoo charges the same total whichever method the shopper picks.
This module adds Payment Fee Rules. Each rule names the payment methods it applies to and adds a fixed amount, a percentage of the order or both. A negative amount or percentage turns the rule into a discount. Rules can also be limited to some countries and to an order total range, and a percentage fee can be clamped between a minimum and a maximum.
On the payment step of the checkout, when the shopper clicks a payment method, the fee is added to the order as its own line and the order summary is refreshed at once: the fee row appears above the subtotal, and the total that is charged is the total that is shown. Switching to another method replaces the fee, it never adds a second one.
Who it is for
Shops offering Cash on Delivery Cover the cost of collecting cash with a fixed COD charge, and drop it on large orders. | Shops paying card fees Pass on a card processing fee as a percentage plus a fixed amount, with a minimum and a maximum. | Shops that prefer bank transfers Reward shoppers who choose the cheapest payment method with a percentage discount. |
Key features
All screenshots were taken on Odoo 19 with this module installed on a clean demo database (company Northwind Trading Co, Odoo demo products), the default website theme, Odoo's Cash on Delivery and Wire Transfer methods and Odoo's demo card provider in test mode.
Feature 1
Payment fee rules in one list
Website -> Configuration -> Payment Fees lists every rule with its payment methods, fee type, fixed fee and percentage. Drag the handle to order them and switch a rule off with the Active toggle.
A rule that names a payment method always wins over a rule for all methods
Several rules for one method: the first one whose conditions match is used

Feature 2
Fixed, percentage or both, with a minimum and a maximum
A rule has a fee type (fixed amount, percentage of order, or fixed amount plus percentage), the payment methods and countries it applies to, an order total range and a minimum and maximum fee.
The Card Processing Fee here is 2.9% + $0.30, at least $1.00 and at most $50.00
The percentage is computed on the order without the fee, so fees never stack

Feature 3
Cash on Delivery charge at checkout
The shopper clicks Cash on Delivery and the order summary shows a Cash on Delivery Charge row of $15.00 above the subtotal, with the total updated from $241.00 to $256.00.
A second COD rule with an order total range of $2,000 and more makes cash on delivery free on large orders

Feature 4
Credit card processing fee
Switching to the card method replaces the COD charge with the Card Processing Fee: 2.9% of $241.00 plus $0.30 gives $7.29 and a total of $248.29. The amount sent to the payment provider includes the fee.

Feature 5
Bank transfer discount
A rule with a negative percentage is a discount. Choosing Wire Transfer shows a Bank Transfer Discount of $-4.82 (2% of $241.00) and a total of $236.18.

Feature 6
The fee stays on the confirmed order
After paying, the order confirmation page shows the same fee or discount row and the same total the shopper saw on the payment step.

Feature 7
A normal order line in the backend
In Sales the fee is an ordinary order line with the Payment Fee service product, so it flows into the invoice and reports like any other line.
The fee product has no taxes by default and is not sold on the shop

How it works, step by step
| 1 | Install the module It depends on Odoo eCommerce and Payment. A Payment Fee service product is created for the fee lines. |
| 2 | Create your rules Website -> Configuration -> Payment Fees -> New. Give the rule the name the shopper should see, pick the payment methods and set the fee. |
| 3 | Narrow it down if needed Limit a rule to some countries or to an order total range, and set a minimum and maximum fee for percentage rules. |
| 4 | Shoppers see it at checkout On the payment step the fee row and the total change as soon as a payment method is clicked. |
Settings
Each rule is a record in Website -> Configuration -> Payment Fees.
| Name | The label of the fee row shown to the shopper, for example Cash on Delivery Charge. |
| Payment Methods | The payment providers the rule applies to. Leave empty for a rule that applies to every method. |
| Countries | Only apply the rule for these delivery or billing countries. Leave empty for all countries. |
| Minimum / Maximum Order Total | Only apply the rule when the order total, before the fee, is inside this range. |
| Fee Type | Fixed Amount, Percentage of Order, or Fixed Amount + Percentage. Negative values give a discount. |
| Minimum / Maximum Fee | Clamp the computed fee between these amounts. Not used for discounts. |
| Active and sequence | Switch a rule off without deleting it, and order rules with the drag handle. |
Frequently asked questions
Does the shopper see the fee before paying?
Yes. The fee row and the new total appear in the order summary as soon as a payment method is clicked on the payment step.
Can I give a discount instead of a fee?
Yes. Enter a negative fixed amount or percentage. On the bench a -2% rule gave a $-4.82 Bank Transfer Discount on a $241.00 order.
What if the shopper changes the payment method?
The fee line is replaced, not added again, and percentages are always computed on the order without the fee.
Can a fee depend on the country or the order amount?
Yes. Each rule has countries and a minimum and maximum order total. A COD rule for orders from $2,000 with a $0.00 fee was picked over the $15.00 COD charge for a $2,500 order.
Is the fee on the invoice?
The fee is a normal sales order line with the Payment Fee service product, so it is invoiced with the rest of the order.
Compatibility
Odoo 19 Community and Enterprise | Depends on eCommerce, Payment | Tested 15 automated tests |
Let each payment method carry its own cost
Questions before you buy, help with setup, or a change for your own workflow - write to us and a developer answers.
SUPPORT | AUTHOR Modvanta | INCLUDED Module, setup help by email |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
eCommerce (website_sale)
• Discuss (mail) • Website (website) • Invoicing (account) |
| Lines of code | 410 |
| Technical Name |
mdv_payment_fee_surcharge |
| License | OPL-1 |
| Website | https://modvantaapps.tech/odoo-apps/payment-fee-surcharge/ |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module