zip / magento2

zip/magento2

Zip Payment Module for Magento 2

  • Zip Co
magento2-module Compatibility: 2.4.7-2.4.9 Code Quality: Fail Tests: N/A Security: Pass OSL-3.0

Are you the maintainer of zip?

Packagento pulls zip's Composer packages from the public registry so buyers can find them here.

Claim the namespace to take ownership, publish new releases directly, and start charging for premium versions.

Claim this namespace →

Viewing version 1.3.0. Latest version is 1.3.1. Switch to latest

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/magento2
  • php bin/magento module:enable Zip_ZipPayment
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php 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/magento2
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento cache:clean
  • php 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

  1. Contact Zip instegrations support through one of the following channels depending on your region to request your configuration credentials:
  2. Open the Magento Admin
  3. Click the Stores icon in the left hand menu and from there choose Settings > Configuration
  4. 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.
  5. On the Payment Methods page, click Other Payment Methods so it expands.

Alt text

  1. Set Enable to Yes and a title for the payment method “Zip"
  2. Enter the Private Key and Public Key.
  3. 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

  1. Set log settings to Info or Debug if you want to log all the debug information as well.
  2. Set environment to either Sandbox (for your test or development site) or Production (for your live website)
  3. Set Sort Order to 0 to place the payment method on top.

Marketing Banners and Widgets Section

Alt text

  1. Scroll down and expand Marketing Banners and Widgets section
  2. Expand everything and set all options to Yes/No as per your requirement.
  3. 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, on currency for refunds and on is_partial_capture for captures. The
    module now requires zipmoney/merchantapi-php and the version is a fact in
    composer.json rather 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 needs composer install before 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, currency on refund
    requests and is_partial_capture on 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 allowed static.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 with ChunkLoadError. 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-src for the widget's template
    and telemetry, and style-src and font-src for 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.net in 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 TypeError on PHP 8 when a non-string reached a length check.
    The bundled Merchant API library validated field lengths with bare strlen() 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
    TypeError and could take checkout down. All 60 call sites in MerchantApi/ 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() and valid(), where
    several Address checks (line1, city, state, postal_code, country) carry
    no is_null guard and would otherwise reach strlen(null) — deprecated since PHP
    8.1 — and strlen($apiKey) in MerchantApi/Lib/Api/*, where the key is null until
    one is configured.

    Matches zipmoney/merchantapi-php 1.0.21, which carries the same fix for the
    plugins that pull the library through Composer.

Changed

  • Brought two fixes back from zipmoney/merchantapi-php 1.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 hands substr() a boolean; the
    http_code === 0 path turns it into a proper ApiException as 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 pending when a Zip charge fails. The error-handling
    guard in Model/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 a pending order 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 with list($apiError, $message, $logMessage), which yielded
    null values. 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.
Versions
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.

Compatibility matrix (Magento × PHP)
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 Pass Pass

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.

Static analysis results
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.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 224 5
2.4.8 5 5
2.4.9 5 5

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

Unit tests results by Magento and PHP version
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

Integration tests results by Magento and PHP version
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.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
OSL-3.0
Authors
Make it pay

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.