zip / magento2
Zip Payment Module for Magento 2
Magento2 zippayment
Zip gives customers the ability to shop now and pay later with no interest while you as the merchant get paid immediately. Customers select Zip at checkout and get approved instantly and shop securely. Zip is fully integrated with the store’s online checkout and can integrate seamlessly with your store directly via API or by using one of our platform plugins.
Prerequisites
- PHP 8.1 or above
- Composer
- Configuration credentials
Installation instructions
The extension is a Composer package. It depends on Zip's PHP client library
(zipmoney/merchantapi-php), which Composer installs for you — the extension
does not carry a copy of it.
Install using Composer (recommended)
From your Magento root:
composer require zip/magento2php bin/magento module:enable Zip_ZipPaymentphp bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento setup:static-content:deploy
php bin/magento module:status will tell you whether the module is already
enabled.
To upgrade:
composer update zip/magento2php bin/magento setup:upgradephp bin/magento setup:di:compilephp bin/magento cache:cleanphp bin/magento setup:static-content:deploy
Install from the release archive
Each release attaches zip-zippayment-<version>.zip — the Composer package, with
composer.json at its root and no vendor/. The Zip PHP library is a declared
dependency, so Composer fetches it:
composer config repositories.zip artifact /path/to/archives
composer require zip/magento2
There is deliberately no archive for copying files into app/code. Such a store
needs the library inside vendor/ and the tree nested under Zip/ZipPayment/,
because Magento never reads a module's composer.json when the module is dropped
there. If that route is needed, it has to be a separate archive — ask rather than
improvise one from this repository, which carries no library at all.
Install using Magento Marketplace
Note:- This extension is not yet available in the Magento Marketplace. This
section will be updated once it is released there.
Configuration
Payment Section
- Contact Zip instegrations support through one of the following channels depending on your region to request your configuration credentials:
- UK: [email protected]
- NZ: [email protected]
- AU: [email protected]
- Open the Magento Admin
- Click the Stores icon in the left hand menu and from there choose Settings > Configuration
- The configuration page will open. From the little menu on the left hand side of this screen you must click Sales and then
choose Payment Methods when it expands. - On the Payment Methods page, click Other Payment Methods so it expands.

- Set Enable to Yes and a title for the payment method “Zip"
- Enter the Private Key and Public Key.
- Set payment action to Capture, or Authorise if you want to authorise on checkout completion and capture later
Note: Authorise is only available for AU region only
- Set log settings to Info or Debug if you want to log all the debug information as well.
- Set environment to either Sandbox (for your test or development site) or Production (for your live website)
- Set Sort Order to 0 to place the payment method on top.
Marketing Banners and Widgets Section

