# amzn/amazon-pay-magento-2-module

> Official Magento2 Plugin to integrate with Amazon Pay

`composer require amzn/amazon-pay-magento-2-module`

Canonical URL: https://packagento.com/amzn/amazon-pay-magento-2-module

## At a glance

- **Vendor**: amzn (https://packagento.com/amzn.md)
- **Latest version**: 5.18.4 — released 2026-05-07
- **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/amzn/amazon-pay-magento-2-module 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 amzn/amazon-pay-magento-2-module:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Official Magento2 Plugin to integrate with Amazon Pay

## README

This extension provides an official integration of your Magento 2 store with **Amazon Pay** services. The extension is a checkout and payment solution that does not share any item level information (product information, prices, basket content, etc) with Amazon. The extension integrates Amazon Pay seamlessly into the Magento 2 shop backend (configuration, order management, billing, etc.).

### About Amazon Pay
Amazon Pay offers a familiar and convenient buying experience that can help your customers spend more time shopping and less time checking out. Amazon Pay is used by large and small companies. From years of shopping safely with Amazon, customers trust their personal information will remain secure and know many transactions are covered by the Amazon A-to-z Guarantee. Businesses have the reassurance of our advanced fraud protection and payment protection policy.

### What's new in Amazon Pay for Magento 2?
Starting from version 5.0.0, Amazon Pay is hosted on the Magento Marketplace and features our next generation web checkout technology. This places the Amazon shipping and payment widgets outside the Magento checkout template system, improving usability and transaction error handling. Here are some of the improvements over the previous module:

* An Amazon-Hosted checkout experience (replacing inline widgets solution)
* Fewer checkout steps (merging consent and address/payment selection screen)
* Avoids problems on browsers that have active cookie blocking or tracking protection mechanisms
* Supports digital goods as well as physical goods
* Automatic, graceful handling of declined authorization, increasing checkout conversion rate
* Built-in Alexa Delivery Notifications feature support
* Ability to hide Amazon Pay as a checkout option for specific product categories

### Full feature list
* _Amazon Pay_ button in the shopping cart, mini-cart, on product pages and in the 1st step of checkout
* _Amazon Sign-in_ optional button on customer login and registration page
* _Amazon Pay_ in the list of available payment methods during the final step of checkout
* Configuration of _Amazon Pay_ extension from within Magento Admin
* Support for payment authorizations, captures and refunds (also partial refunds)
* Support for synchronous and asynchronous authorization mode
* Supports _Amazon Pay_ Instant Payment Notifications
* Live & Sandbox modes available
* Options for simulating payment states in Sandbox mode
* Custom Front-Ends / Headless Commerce support
* Physical and Digital Goods support
* Ability to hide Amazon Pay as a checkout option for specific product categories
* Built-in Alexa Delivery Notifications feature support
* [EU/UK only] Multi-currency support
* [EU/UK only] Support for Strong Customer Authorization (PSD2 compliant)
* [EU/UK only] Billing Address available at checkout
* [US/JP only] Split Shipments (Multi-authorization) support

### Prerequisites
* Magento CE/EE/ECE 2.3.0 or higher (limited support for Magento 2.2.6 up to 2.2.11)
* valid SSL certificate
* A verified Amazon Pay merchant account - [sign up here](https://pay.amazon.com/signup)!

### Installation and Configuration
The extension is available via composer as *amzn/amazon-pay-magento-2-module* or in [Magento Marketplace](https://marketplace.magento.com/amzn-amazon-pay-magento-2-module.html). The User Guide can be found [here](https://amzn.github.io/amazon-payments-magento-2-plugin/). Any previous module versions should be removed. Please refer to the [Installation](https://amzn.github.io/amazon-payments-magento-2-plugin/installation.html) section of our guide to get more details concerning installation procedure.

### Branch information
The following table provides an overview on which Git branch is compatible to which Magento 2 version. The last column “Latest release” refers to the latest version of our extension that is compatible to the Magento 2 version in the first column. If you are on a Magento version below 2.2.6, please take a look at [Amazon Pay and Amazon Sign-in for Magento 2 (Legacy) documentation](https://amzn.github.io/amazon-payments-magento-2-plugin/legacy/installation.html#manual-composer-install-method).

Magento Version | Github Branch | Latest release
---|---|---
2.2.6 - 2.2.11 (EOL) | [V2checkout-1.2.x](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/V2checkout-1.2.x)  | 1.20.0 (EOL)
2.3.0 - 2.4.x | [master](https://github.com/amzn/amazon-payments-magento-2-plugin/tree/master) | 5.18.4

### Release Notes
See [CHANGELOG.md](/CHANGELOG.md)

## Changelog

### 5.18.4
* Fixed null values passed to preg_replace causing deprecation warnings on PHP 8.1+
* Fixed checkout cancel URL to return the full URL when a domain is configured
* Fixed PHP error when buyer element is missing from Amazon response
* Fixed reset password email template failing to render the reset link
* Fixed password generation to include 4 character classes required by Magento password strength validation

### 5.18.3
* Added compatibility with Magento 2.4.8/PHP 8.4
* Fixed cron job error caused by function visibility
* Fixed security logic around APB flow
* Added black as a text color option for promo widget

### 5.18.2
* Added security enhancements around Express Checkout
* Changed when Magento order ID is sent to Amazon to improve traceability
* Changed how promo banner is rendered for configurable/bundle products
* Clarified usage of "Reset configuration" button in admin for new merchants
* Fixed bug in email plugin if no payment is set
* Restored PHP 7 compatibility

### 5.18.1
* Add new logos/acceptance marks at checkout
* Improved clarity of order comments on cancelled orders
* Fixed issue where order confirmation emails could be sent before payment processed successfully
* Fixed issue with some inventory reservations not being adjusted after a cancelled order
* Fixed issue where credit memos occasionally fail to process due to a missing parent transaction ID
* Fixed APB issue where billing address information may fail to be set on virtual quotes
* Fixed APB issue with family name/first name being passed incorrectly in JP region
* Fixed dynamic property declaration in subscription classes (thanks, @navarr!)
* Fixed failures and corrected logging in CleanUpIncompleteSessions cron job (thanks, @mohit-sharma-rp!)
* Fixed various code smells

### 5.18.0
* Added product page promo banner functionality and configuration

### 5.17.1
* Changed php allowed versions to include 8.3
* Fixed issue where orders could be processing but not capture payment
* Fixed issue with amazon-product-add.js 404 not found (thanks @tim-breitenstein-it!)
* Fixed issue where a variable could be undefined (thanks @dimitriBouteiile!)
* Fixed issue where incorrect message "can't create invoice" could be displayed

### 5.17.0
* Changed sequence of placing Magento order/processing Amazon payment to reduce likelihood of
transactions with no associated order IDs in Seller Central
* Fixed KeyUpgrade patch error when the database tables are prefixed
* Fixed overwriting of existent CV2 configs on KeyUpgrade
* Improved behavior of PDP button (ensure product is added to cart before initiating Amazon checkout)
* Fixed unresponsive PDP button on Safari mobile
* Fixed non-centered PDP button on mobile view
* Fixed incorrect type casting when decrypting Auto Key Exchange payloads
* Fixed updateCheckoutSession call in headless environments when the session helper returns
a new/empty quote (thanks, @bheindl!)
* Changed response format of checkout session details GraphQL query to adhere to best practices
(thanks, @dimitriBouteille!)
* Added Amazon Pay payment region to storeConfig GraphQL query (thanks again, @dimitriBouteiile!)

### 5.16.1
* Remove platform/module version information from button payloads
* Fixed admin display bug regarding upgrading legacy keys when a CV2 public key ID already exists
* Fixed invoice comment noise with Automatic Authorization Mode

### 5.16.0
* Added support for subscriptions, requires the ParadoxLabs Adaptive Subscription module
* Added platformid for APB payload
* Fixed phpcs warnings for php 8
* Fixed issue with installing the module when there is no existing CV1 config
* Fixed issue when an Allowed Country was somehow saved with an empty string

### 5.15.0
* Added Key Upgrade feature (automatically upgrade CV1 keys to CV2 if updating from legacy module)
* Fixed backward compatibility with Zend availability
* Fixed render issue with multiple Amazon Sign In buttons on the same page

_(Changelog truncated for .md surface. Full history on https://packagento.com/amzn/amazon-pay-magento-2-module.)_

## Recent Versions

| Version | Released |
|---|---|
| 5.18.4 | 2026-05-07 |
| 5.18.3 | 2025-08-20 |
| 5.18.2 | 2025-05-12 |
| 5.18.1 | 2025-03-26 |
| 5.18.0 | 2024-09-30 |
| 5.17.1 | 2024-06-18 |
| 5.17.0 | 2024-04-16 |
| 5.16.1 | 2023-10-10 |
| 5.16.0 | 2023-07-18 |
| 5.15.0 | 2023-04-27 |

Showing 10 of 117 versions. Full release history on https://packagento.com/amzn/amazon-pay-magento-2-module.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| amzn/amazon-pay-api-sdk-php | ^2.2 |
| aws/aws-php-sns-message-validator | ^1.5 |
| magento/framework | ^102.0\|\|^103.0 |
| magento/module-backend | ^101.0\|\|^102.0 |
| magento/module-catalog | ^103.0\|\|^104.0 |
| magento/module-checkout | ^100.0 |
| magento/module-config | ^101.0 |
| magento/module-configurable-product | ^100.0 |
| magento/module-customer | ^102.0\|\|^103.0 |
| magento/module-developer | ^100.0 |
| magento/module-directory | ^100.0 |
| magento/module-eav | ^102.0 |
| magento/module-media-storage | ^100.0 |
| magento/module-payment | ^100.0 |
| magento/module-paypal | ^100.0\|\|^101.0 |
| magento/module-quote | ^101.0 |
| magento/module-sales | ^100.0\|\|^101.0\|\|^102.0\|\|^103.0 |
| magento/module-store | ^101.0 |
| magento/module-vault | ^100.1\|\|^101.2 |
| php | ~7.1.0\|\|~7.2.0\|\|~7.3.0\|\|~7.4.0\|\|~8.0.0\|\|~8.1.0\|\|~8.2.0\|\|~8.3.0\|\|~8.4.0 |
| phpseclib/phpseclib | ~2.0\|\|~3.0 |

### Require (dev)

| Package | Constraint |
|---|---|
| guzzlehttp/guzzle | ^6.2.0 |

### Replace

| Package | Constraint |
|---|---|
| amzn/amazon-pay-and-login-magento-2-module | * |
| amzn/amazon-pay-and-login-with-amazon-core-module | * |
| amzn/amazon-pay-module | * |
| amzn/amazon-pay-v2-magento-2-module | * |
| amzn/amazon-payments-magento-2-plugin | * |
| amzn/login-with-amazon-module | * |

## Quality

Latest release (5.18.4) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | 1 | not tested |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 2 | 2 warnings (ruleset: Magento2) |
| PHPMD | Warning | 113 | 113 rule violations (UnusedFormalParameter:42, IfStatementAssignment:19, MissingImport:14, UndefinedVariable:11, ExcessiveClassComplexity:4) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 379 | 379 | – | – |
| 2.4.8 | – | 382 | 382 | – |
| 2.4.9 | – | – | 380 | N/A |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | N/A | 0 | no resolvable dependency tree to audit — Your requirements could not be resolved to an installable set of packages. Problem 1 |
| Malware scan | Pass | 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=["amzn/amazon-pay-magento-2-module"],
  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

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

