# afterpay-global/module-afterpay

> Magento 2 Afterpay Payment Module

`composer require afterpay-global/module-afterpay`

Canonical URL: https://packagento.com/afterpay-global/module-afterpay

## At a glance

- **Vendor**: afterpay-global (https://packagento.com/afterpay-global.md)
- **Latest version**: 4.3.6 — released 2026-06-11
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/afterpay-global/module-afterpay and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require afterpay-global/module-afterpay:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 Afterpay Payment Module

## README

### Installation

#### Install using Composer (Recommended)
<ol>
<li> From the CLI, run the following commands to install the Afterpay module. 
<br/>The right installation command is dependent on your Magento 2 version:

| Magento version | Command to run                                              |
|-----------------|-------------------------------------------------------------|
| 2.4.*           | composer require afterpay-global/module-afterpay:^5            |
| 2.3.*           | composer require afterpay-global/module-afterpay:^4         |
| < 2.3.0         | composer require afterpay-global/module-afterpay:^3 |
</li>
<li> Run Magento install/upgrade scripts: <code><em>php bin/magento setup:upgrade</em></code> </li>
<li> Compile dependency injection: <code><em>php bin/magento setup:di:compile</em></code> </li>
<li> Deploy static view files (production mode only): <code><em>php bin/magento setup:static-content:deploy</em></code> </li>
<li> Flush Magento cache: <code><em>php bin/magento cache:flush</em></code></li>
</ol>

#### Install manually
<ol>
	<li> Download the Afterpay module for Magento 2 - Available as a .zip or tar.gz file from the Afterpay GitHub directory. 
   <br/>The right installation module is dependent on your Magento 2 version:

| Magento version | Download                                          |
   |-----------------|--------------------------------------------------------|
   | 2.4.*           | [Afterpay](https://github.com/afterpay/afterpay-magento-2/archive/refs/heads/main.zip) |
   | 2.3.*           | [Afterpay:4.*](https://github.com/afterpay/afterpay-magento-2/archive/refs/heads/2.3-main.zip)  |
   | < 2.3.0         | [Afterpay:legacy](https://github.com/afterpay/afterpay-magento-2/archive/refs/heads/legacy-main.zip) |
   </li>
<li> Unzip the file</li>
<li> Create directory `Afterpay/Afterpay` in: <em>[MAGENTO]/app/code/ </em> </li>
<li> Copy the files to `Afterpay/Afterpay` folder </li>
<li> Run Magento install/upgrade scripts: <code><em>php bin/magento setup:upgrade</em></code> </li>
<li> Compile dependency injection: <code><em>php bin/magento setup:di:compile</em></code> </li>
<li> Deploy static view files (production mode only): <code><em>php bin/magento setup:static-content:deploy</em></code> </li>
<li> Flush Magento cache: <code><em>php bin/magento cache:flush</em></code></li>
</ol>

### Afterpay Merchant Setup 
Complete the below steps to configure the merchant’s Afterpay Merchant Credentials in Magento Admin.
<em><strong>Note:</strong> Prerequisite for this section is to obtain an Afterpay Merchant ID and Secret Key from Afterpay.</em> 

<ol>
   <li> Navigate to <em>Magento Admin/Stores/Configuration/Sales/Payment Methods/Afterpay</em> </li>
	<li> Enter the <em>Merchant ID</em> and <em>Merchant Key</em>. </li>
	<li> Enable Afterpay plugin using the <em>Enabled</em> checkbox. </li>
	<li> Configure the Afterpay API Mode (<em>Sandbox Mode</em> for testing on a staging instance and <em>Production Mode</em> for a live website and legitimate transactions). </li>
	<li> Save the configuration. </li>
	<li> Navigate to <em>Magento Admin/System/Tools/Cache Management</em> </li>
    <li> Click <em>Flush Magento Cache</em> button</li>
</ol>

### Upgrade

#### Composer Upgrade (Recommended)
<p> This section outlines the steps to upgrade the currently installed Afterpay plugin version using composer. </p>
<p> <strong>Notes:</strong> Prerequisite for this section is that the module should be installed using composer. Please see section <em>'Install using Composer'</em> for guidelines to install Afterpay module using composer.</p>
<p>[MAGENTO] refers to the root folder where Magento is installed. </p>

<ol>
	<li> Open Command Line Interface and navigate to the Magento directory on your server</li>
	<li> In CLI, run the below command to update Afterpay module:  
<br/>The right installation command is dependent on your Magento 2 version:

| Magento version | Command to run                                              |
|-----------------|-------------------------------------------------------------|
| 2.4.*           | composer require afterpay-global/module-afterpay:^5            |
| 2.3.*           | composer require afterpay-global/module-afterpay:^4         |
| < 2.3.0         | composer require afterpay-global/module-afterpay:^3 |
 </li>
<li> Make sure that Composer finished the update without errors </li>
<li> Run Magento install/upgrade scripts: <code><em>php bin/magento setup:upgrade</em></code> </li>
<li> Compile dependency injection: <code><em>php bin/magento setup:di:compile</em></code> </li>
<li> Deploy static view files (production mode only): <code><em>php bin/magento setup:static-content:deploy</em></code> </li>
<li> Flush Magento cache: <code><em>php bin/magento cache:flush</em></code></li>
</ol>

#### Manual Upgrade 
<p>This section outlines the steps to upgrade the currently installed Afterpay plugin version.<br/>
The process of upgrading the Afterpay plugin version involves the complete removal of Afterpay plugin files. <br/>
</p>
<em><strong>Note:</strong>  [MAGENTO] refers to the root folder where Magento is installed. </em>

<ol>
	<li> Remove Files in: <em>[MAGENTO]/app/code/Afterpay/Afterpay</em></li>
	<li> Download the Magento-Afterpay plugin - Available as a .zip or tar.gz file from the Afterpay GitHub directory. 
 <br/>The right Afterpay module upgradation is dependent on your Magento 2 version:

_(README truncated for .md surface. Full README on https://packagento.com/afterpay-global/module-afterpay.)_

## Recent Versions

| Version | Released |
|---|---|
| 4.3.6 | 2026-06-11 |
| 5.4.5 | 2026-06-10 |
| 5.4.4 | 2025-08-11 |
| 4.3.5 | 2025-08-11 |
| 5.4.3 | 2025-03-14 |
| 4.3.4 | 2025-03-14 |
| 5.4.2 | 2024-11-08 |
| 4.3.3 | 2024-11-08 |
| 5.4.1 | 2024-08-27 |
| 5.3.2 | 2024-08-07 |

Showing 10 of 51 versions. Full release history on https://packagento.com/afterpay-global/module-afterpay.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| afterpay-global/module-cash-app-pay | ^4 |
| magento/framework | ^102.0 |
| magento/module-checkout | 100.3.* |
| magento/module-payment | 100.3.* |
| magento/module-quote-graph-ql | 100.3.* |
| magento/module-sales | 102.0.* |
| magento/module-weee | 100.3.* |
| php | ~7.1.3\|\|~7.2.0\|\|~7.3.0\|\|~7.4.0 |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["afterpay-global/module-afterpay"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

afterpay-global is a Magento 2 vendor on Packagento. See https://packagento.com/afterpay-global.md for their full catalogue.

