Integrating iwocaPay with Magento 2

Add iwocaPay to your Magento 2 checkout using our plugin

Lara Gilman avatar
Written by Lara Gilman
Updated over a week ago

Once you've installed and activated the plugin it'll add iwocaPay as another payment option in your checkout and your payments will automatically reconcile with the rest of your store data.

It means you can add a new payment option to your checkout in a few clicks and choose to show just Buy Now Pay Later and, if you like, add a free Pay Now option powered by instant bank-to-bank transfers to your checkout too - for free without any extra work.


Choose your fee structure when your customers use Pay Later

With iwocaPay you decide who foots the bill when your customers use Pay Later - you can find out how Pay Later pricing works here.

Your pricing set up is controlled by your Universal Pay Link in your iwocaPay dashboard

  • Head to the Pay Links page of your iwocaPay dashboard

  • Select Free for you or Free for your customers

Note: It’ll update for everyone who checks out from then on unless they already started check out (but didn’t finish it), they won’t get the updated pricing.


Connecting your iwocaPay account to your Magento 2 store

There's three important things to note before you get started:

  1. Our extension is designed specifically for Magento 2 and will not work for Magento 1 users.

  2. You'll need a developer (or someone technical) to get set up.

  3. You should always back up your database before making any changes to Magento, and run the instructions in maintenance mode.

If you're not technical and don't have a developer get in touch with us and we'll see how we can help.

Step 1: SSH into your Magento 2 server

Make sure in the directory of your magento installation, i.e.:

cd /path/to/magento

Step 2: Run the following command to add iwoca as a repository (so that composer can find the iwocaPay Magento 2 Plugin)

composer config repositories.iwoca git "git@github.com:iwoca/iwocapay-magento-payment-gateway.git"

Step 3: Run the following to get the files for the plugin

composer require iwoca/iwocapay-magento:^1.0

Step 4: Run the following to enable and install the plugin in your Magento 2 installation

magento module:enable Iwoca_Iwocapay

magento setup:upgrade

Step 5: Configure the plugin

  • Login to your store in the admin panel (using found at `/admin`)

  • Go to Stores > Configuration > Sales > Payment Methods

  • Select the iwocaPay Payment Method

  • Set Enabled to Yes

  • Set your API Key

  • Set your Seller ID

  • Set Mode to Production mode

  • Click Save Config

Step 6: Expire your caches by running the following command

magento cache:flush

Step 7: Try it out!

  • Add some items to your basket and go to checkout

  • You should see iwocaPay as a payment option

Select iwocaPay and check if you land on a https://www.iwoca.co.uk url.


Configuring your iwocaPay payment options

You can choose what iwocaPay payment options to show your customers: just Pay Later or Pay Later and Pay Now.

Pay Now is always free for you and your customers (unlike cards) - it doesn't need any other steps to set up.

Control which payment options you show

  • Login to your store in the admin panel (using found at `/admin`)

  • Go to Stores > Configuration > Sales > Payment Methods

  • Select the iwocaPay Payment Method

  • Hit the Payment modes dropdown and choose the option you'd like

If you ever want to change it, just do the same and it'll automatically update.


Update your iwocaPay plugin to the latest version

Updating the plugin in your Magento 2 store gives you access to our latest features.

Step 1: SSH into your Magento 2 server
Make sure in the directory of your magento installation, i.e:

cd /path/to/magento

Step 2: Run the following command to get the latest version of iwocaPay plugin
composer require iwoca/iwocapay-magento:^<version-number>

If you run into issues with the above command, try get the latest commit hash from the iwocaPay plugin github repository. Then, run the following command:
composer require iwoca/iwocapay-magento:dev-master#<commit-hash>

Step 3: Run the following command to apply the update
composer update


How to remove iwocaPay from your Magento 2 checkout

You can remove the iwocaPay payment option anytime and iwocaPay will stop showing as an option in your checkout immediately.

  • Log in to your server and enable maintenance mode.

  • Disable the extension, update dependencies, and clear the Magento 2 cache.

  • Verify the uninstallation.

  • Remove the directory of module files from the app folder.

  • Disable maintenance mode.

If you'd like to add iwocaPay back to your checkout again in future you'll need to reinstall it.

Did this answer your question?