Multibanco (IfthenPay gateway) for WooCommerce


“Pagamento de Serviços” (service payment) on Multibanco (the Portuguese ATM network), or on Home Banking services, is the most popular way of paying services and (online) purchases in Portugal. The Portuguese consumer trusts in the “Multibanco” system more than any other.

This plugin will allow you to generate a payment Reference that the customer can then use to pay for his order on the ATM or Home Banking service. This plugin uses one of the several gateways/services available in Portugal, IfthenPay, and a contract with this company is required.

This is the official IfthenPay plugin, although the technical support is provided by Webdados.


  • Generates a Multibanco Reference for simple payment on the Portuguese ATM or Home Banking service network;
  • Automatically changes the order status to “Processing” (or “Completed” if the order only contains virtual downloadable products) and notifies both the customer and the store owner, if the automatic “Callback” upon payment is activated, which can be asked to IfthenPay via the plugin settings screen;
  • It’s possible to set minimum and maximum order totals for this payment gateway to be available;
  • Possibility to choose to reduce stock when the order is created or when it’s paid;
  • Allows searching orders (on the admin area) by Reference;
  • 3rd party plugin SMS notification integration:
    • WooCommerce – APG SMS Notifications;
    • Others to be added by request;
  • WPML tested and compatible;
  • Polylang tested;
  • PHP7 tested and compatible;


  • Use the included automatic install feature on your WordPress admin panel and search for “Multibanco (IfthenPay gateway) for WooCommerce”.
  • Go to WooCoomerce > Settings > Checkout > Pagamento de Serviços no Multibanco and fill in the details provided by IfthenPay (Entity and Subentity) in order to be able to use this payment method. A contract with IfthenPay is needed to get these details.
  • Make sure you’ve asked IfthenPay to activate the “Callback” on their side with the URL and Anti-phishing key provided on the settings screen. This can now be done via this same screen.
  • Start receiving “pilim”.


Installation Instructions
  • Use the included automatic install feature on your WordPress admin panel and search for “Multibanco (IfthenPay gateway) for WooCommerce”.
  • Go to WooCoomerce > Settings > Checkout > Pagamento de Serviços no Multibanco and fill in the details provided by IfthenPay (Entity and Subentity) in order to be able to use this payment method. A contract with IfthenPay is needed to get these details.
  • Make sure you’ve asked IfthenPay to activate the “Callback” on their side with the URL and Anti-phishing key provided on the settings screen. This can now be done via this same screen.
  • Start receiving “pilim”.
Can I start receiving payments right away? Show me the money!

Nop! You have to sign a contract with IfthenPay in order to activate this service. Go to for more information.

The generated reference does not contain the order number. How will I know which order as been paid?

IfthenPay will send you an email each time a reference is paid, but the reference does not contain the order number. This is by design: our plugin does not include the order number on the reference because of the way WooCommerce/WordPress set orders/posts IDs.

Anyway, you do not need the order number on the reference because our plugin uses a callback mechanism so that IfthenPay can automatically notify WooCommerce that a specific reference was paid. The order is linked to the reference on the database and will, also automatically, be set as paid.

If you still need to know to which order a reference is linked to, you can use the search box on the WooCommerce Orders administration screen.

Can I test the callback call to simulate a payment and test what will happen when a real payment is made by a customer?

Yes, you can. Edit you wp-config.php file and set WP_DEBUG to true. Then place a test order on the frontend, go to the order edit screen and click the button that says “Simulate callback payment”.

Can I use this plugin / IfthenPay service on more than one website?

Yes, but not with the same subentity. Ask IfthenPay for a different subentity for each website you want to use the service on. There is no extra costs involved, and you can even route the payments for distinct bank accounts.

My website is multilingual. Will I be able to use this plugin?

Yes. This plugin is officially WPML compatible. You will need the WPML and WPML String Translation Plugins (alongside with WooCommerce Multilingual that is mandatory for any WooCommerce + WPML install).

[WPML] How can I translate the payment method title and description that the client sees on the checkout page for secondary languages?

Go to WPML > String Translation > Search and translate the multibanco_ifthen_for_woocommerce_gateway_title and multibanco_ifthen_for_woocommerce_gateway_description strings on the woocommerce domain. Don’t forget to check the “Translation is complete” checkbox and click “Save”. You should also translate the “Extra instructions” string by searching the multibanco_ifthen_for_woocommerce_extra_instructions string on the multibanco_ifthen_for_woocommerce domain.