- Scroll down and expand Marketing Banners and Widgets section
- Expand everything and set all options to Yes/No as per your requirement.
- Click Save Config up the top
Questions and feedback
If you have any questions concerning this product or the implementation please contact [email protected] for assistance.
Changelog
All notable changes to the Zip Payment module for Magento 2 are documented in this file.
1.3.0
Changed
-
The Zip Merchant API library now comes from Composer instead of a copy in the
tree.MerchantApi/held a hard copy of the library, 47 files of it. A copy
cannot receive upstream fixes unless somebody ports them by hand, and this one had
drifted in both directions — ahead of the published package in two places, behind
it on the PHP 8 string casts, on retrying 5xx responses rather than only transport
failures, oncurrencyfor refunds and onis_partial_capturefor captures. The
module now requireszipmoney/merchantapi-phpand the version is a fact in
composer.jsonrather than a question about who last edited the tree.This changes how the module is installed.
vendor/is no longer committed, so
a checkout or an archive needscomposer installbefore the module will load. An
installation that copies files into place without running Composer will not find
the library. See the README for the two supported routes. -
Zip Merchant API library moved to 1.0.24. Beyond the fixes listed under 1.2.14,
this brings retry on 5xx with a back-off between attempts,currencyon refund
requests andis_partial_captureon captures. 1.0.24 itself only trims the
published archive — it no longer ships the library's own build tooling and tests —
so nothing in it changes behaviour.
Fixed
-
The Zip widget did not render, on product pages or at checkout. The
Content Security Policy whitelist allowedstatic.zip.co, which is where the
widget's entry point lives, but the widget is code-split and loads its chunks from
bpi.zip.co. A host entry matches that host and not its subdomains, so the first
lazy import was blocked and the widget died withChunkLoadError. The banner and
the "Learn More" link were both lost; payments were never affected.Three policies that were missing entirely are added at the same time, from
violations Magento was already reporting:connect-srcfor the widget's template
and telemetry, andstyle-srcandfont-srcfor its stylesheet and fonts. A store
running CSP in enforcing rather than report-only mode would otherwise have lost the
widget for a second, independent reason.Not covered: the widget also fetches merchant configuration from a CloudFront
distribution whose hostname is not stable, so it cannot be whitelisted by name, and
allowing all of*.cloudfront.netin a payment module is too broad a trade for one
configuration file. Under an enforcing policy that request is blocked and the widget
falls back to its defaults.
1.2.14
Fixed
-
ZES-91: fatal
TypeErroron PHP 8 when a non-string reached a length check.
The bundled Merchant API library validated field lengths with barestrlen()and
strtolower()calls. PHP 8 stopped coercing those arguments, so passing an integer
— an order or cart id, for instance — into one of the Model setters threw a
TypeErrorand could take checkout down. All 60 call sites inMerchantApi/now
cast the value first. The cast is a no-op for values that are already strings, so
nothing changes for callers that work today.Beyond the setters this also covers
listInvalidProperties()andvalid(), where
severalAddresschecks (line1,city,state,postal_code,country) carry
nois_nullguard and would otherwise reachstrlen(null)— deprecated since PHP
8.1 — andstrlen($apiKey)inMerchantApi/Lib/Api/*, where the key is null until
one is configured.Matches
zipmoney/merchantapi-php1.0.21, which carries the same fix for the
plugins that pull the library through Composer.
Changed
-
Brought two fixes back from
zipmoney/merchantapi-php1.0.22. The bundled
library is a hard copy, so improvements made upstream do not arrive on their
own. A failed call now reports what Zip actually said — the message or details
from the response body — instead of a bare[500] Error connecting to the API,
which told the merchant nothing about why a payment was refused. And a
transport-level cURL failure no longer handssubstr()a boolean; the
http_code === 0path turns it into a properApiExceptionas intended.Going the other way, the retry policy this module gained in ZES-49 — retrying
5xx and backing off between attempts — is now in the library too, so the
plugins that consume it through Composer are no longer behind this one.
1.2.13
Fixed
- MIA-63: duplicate orders. A session lock and a deterministic idempotency key
prevent the same checkout from creating more than one order.
Changed
- A Composer lockfile is committed so dependency scanning (Aikido) has something to
read. - A pipeline job stands a branch of this repository up on the Magento QA store
(ZES-86).
1.2.12
Fixed
- ZES-88: Order left in
pendingwhen a Zip charge fails. The error-handling
guard inModel/Charge::charge()used||where it should have used&&, so the
condition was always true and the method rethrew the exception before reaching the
order-cancellation logic. As a result, a failed charge (e.g. HTTP 402 "account is
locked") left apendingorder in Magento with no matching successful charge. The
order is now cancelled when the charge cannot be completed. Helper\Data::handleException()returned an imploded string while all five call
sites destructured it withlist($apiError, $message, $logMessage), which yielded
nullvalues. It now returns the array again, so the correct decline message
(e.g. "The payment was declined by Zip.") reaches the customer and the logs.
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 1.3.1 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-11-16 20:12:32 |
| 1.3.0 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-08-21 01:28:24 |
| 1.2.13 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-08-11 22:41:06 |
| 1.2.12 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-07-13 01:29:51 |
| 1.2.11 | stable | Fail | Not yet tested Details | 2025-11-18 02:46:14 |
| 1.2.10 | stable | Not tested | Not yet tested Details | 2025-08-21 23:42:19 |
| 1.2.9 | stable | Not tested | Not yet tested Details | 2025-04-03 06:01:42 |
| 1.2.8 | stable | Not tested | Not yet tested Details | 2025-01-21 18:01:56 |
| 1.2.7 | stable | Not tested | Not yet tested Details | 2024-12-09 21:42:57 |
| 1.2.5 | stable | Not tested | Not yet tested Details | 2024-03-26 17:26:27 |
| 1.2.3 | stable | Not tested | Not yet tested Details | 2023-05-25 00:47:49 |
| 1.2.2 | stable | Not tested | Not yet tested Details | 2022-08-29 06:53:41 |
| 1.2.1 | stable | Not tested | Not yet tested Details | 2022-06-21 01:36:42 |
| 1.2.0 | stable | Not tested | Not yet tested Details | 2022-06-16 07:01:47 |
| 1.1.12 | stable | Not tested | Not yet tested Details | 2022-06-01 23:26:20 |
| 1.1.11 | stable | Not tested | Not yet tested Details | 2022-03-11 05:20:00 |
| 1.1.10 | stable | Not tested | Not yet tested Details | 2022-02-28 06:30:59 |
| 1.1.9 | stable | Not tested | Not yet tested Details | 2022-01-24 02:13:18 |
| 1.1.8 | stable | Not tested | Not yet tested Details | 2021-11-23 03:01:32 |
| 1.1.7 | stable | Not tested | Not yet tested Details | 2021-08-15 23:45:26 |
| 1.1.6 | stable | Not tested | Not yet tested Details | 2021-07-13 01:56:25 |
| 1.1.5 | stable | Not tested | Not yet tested Details | 2021-02-16 23:55:22 |
| 1.1.4 | stable | Not tested | Not yet tested Details | 2021-01-15 02:48:13 |
| 1.1.3 | stable | Not tested | Not yet tested Details | 2020-12-23 03:41:17 |
| 1.1.2 | stable | Not tested | Not yet tested Details | 2020-11-10 03:13:23 |
| 1.1.0 | stable | Not tested | Not yet tested Details | 2020-10-07 22:08:51 |
Requires 3
| Package | Constraint |
|---|---|
| ext-curl | * |
| php | >=8.2 |
| zipmoney/merchantapi-php | ^1.0.24 |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. 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 | 195 | 195 warnings (ruleset: Magento2), 70 auto-fixable with phpcbf |
| PHPMD | Warning | 150 | 150 rule violations (MissingImport:54, UndefinedVariable:19, UnusedLocalVariable:18, IfStatementAssignment:17, UnusedFormalParameter:16) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 6 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
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
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
Turn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.