Payment Method Rules: Hide or Show Payment Methods by Customer, Product, Amount, Country and Delivery Method
by Modvanta https://modvantaapps.tech/odoo-apps/payment-method-rules/$ 14.96

Decide which payment methods each customer sees at checkout
Write rules like 'bank transfer only for approved B2B customers' or 'no cash on delivery above 1,000'. Odoo's checkout then hides or keeps payment options per customer, tag, amount, country, products, delivery method, website, user group, shopper type and weekday.
Written and supported by Modvanta - modvantaapps@gmail.com
What it does
Odoo can restrict a payment provider by country, currency and a maximum amount, but not by who the customer is, what is in the cart or which delivery method was chosen. So everyone sees invoice payment, or nobody does.
This module adds Payment Method Rules. Each rule either hides the selected payment providers or methods, or shows only them, when its conditions match - or, with Apply set to 'when the conditions do NOT match', for everyone except the matching customers. Every condition you fill in must be true (AND); empty conditions are ignored.
Rules run on top of Odoo's own filtering in the website checkout, so they can only take options away. A Test Payment Rules wizard shows exactly which options a customer would get for an amount and which rule removed the others.
Who it is for
B2B and B2C shops Offer invoice or bank transfer to approved accounts only, cards to everyone. | Shops offering Cash on Delivery Limit COD by order value, shopper type or delivery method. | Finance teams Keep risky or costly payment methods away from the orders they should not be used for. |
Key features
Screenshots were taken on Odoo 19 with this module on a clean demo database (company Northwind Trading Co). Card payments use Odoo's demo provider in test mode; the customers are sample accounts.
Feature 1
Retail customer: card or cash on delivery
Emma has no B2B tag and a small cart with Standard Delivery. She sees Card and Cash on Delivery; Bank Transfer is hidden by the rule 'Bank transfer only for approved B2B customers'.

Feature 2
Approved B2B customer: bank transfer appears
Harbor Office Supplies carries the B2B Approved tag, so Bank Transfer is offered. Its cart is over 1,000, so Cash on Delivery is hidden by 'No cash on delivery above 1,000'.

Feature 3
Rules by delivery method
When Emma picks Express Courier on the delivery step, the rule 'Express courier: card only' leaves only card payment on the payment step.

Feature 4
All rules in one list
Website -> Configuration -> Payment Method Rules lists the rules in order with their action, the providers they act on and a readable summary of the conditions.

Feature 5
Only for tagged customers
Hide Bank Transfer when the conditions do NOT match: customer tag B2B Approved. Everyone without the tag loses the option, tagged customers keep it.
Conditions: customers, customer tags, shopper (anyone / logged-in / guests), user groups

Feature 6
Show only these payment options
A Show only rule removes everything except the selected options when it matches - here card only when the delivery method is Express Courier.
Order conditions: minimum and maximum amount, countries, delivery methods
Cart conditions: products or product categories, any or only
Websites and weekdays

Feature 7
Test before you go live
Test Payment Rules takes a customer, an amount, a website and optionally a quotation, and shows the payment options that shopper would be offered, the rules that matched and why each other option was removed.

Feature 8
Safety net in settings
If your rules would remove every payment option from a checkout, the standard options are shown instead. Tick Allow an empty payment step to turn that off.

How it works, step by step
| 1 | Open the rules Website -> Configuration -> Payment Method Rules (also under Accounting payment configuration). |
| 2 | Create a rule Choose Hide or Show only, pick the payment providers or methods, and fill the conditions that must be true. |
| 3 | Invert when needed Set Apply to 'when the conditions below do NOT match' to keep an option only for the matching customers. |
| 4 | Test it Open Test Payment Rules, pick a customer and an amount and check the result. |
| 5 | Customers check out The website payment step shows only the options your rules leave. |
Settings
| Action | Hide these payment options, or show only these payment options. |
| Apply | When the conditions match, or when they do NOT match. |
| Payment providers / methods | What the rule acts on. |
| Conditions | Customers, customer tags, shopper type, user groups, amount range, countries, delivery methods, products and categories, websites, weekdays. |
| Allow an empty payment step | Website setting. Off by default: if rules would leave no option, the standard options are shown. |
Frequently asked questions
Can a rule add a payment method Odoo would not show?
No. Rules run after Odoo's own provider filtering and can only remove options.
How are several conditions combined?
With AND: every condition you fill in must be true. Leave a condition empty to ignore it. Several rules can match the same checkout.
Does it work with delivery methods?
Yes. A rule can depend on the delivery method the shopper chose on the delivery step.
What if my rules remove everything?
By default the standard options are shown instead, so a customer is never left without a way to pay. You can turn this off in settings.
How do I check a rule?
Use Test Payment Rules with a customer, amount and website.
Compatibility
Odoo 19 Community and Enterprise | Depends on eCommerce, Payment, Delivery | Tested 42 automated tests |
Show every customer the right way to pay
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) • Invoicing (account) • Website (website) |
| Lines of code | 762 |
| Technical Name |
mdv_payment_method_rules |
| License | OPL-1 |
| Website | https://modvantaapps.tech/odoo-apps/payment-method-rules/ |
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