[SMS] How to include the Multibanco payment instructions on the SMS sent by “WooCommerce – APG SMS Notifications”?

Go to WooCommerce > SMS Notifications and add the %multibanco_ifthen% variable to “Order received custom message”.

Can I change the payment instructions look and feel on the “Thank you” page and/or the new order email, as well as the SMS message format?

Yes you can! But you have to know your way around WordPress filters. There are two filters to do this and you can find examples of them inside filters_examples.php.

Can I change the Multibanco icon on the checkout page?

There’s also a filter for this. See filters_examples.php.

Can I use a specific Entity or Subentity based on order details?

Yes, you should use the multibanco_ifthen_base_ent_subent filter. See filters_examples.php.

I want to charge an additional fee for payments via Multibanco. How should I do it?

You don’t! It’s illegal under Portuguese legislation to charge more based on the payment method chosen by the customer.
If you don’t care about the law, there are plugins that allow setting extra fees per payment method, but don’t ask us for support regarding this.

IfthenPay says my callback URL is returning a 404 error. Should I sit in a corner and cry or is there a solution?

Don’t cry! There’s a solution!
You probably have weird permalink settings (or no permalinks set at all) on your WordPress installation.
Tell them to change the callback URL from http://yourwebsite/wc-api/WC_Multibanco_IfThen_Webdados/?chave=[CHAVE_ANTI_PHISHING]&entidade=[ENTIDADE]&referencia=[REFERENCIA]&valor=[VALOR] to http://yourwebsite/?wc-api=WC_Multibanco_IfThen_Webdados&chave=[CHAVE_ANTI_PHISHING]&entidade=[ENTIDADE]&referencia=[REFERENCIA]&valor=[VALOR].

I need technical support. Who should I contact, IfthenPay or Webdados?

Although this is the official IfthenPay WooCommerce plugin, the development and support is Webdados responsibility.
For free/standard support you should use the support forums here at
For premium/urgent support or custom developments you should contact Webdados directly. Charges may (and most certainly will) apply.

Can I contribute with a translation?

Sure. Go to GlotPress and help us out.


Plugin excelente

Para pagamento por multibanco, esta solução é muito boa. Simples e fácil de usar.
Os meus parabéns.

Nice & Easy

Este é o plugin para o meio de pagamento de referência (literalmente…) no mercado português. É um aspecto muito relevante da nossa operação. Enquanto cliente de negócio, só tenho a elogiar a estabilidade da solução e a disponibilidade e conhecimento da equipa.

Multibanco is Portugal’s most common payment method, so it is quite a big deal. The team at Webdados managed to get it right. We use it at a couple of our stores and everything works just fine – no customer pain, no business pain. The support team sounds quite knowledgable – proof of that, we don’t remember calling them with any issue about this plugin.

Essencial para quem vende em Portugal

O plugin original para pagamentos multibanco para lojas em WordPress com WooCommerce. Tem indicações bastante claras e não dá problemas a configurar. Nota-se que é desenvolvido por especialistas em WordPress e lojas WooCommerce.

The original multibanco payment method plugin (portuguese national ATM system) for WooCommerce, works like a charm, no hassle. If you sell in Portugal you have to have this. Developed by experts in WordPress and WooCommerce stores.

Read all 11 reviews

Contributors & Developers

“Multibanco (IfthenPay gateway) for WooCommerce” is open source software. The following people have contributed to this plugin.


