HomeBlogHow to Add Afterpay to Shopify: Complete Guide for Merchants

How to Add Afterpay to Shopify: Complete Guide for Merchants

How to Add Afterpay to Shopify Guide

If you want to enable a third-party Buy Now Pay Later payment method for your Shopify store, Afterpay could be a good choice. With its vast Gen Z and millennial community, Afterpay offers merchants trending credit features to grow sales. Here, we give a step-by-step guide on how to set up Afterpay on Shopify and discuss all the details regarding this service and its tools.

What is Afterpay, and how does it work?

Afterpay is a Buy Now Pay Later (BNPL) service, allowing customers to split their payments into four installments within six weeks while getting a desired product right away. Recently, they also implemented an option to pay monthly for 6 to 12 months. The service is only available for US, Canada, UK, Australia, and New Zealand residents. This app allows paying both online and in-store (if you activate an Afterpay digital card) and requires no fees for the service if a customer doesn’t violate the terms. Keep reading to learn the details.

Afterpay actively attracts store owners for cooperation by offering ecommerce APIs and integrations with the most popular ecommerce platforms like Shopify, Bigcommerce, and more. Over 120,000 websites around the globe have Afterpay installed.

How to add Afterpay to Shopify: Step-by-step guide

You can add Afterpay to Shopify by installing the Afterpay Shopify apps and manually customizing the Afterpay messaging displayed on your pages. If you wish to seamlessly customize your payment methods and their appearance in your store, leverage the Shopify developer's assistance by sending a request using the link below.

However, you need to create an Afterpay account first to be able to proceed with integration.

Create your Afterpay account

To enable Afterpay with Shopify integration, create an Afterpay business account on their official website.

Afterpay Shopify integration

Note that to make this possible, you should have a store address in the countries where the service operates.

While registering, you can choose where you want to use Afterpay: online, in-store, or for both purposes.

In the registration form, you need to enter your contact and personal details, such as phone number, email address, home address, social security number, and government-issued photo ID. You must also fill in fields regarding your business, such as country, business type, shipping frequency, average revenue, and more.

Add Afterpay to Shopify as an additional payment method

Once you’ve completed the registration, you should activate Afterpay in your Shopify admin panel.

  1. Find the Afterpay app in the Shopify App Store.
  2. Log in to your Shopify admin and install the app.
  3. Verify your merchant credentials by entering the Afterpay Merchant ID and Secret Key.

  1. After verifying your account, you will see an Afterpay screen in your Shopify admin with two toggle switches. Activate Afterpay as your new payment gateway, keeping Test mode inactive.

  1. Open your online store and check if the Afterpay option is visible on your checkout page.

Pro tip: We strongly recommend running a test purchase to make sure everything works correctly.

Add Afterpay messaging to your product pages and a cart page

You can inform customers that your store allows purchasing products with the Afterpay service on your product pages and in the cart by installing the Afterpay On-site Messaging App, which is available in the Shopify App Store.

To implement the messaging on your product pages, follow the steps below.

  1. Install the app in your Shopify admin.

  1. Open the app in the Shopify Apps section.

  1. In the Add messaging section of the app’s menu, click Open theme editor.
  2. At the top of the editor, select Products.

  1. Select a product template. If you have multiple product templates, add messaging to each of them.
  2. Click Add block in the place where you want to add messaging.

  1. If you’ve done it right, you will see something like this.

  1. Click Save to finish the implementation.

Now, you’re ready to add Afterpay to Shopify cart pages.

  1. Select Cart in the drop down menu of your Theme editor.

  1. Click Add block in the place of your cart template where you want to add the message and select Afterpay On-site Messaging.

  1. Adjust your message content, alignment and styles separately for desktop and mobile. Once everything is set up, click Save.

You can also leverage the manual configuration of your Afterpay feature.

How to add an Afterpay code to Shopify?

If you want to manually add Afterpay messaging to your product and cart pages, copy the Afterpay code and follow the service documentation to paste it into your theme.liquid file.

You can also enable Afterpay for your dynamic cart by adding a selector to your theme.liquid file that corresponds to this element. As a result, you will see the Afterpay message on your sliding cart.

How to add an Afterpay banner to Shopify

Editing the Shopify theme.liquid file allows you to display an Afterpay banner at the top of your store pages.

To implement this feature in your store, follow the instructions in the Afterpay documentation or contact our Shopify development team for assistance in customizing your store's functionality.

How to hide the Afterpay payment method for some products

This feature is only available for Shopify Plus merchants since only the premium plan enables you to use Shopify Functions required to fine-tune store functionality. If you currently use Shopify Scripts to customize your payment methods, hurry up and switch to Checkout Extensibility by following our FREE migration guide. Enter your email here to receive the guide straight to your inbox.

Starting August 28, 2025, the Script Editor will no longer be supported. If you still use Script Editor and want to hide Afterpay for some of your products, follow the corresponding Afterpay guidelines. For seamless customization using Shopify Functions, contact the DigitalSuits team to hide specific payment methods on select pages effortlessly.

How does Afterpay work on Shopify?

Once you’ve added Afterpay for Shopify as your payment method, it will work just like other payment options, such as PayPal or credit cards. Suppose a customer chooses Afterpay when purchasing a product item. In that case, they’re redirected to the Afterpay portal to see the total payment amount, frequency of installments, and payment due at checkout.

Afterpay receives the first installment from the customer, while you get a full payment net commission from Afterpay. If the customer pays off their balance in installments on time, they’re not charged. Otherwise, they must pay up to 25% of their order value but not more than $68. Still, customers are able to return their orders and get refunded. First, the refund is processed on the merchant’s side according to their return policy. Then, Afterpay refunds back to the customer’s card that was used to make a payment.

Common issues with Afterpay on Shopify

  • Error messages: If your customers receive error messages when processing payments through Afterpay, it’s recommended that you contact the Afterpay support team to find out the problem in your speci