Introduction

Magento is a popular eCommerce platform. AfterPay has developed a plugin that easily integrates with a Magento-based webshop. It is a simple way to let your customers start using AfterPay at checkout.

You don't need advanced technical skills to add AfterPay to your Magento webshop!

What you need:

  1. A Magento instance, installed on your webserver. You also need FTP access to that server.

  2. An API key. For testing purposes, you can get a test key from your Account Manager at AfterPay.

    • When you are ready to go live, contact your Account Manager at AfterPay. They will configure your webshop in the backend, and give you the real production API key.

You will also need to include the AfterPay logos and Terms & Conditions / Privacy Policy links in your webshop's design, especially the Checkout page.

Contact Us

If you are thinking about offering AfterPay to your customers, please don't hesitate to contact our sales team. We will be happy to walk you through the setup and integration process.

AfterPay is currently available in the following countries:

  • Netherlands
  • Belgium
  • Germany
  • Austria
  • Switzerland
  • Sweden
  • Denmark
  • Norway
  • Finland

Get Magento

This document assumes that you already have a working, installed Magento webshop. If you don't, you can download the software and learn how to use it  here .

Many web hosting services have a backend tool that lets you install popular software packages with just a few clicks, and Magento is often included in those.


Get the Plugin

Note: There are two versions of the AfterPay plugin - one for Magento v1.9.x, and one for Magento 2 and later. They are not mutually compatible. If you have a Magento 1.9 webshop, you cannot use the Magento 2 plugin, and vice versa.