“Multibanco (IfthenPay gateway) for WooCommerce” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Multibanco (IfthenPay gateway) for WooCommerce” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Support for new special entities that allow using the order id to generate the reference (because no check digits are needed), and will in the future also allow expiration date
  • Better feedback on the logs location on WooCoommerce 3.0 and above

  • Rollback the French translation to the local plugin folder, because it’s still not approved on GlotPress

  • Tested with WooCommerce 3.2
  • Added WC tested up to tag on the plugin main file
  • Bumped Tested up to tag

  • Avoid duplicate email instructions on some edge cases (fix)

  • Avoid duplicate email instructions on some edge cases

  • Removed the translation files from the plugin lang folder (the translations are now managed on’s GlotPress tool and will be automatically downloaded from there)


  • Fix on text domain (changed from multibanco_ifthen_for_woocommerce to multibanco-ifthen-software-gateway-for-woocommerce) to make it compatible with translation system (Glotpress)
  • Fix several strings that were using the woocommerce textdomain instead of our own
  • Bumped Tested up to tag


  • Using WC() instead of $woocommerce
  • Using wc_reduce_stock_levels() instead of $order->reduce_order_stock() on WooCommerce 3.0 and above
  • Using WC()->customer->get_billing_country() instead of WC()->customer->get_country() on WooCommerce 3.0 and above


  • Started using the new WooCommerce 3.0 logging system
  • Quick (and dirty) fix for a bug on WooCommerce 3.0 that is not allowing payment gateways to add information to transactional emails
  • Improved debug logging


  • Tested with WooCommerce 3.0.0-rc.2
  • Changed version tests from 2.7 to 3.0
  • New WC_Multibanco_IfThen_Webdados class for better code organization
  • New WC_Order_MB_Ifthen class (extends WC_Order) to be used by the plugin to get and set order details
  • Bumped Tested up to tag


  • Multibanco payment option is now not shown if the currency is not Euro (Thanks @topsolutions)
  • Bumped Tested up to tag

  • Bumped Tested up to tag

  • Small CSS fix so that the payment instructions table on the “Thank You” page is not partially hidden on some mobile devices (Thanks Jorge Fonseca for the report)


  • WPML Fix: Shows the payment instructions on the correct language on the “Thank You” page and on Order Status and Customer Notes emails
  • Spanish basic translation (email strings only)


  • Started preparations for the new order meta setter and getter functions coming on WooCommerce 2.7
  • New mbifthen_format_ref function to format the reference with spaces after each 3 number (used by the plugin but can also be used externally)
  • New multibanco_ifthen_format_ref applied on the string to be returned from the mbifthen_format_ref function
  • Updated filters examples


  • Warn the store owner that if he ever changes URL he may have to ask IfthenPay to update the callback URL
  • Admin notice in case this plugin is active and WooCommerce is not
  • Bumped “Requires at least” tag


  • Small change to avoid Polylang removing the payment instructions from the client emails (Thanks Tiago Restivo for the report)
  • Bumped “Tested up to” tag


  • New multibanco_ifthen_base_ent_subent filter to be able to change the base Entity and Subentity used to generate the payment details, based on the order, which may be useful for marketplaces
  • Settings link on the plugins list
  • Bumped “Tested up to” tag


  • French translation (Thanks / /


  • Fix: Fatal error on WooCommerce Subscriptions admin screen if the “Only for Portuguese customers?” option was activated (Thanks TwistedStudio)
  • FAQ update


  • Fix: The callback url sent to IfthenPay would use http:// even if ssl was active
  • Bumped “Tested up to” tag


  • If the order changes value on the backend, normally by adding or removing products, a new reference is created to replace the old one. The customer can be notified of the new reference if that option is checked on the plugin settings
  • On orders created on the backend the reference is now created correctly, even if it’s not sent to the customer email because of a WooCommerce bug (that is going to be fixed when this commit goes into production
  • Choose either to include the payment instructions on emails sent to admin, or not
  • Better feedback on the payment details info box on the backend
  • Small adjustments on the settings screen, typos fixing and code improvments

  • Possibility to dismiss the new “Callback” activation notice
  • New warning only on the settings page, before the “Callback” activation button


  • Warning for new users that haven’t yet asked IfthenPay for the “Callback” activation
  • New multibanco_ifthen_email_instructions_payment_received filter to customize the “Multibanco payment received” text on emails
  • Bugfix: Sometimes the “Multibanco payment received” wouldn’t show up on the client email
  • Small settings screen fixes
  • Minor spelling errors correction (Thanks @dmatos)


  • Better reporting if it’s not possible to generate the reference

  • Fixed “Tested up to” field


  • WordPress 4.4, WooCommerce 2.4.12 and PHP 7 compatibility check – All good!


  • Changes to the settings page in order to validate Entity and Subentity input
  • Bumped required WordPress version to match the same requirements WooCommerce has (4.1)

  • readme.txt changes


  • It’s now possible to set the extra instructions text below the payment details table on the “Thank you” page and “New order” email on the plugin settings screen
  • Small adjustments on the WPML detection code
  • Fix: Polylang conflict (Thanks fana605)
  • Updated filters examples

  • Minor fixes on wrong links to set the WooCommerce currency (Thanks JLuis Freitas)


  • Added new debug variables to the callback URL: date and time of payment and used terminal (this information will only be visible on the “Order Notes” administration panel)
  • Minor spelling errors correction

  • Changelog version fix


  • Bug fixes on filters_examples.php on the multibanco_ifthen_email_instructions_table_html and multibanco_ifthen_sms_instructions examples (props to Jorge Fonseca)


  • Small changes on the callback validation to better debug possible argument errors


  • Ask IfthenPay for “Callback” activation directly from the plugin settings screen
  • Settings screen fields re-organization in a more logical order
  • Adjustments in the plugin description and FAQ
  • Minor fixes to avoid a PHP Notice on WPML string registration

  • Fixing version numbers

  • Uploading missing images


  • Official IfthenPay plugin status \o/
  • New “SMS payment instructions” class to be able to integrate with SMS sending plugins in the future
  • New multibanco_ifthen_sms_instructions filter to customize the SMS payment instructions
  • WooCommerce – APG SMS Notifications plugin integration: it’s now possible to add the Multibanco payment details to the SMS message sent by this plugin by using the %multibanco_ifthen% variable on the message template
  • Shows alternate callback URL on WordPress installations that don’t have pretty permalinks active (Why? Oh why??)
  • New callback test tool on the edit order screen, if WP_DEBUG is set to true
  • WPML: Tries to fix the locale if WPML is active and we’re loading via AJAX
  • WPML: Get’s the title in the correct language for the icon’s alt attribute
  • WPML: Shows the payment instructions on the correct language on the “Thank You” page and on Order Status and Customer Notes emails
  • Now using WooCommerce’s payment_complete function so that orders with only downloadable items go directly to completed instead of processing
  • Fix: eliminates duplicate “payment received” messages on emails
  • Fix: Use “new” (2.2+) WooCommerce order status when searching for orders to be set as paid via callback (shame on us)
  • “Commercial information” and “Technical support” information and links on the right of the plugin settings screen
  • Adjustments in the plugin description and FAQ

  • Fixes a fatal error if WPML String Translation plugin is not active


  • WPML compatibility: You can now set the English title and description at the plugin’s settings screen and then go to WPML > String Translation to set the same for each language
  • Fix: get_icon() throw a notice


  • It’s now possible to change the payment gateway icon HTML using the woocommerce_gateway_icon filter. See filters_examples.php
  • Fix: Debug log path.
  • Fix: multibanco_ifthen_thankyou_instructions_table_html filter example had an error
  • Minor Portuguese translation tweaks.


  • It’s now possible to decide either to reduce stock when the payment is confirmed via callback (default) or when the order is placed by the client. On the first case you don’t have to fix the stock if the order is never paid but you’ll also not have the quantity reserved for this order. On the second case you’ll have to manually fix the stock if the order is never paid.
  • There’s 2 filters that allow changing the payment instructions on both the “Thank you” page and on the client email. You can choose either to manipulate the default HTML or create your own. See filters_examples.php
  • Minor Portuguese translation tweaks.


  • Minor visual tweaks
  • Fix: eliminated some notices and warnings


  • It’s now possible to enable this payment method only for orders below a specific amount
  • Fix: No more values passed by reference, in order to avoid “deprecated” notices from PHP
  • Fix: Bug on the option introduced on version 1.3


  • Removed unused add_meta_box code


  • Minor Multibanco logo improvements (Thanks Gumelo)
  • Fix: Small bug when detecting multisite installs


  • WordPress Multisite support


  • It’s now possible to enable this payment method only for orders above a specific amount


  • Added the ability to receive callback logs on an email address
  • Fixed “Order Status Emails for WooCommerce” plugin detection (soon to be released)
  • Fixed “IfthenPay” link


  • Changed plugin name and instructions to reflect the new company/gateway name “IfthenPay” instead of “Ifthen Software”
  • Fix: Changed textdomain calls from a variable to a string
  • Fix: Icon and banner URL now uses plugins_url function instead of WP_PLUGIN_URL constant
  • “Order Status Emails for WooCommerce” plugin integration (soon to be released, or not…)


  • Fix: On some environments some labels were not being translated correctly
  • Minor changes to allow running upgrade tasks


  • Initial release.