To deploy the AfterPay plugin for Magento 1.9.x:

  1. Go to https://mip.afterpay.nl/wp-content/uploads/AfterPay-Magento-Plugin.zip and download the plugin to your workstation.
    1. The download will be an archive (ZIP file). Extract it to a folder on your hard drive.
  2. Connect to your webserver via FTP. 
    1. FTP is the protocol for uploading files and directories to webservers. If you need an FTP client, try WinSCP.
    2. If you don't know the FTP credentials (URL, username and password), contact your hosting company.
  3. Find the Magento root folder (such as yourwebsite.com/magento/) and copy the contents of the extracted download to that folder.
    1. If you are prompted to overwrite some files, confirm it.
    2. The download has three folders: 'app', 'lib', and 'skin'. The Magento root folder will have all three of these, and more.
  4. Open the Magento admin panel in a web browser. (It should be a URL like https://yoursite.com/magento1/index.php/admin123)
  5. Go to System  > Cache management > Flush cache. This forces Magento to look and recognize that a new plugin is available.
  6. Log out of the Magento admin panel and log in again. This forces Magento to recognize your access permissions for the new plugin.

That's it! If you did not get any errors, you should have AfterPay installed in your Magento webshop. Go to System > Configuration > Sales and click on AfterPay.

If this section has not appeared, repeat steps 5 and 6. If that did not help, please contact your Key Account Manager for help.

Update the Plugin

To install a new version of the plugin, download the new version from https://mip.afterpay.nl/wp-content/uploads/AfterPay-Magento-Plugin.zip and repeat the installation process.

Configure the AfterPay Plugin

Once you have your Auth keys for all the countries where you will be offering AfterPay, the next step is to configure the plugin's settings.

  1. Open the Magento Admin Panel.
  2. Go to System > Configuration > Sales > AfterPay.
  3. Expand the sections, and fill them in as described below.

Minimum Configuration

The AfterPay plugin has lots of settings for flexibility. Not all of these are required for simple integrations.

The absolute minimum configuration is:

  • General Settings > Module enabled > Yes
  • Tax Settings > set the tax classes as per your local regulations
  • XX - Digital Invoice > 
    • Portfolio enabled > Yes
    • Mode > Test
    • Test API Key > enter the string you got from your Key Account Manager
    • (Belgium/Netherlands only) Test merchantID > enter the string you got from your Key Account Manager
    • (Belgium/Netherlands only) Test Password > enter the string you got from your Key Account Manager

Now you can test the behavior and appearance of AfterPay in your webshop.

General Settings

Label Description
Module enabled Select Yes to offer AfterPay in your webshop.
Show advanced settings

Select Yes to expand additional settings. These are optional, and AfterPay will still work if you ignore them.

This applies to all Settings tabs, not just General Settings!

Debug

Select E-mail to send email alerts whenever the AfterPay plugin encounters an error. Select Log to write these errors to Magento's log files.

  • The application logs are in /var/log/Afterpay_Afterpay.log.
  • The system logs are in /var/log/Afterpay_Afterpay_Exception.log.
Debug E-mail The address where error alerts will be sent.
Success URL

The page displayed to the customer upon a successful checkout with AfterPay.

This can be a special page on your webshop, or MyAfterPay.com, or something else.

Validation URL

The page displayed to the customer if the call sent by the webshop to AfterPay was faulty.

This can be a page encouraging the customer to contact the webshop for help, etc.

Failure URL

The page displayed to the customer if the purchase was actively denied by AfterPay. (For example, a failed credit check.)

This can be a page encouraging the customer to contact the webshop for help, etc.

Auto-Invoice Select Yes if you want Magento to consider a purchase to be fully paid when it is accepted by AfterPay.
Send Invoice Mail

Select Yes to have Magento send an email for each successful purchase in addition to AfterPay's invoice email.

Recommended to leave at No. The customer will receive only one email about the purchase - their invoice from AfterPay.

Separate Discount Select Yes to show product discounts as separate invoice line items in AfterPay invoices. This is recommended for proper invoice handling by AfterPay.

Tax Settings

These settings determine how Value-Added Tax is applied to different categories of invoice line items (such as goods, shipping fees, gift cards, downloads, subscriptions, etc.). In some countries, certain items such as books, food, event tickets, etc. may have VAT rates that are smaller than usual, or even zero.

These rules must be configured to ensure that AfterPay handles tax, invoicing and settlement correctly.

This relies on the correct configuration of taxes elsewhere in the Magento Admin Panel. For more information, please see Magento's documentation on taxes.

If you are not sure which tax rates apply to which of your products, please contact a local accountant.

Label Description
High VAT tax classes Select the line item category that is charged at the full VAT rate.
Low VAT tax classes

Select the line item category that is charged at a reduced VAT rate.

 

Zero VAT tax classes

Select the line item category that is charged at a VAT rate of zero.

Note: This is not the same as being exempt from VAT!

No VAT tax classes

Select the line item category that is not subject to VAT.

Note : This is not the same as being charged at a VAT rate of zero! This category is usually for things like shipping fees or gift cards.

Tax class for Discount

Select which category's tax rules apply to discount amounts.

This usually depends on whether you apply discounts to a product's gross price, or net price. If you apply a discount to a price that already includes tax, the share of tax that is now in the discount must be handled correctly.

Capture Settings

Capture happens when the webshop confirms that all goods have been shipped to the customer. At that point, the money that was reserved for this purchase is transferred to the merchant's AfterPay settlement account.

Label Description
Capture Mode

If this is set to Enabled, the AfterPay plugin will automatically send a Capture call for each purchase right away.

If this is set to Disabled, you must ensure that a Capture call is sent to the AfterPay eCommerce API separately from Magento. (For example, this API call can be made by your warehouse/stock management system when you mark an order as Shipped - using the same Auth key and Order Number.)

You can also make a manual Capture call in the Magento backend by going to Sales > Orders > View > Invoice > Amount: Capture Online.

Status Capture Request Accepted

If Capture Mode is Enabled, this will be the status of a Magento invoice after a successful automatic Capture call.

Status Capture Request Refused

If Capture Mode is Enabled, this will be the status of a Magento invoice if the automatic Capture call fails.

If this happens, make a separate Capture call using the same Auth key and Order Number, or contact your Key Account Manager for help.

Refund Settings

If Enable refunding is set to Yes, you will be able to issue refunds on purchases from Magento, and they will be correctly handled in AfterPay.

If it is set to No, you will have to handle any refunds on AfterPay purchases separately (for example, by manually sending money to the customer's bank account).

Portfolios, Country-Specific and Method-Specific Settings

The rest of the AfterPay plugin settings are various portfolios. These are collections of settings for different countries and AfterPay payment methods. You don't need to enable and configure all of these - only the ones that you want to offer to your customers.

There are separate portfolios for each country. These are identified by the ISO standard two-letter country code: NL - Netherlands, BE - Belgium, DE - Germany, AT - Austria, CH - Switzerland, SE - Sweden, NO - Norway, FI - Finland, DK - Denmark.

In addition to country-specific settings, there are also a few unspecified Portfolios which you can enable and modify as you like. These generic portfolios have a wider range of options.

  • XX - Digital Invoice - This is the default 14-Day Invoice payment method in AfterPay. It is always available in every market where AfterPay operates. It is primarily meant for business-to-consumer sales.
  • XX - Direct Debit - This is a Direct Debit version of the 14-Day Invoice payment method. Instead of receiving an invoice to be paid via their bank, the customer enters their bank details, and the money is immediately deducted from their bank account.
  • XX - Digital Invoice for B2B - This is a 14-Day Invoice for business-to-business sales. It is handled slightly differently in terms of tax, etc.
  • XX - Installments - This is the payment method for using Fixed Part Payments.
    • This needs to be enabled and configured for your webshop in the AfterPay backend. Before enabling this portfolio, please contact your Account Manager to set it up.
    • Make sure you configure the Minimal Amount to match the backend configuration, to avoid a rejected API call on every checkout.
  • Portfolio X - In addition to country-specific settings, there are also a few unspecified portfolios which you can enable and modify as you like. These generic portfolios have a wider range of options.

If you have Advanced Settings disabled, then non-generic portfolios will hide many of the optional settings.

To show all possible settings for all portfolios, go to General settings > Show advanced settings and set it to Yes

Use Ctrl+F to find a particular setting on this page.

Label Description
Portfolio Enabled

If this is set to Yes, this AfterPay payment method will be available to customers in this country.

Show payment method only for certain IP addresses

During testing, you may want to make AfterPay visible only for people in your office, and not your customers. Enter the external IP addresses of visitors to your webshop who will see AfterPay.

(If you want to know the external IP address of the computer and connection you are currently using, go to Google.com and search for "what is my IP".)

Hide payment method only for certain IP addresses

If you want to make AfterPay unavailable for orders coming from certain locations/networks, enter those external IP addresses here.

Mode

Select Test to use the test Auth key.

Select Live to use the real, production Auth key.

This is useful if you already have a working webshop, but would like to switch back to testing mode for a short time.

Live API Key The Auth key for real transactions. You will get this from your Key Account Manager in the last stage of the process.
Test API Key The Auth key for test transactions. You can get this from your Key Account Manager.
Live merchantID You will get this from your Key Account Manager in the last stage of the process. Belgium and Netherlands only
Test merchantID You can get this from your Key Account Manager.
Portfolio ID You can get this from your Key Account Manager.
Live Password You will get this from your Key Account Manager in the last stage of the process.
Test Password You can get this from your Key Account Manager.
Merchant ID

This is used to distinguish multiple webshops (with different branding) that use the same API key. It ensures that the right branding is used on invoices, etc.

You can get this from your Key Account Manager.

Portfolio country Select the customer's country of residence, for purposes of AfterPay's invoice handling.
Portfolio type
  • B2C - Business-to-consumer (selling directly to individuals)
  • B2B - Business-to-business (selling to companies)

B2B invoices are handled differently for purposes of taxes, etc.

Show bankaccount input field If Yes, the customer must provide their bank account details (IBAN) at checkout.
Show bankcode input field If Yes, the customer must provide their bank's BIC/SWIFT number at checkout.
Show gender input field If Yes , the customer must provide their salutation (Mr/Ms) at checkout.
Show phone number input field If Yes , the customer must provide their phone number at checkout.
Show date of birth input field

If Yes , the customer must provide their birth date at checkout.

Show social security number input field If Yes, the customer must provide their national ID number at checkout.
Show terms and conditions checkbox If Yes , the customer must check the box at checkout, confirming that they agree with AfterPay's Terms and Conditions.
Portfolio area
  • Frontend - the portfolio will be visible to customers in your webshop.
  • Backend - the portfolio will only be visible to staff using the Magento Admin Panel.
  • Both - the portfolio will be visible to both customers and staff.
Portfolio label The name of the portfolio (payment method), shown to customers at checkout.
Portfolio footnote A very brief description of the payment method, shown to customers at checkout.
Portfolio extended information A longer description of the payment method, shown to customers where space permits.
Minimal Amount

The smallest purchase that a customer can make in your webshop when paying with AfterPay.

If the total sum of the shopping cart is lower than this number, this portfolio is not displayed as a payment option.

If you know that a portfolio has a minimum amount in its AfterPay backend configuration (such as Installment Profiles) or risk/credit check, use the same value in this setting.

This avoids unnecessary API calls to AfterPay on checkout, which will always be rejected due to business logic, but will slow down your webshop's checkout experience.

Maximum Amount

The biggest purchase that a customer can make in your webshop when paying with AfterPay.

If the total sum of the shopping cart is higher than this number, this portfolio is not displayed as a payment option.

Maximum Amount for New AfterPay Customers

As above, but only applicable to customers who have not purchased from your webshop using AfterPay before.

There is no check to see if they are already an AfterPay customer through a different webshop.

Status Accepted No Invoice

This is the status of an order that has been accepted by the webshop, but not shipped yet; and Magento will not issue a separate invoice for this order.

This is usually the status of an order that has been Authorized but not Captured. The webshop may find that it is out of stock, etc., and void the customer's order before the money is charged.

Status Pending

This is the status of an order that has been accepted by the webshop, but not shipped yet.

This is usually the status of an order that has been Authorized   but not Captured . The webshop may find that it is out of stock, etc., and void the customer's order before the money is charged.

Status Accepted

This is the status of an order that has been Captured.

Status Refused This is the status of an order that received a negative response from AfterPay (failed credit check, etc.)
Allowed Countries Select Specific Countries to make this portfolio available to customers in selected countries only. Otherwise, the portfolio will be available to all your customers.
Payment from Specific Country

If Allowed Countries is set to Specific Countries, select the countries here.

Hold down Shift or Ctrl while clicking to select multiple countries.

Allowed Client groups

Select Specific client groups to make this portfolio available to customers in selected client groups only. Otherwise, the portfolio will be available to all your customers.

Client groups are configured elsewhere in the Magento Admin Panel.

Not allowed by shipping methods If you select any specific shipping methods here, this portfolio will NOT be available for orders with that shipping method.
Advisory process Set to No unless your Key Account Manager tells you otherwise.
Sort order

Set to 1 to make this the first (top) payment option shown to customers at checkout.

If you are using several AfterPay portfolios in the same country, then you can set others to 2 or more.

Presentation at Checkout

The AfterPlay plugin for Magento already comes with the correct Terms & Conditions, logos, etc. Everything should display correctly on your checkout page by default.

We recommend that you set the following values under the AfterPay plugin settings:

  • Sort Order = 1 
    • If you have multiple AfterPay payment methods for the same country, give them the lowest possible (but different) sort order numbers.
  • Show terms and conditions checkbox  = Yes
    • If you don't see this checkbox, go to the General Settings section and enable Advanced Settings.

For more information, or if you want to customize your checkout page further, please see AfterPay's Display Guidelines.

Testing & Go Live

Once your webshop has been configured with test Auth keys, you can make a test purchase using AfterPay as the payment method.

  • If you want to test the whole chain, ask your Key Account Manager for an Auth key to the Afterpay Client Test environment. You can use this in Test mode. You will receive confirmation emails, and will be able to see the invoices in MyAfterPay, the customer portal used for payment and invoice management.
  • Once you and your Key Account Manager are happy that everything is in order, you will get a Live Auth key, and can start offering AfterPay to your customers!