# Release Notes

Every change to the PayLater API and our commerce plugins, newest first. The API and each plugin follow [Semantic Versioning](https://semver.org) on their own independent version timeline.

## API

### API v2.0 (2026-06-04)

Major release — OAuth 2.0 auth, all endpoints under /v2/, and snake_case payloads. Breaking changes from v1.

- **Changed**: Authentication moved from a static `X-Api-Key` header to **OAuth 2.0 Bearer** tokens (`Authorization: Bearer <token>`). Obtain a token from `POST /auth/realms/api/protocol/openid-connect/token` with `grant_type=client_credentials`; access tokens expire (~3600s) and renew via the `refresh_token` grant (falling back to `client_credentials`).
- **Changed**: Credentials are now a **Client ID + Client Secret** pair (previously a single permanent API key).
- **Changed**: All endpoints moved under `/v2/` — e.g. `/web-checkout` → `/v2/web-checkout`, `/web-checkout/status` → `/v2/web-checkout/status`.
- **Changed**: Request payloads are now `snake_case`: `outletId` → `outlet_id` (now an integer), `orderId` → `order_id`, `successRedirectUrl` → `success_redirect_url`, `failRedirectUrl` → `fail_redirect_url`.
- **Removed**: `merchantId` is no longer sent in request bodies or query params — it is derived from the OAuth token at the gateway.
- **Changed**: Status check query param `orderId` → `order_id` (`merchantId` no longer needed).
- **Changed**: Full refund is now `POST /v2/web-checkout/refund` with `{"order_id":…}` in the body (was `GET …/refund` with query params). `transactionType=DOWN_PAYMENT` is no longer required and `transactionReference` → `order_id`.
- **Changed**: Partial refund now uses the **same** `/v2/web-checkout/refund` endpoint as full refund — include an `amount` in the body to make it partial. The separate `/refund/partial` endpoint is gone.
- **Added**: New `expiry_duration` field (minutes) controls the payment-link lifetime.
- **Changed**: Webhooks are unchanged — same endpoint, payload shape, and HMAC-SHA256 signature. Note: the webhook payload still uses `merchantId` (camelCase), unlike v2 request bodies which are snake_case.

## Magento

### Magento 4.1.5 (2026-11-18)

Shoppers who come back from PayLater with the browser’s back button now land on the cart page.

**Download:** [PayLater_PayLaterpay-4.1.5.zip](https://docs.paylaterapp.com/downloads/PayLater_PayLaterpay-4.1.5.zip)

- **Fixed**: After the browser’s back button restores the cart, the shopper is taken to the cart page with the notice “Your PayLater payment was not completed. Your cart has been restored.”, as with PayLater’s cancel button. In 4.1.4 the checkout page was shown in the same step, and some customised checkout themes did not draw it until the shopper reloaded the page. The shopper can then continue to checkout and pay with PayLater or another method.

### Magento 4.1.4 (2026-11-16)

Shoppers keep their cart when they leave the PayLater payment page with the browser’s back button.

**Download:** [PayLater_PayLaterpay-4.1.4.zip](https://docs.paylaterapp.com/downloads/PayLater_PayLaterpay-4.1.4.zip)

- **Fixed**: Shoppers who leave the PayLater payment page with the browser’s back button now get their cart back, as they already did with PayLater’s cancel button. Before the cart or checkout page loads, the module checks the order with PayLater: if it was paid, the shopper sees the order confirmation instead; otherwise the cart is restored with a notice that the payment was not completed.
- **Fixed**: When a restored cart is sent to PayLater again, the earlier order from that cart is checked first. If it was paid, no second order is created and the shopper sees its confirmation. Otherwise it is cancelled, which releases its stock and keeps one open PayLater payment per cart. A payment that still arrives for the cancelled order is refunded automatically, as in 4.1.1.
- **Fixed**: When PayLater confirms a payment for an order whose cart had been restored, that cart is closed, so the shopper does not see the paid items in their cart again.
- **Fixed**: The mini cart in the store header now empties when the shopper is sent to PayLater, as it does with Magento’s own payment methods. Before, it kept showing the ordered items until it expired.

### Magento 4.1.3 (2026-11-10)

Packaging update for Adobe Commerce Marketplace. Behaviour is unchanged. Included in 4.1.4.

- **Changed**: The package now includes `composer.json`, so the module can be installed with Composer.
- **Changed**: The module no longer calls PHP’s `md5()` function, which Adobe’s coding standard does not allow. The cached access token is now keyed with SHA-256, so each store requests one new token after upgrading. The webhook check gives exactly the same result as before.
- **Changed**: The product and category widgets escape the headings, subheadings and terms text set in the admin, so the text is always shown as plain text. The default texts look the same as before.

### Magento 4.1.2 (2026-11-02)

Maintenance update for newer PHP versions.

**Download:** [PayLater_PayLaterpay-4.1.2.zip](https://docs.paylaterapp.com/downloads/PayLater_PayLaterpay-4.1.2.zip)

- **Fixed**: No deprecation notices on PHP 8.4 and 8.5. The availability check now declares its optional cart parameter as nullable, and the module no longer calls `curl_close()`, which does nothing since PHP 8.0 and is deprecated in PHP 8.5. Behaviour is unchanged.

### Magento 4.1.1 (2026-10-29)

Security and reliability update. All merchants should upgrade.

**Download:** [PayLater_PayLaterpay-4.1.1.zip](https://docs.paylaterapp.com/downloads/PayLater_PayLaterpay-4.1.1.zip)

- **Fixed**: If PayLater confirms a payment for an order that Magento has already cancelled, the module now requests a full refund automatically and records the outcome in the order history. The shopper is told the payment is being refunded instead of seeing a success message.
- **Fixed**: The product page and product list widget no longer changes the rest of the storefront (page spacing, background, headings). Its styles now apply to the widget only.
- **Fixed**: Orders where the shopper never continued to PayLater are cancelled automatically once the payment link expires, releasing reserved stock.
- **Fixed**: The background order check no longer misses PayLater orders on stores with many pending orders from other payment methods.
- **Fixed**: A shopper who lands on the failure page for an order that was actually paid now sees the order confirmation instead of a restored cart.
- **Fixed**: If a payment is confirmed after the order was cancelled, the automatic refund is retried for up to 24 hours (PayLater accepts refunds from 10 minutes after payment). Only then is the merchant asked to refund manually.
- **Fixed**: The product and category widgets show the amount due today rounded to the fils, and the four instalments shown add up exactly to the price (for example QAR 333.33 shows 83.33, 83.33, 83.33 and 83.34). The category list used to show unrounded amounts such as "Pay QAR 83.3325 today".
- **Fixed**: PayLater is no longer offered, on product pages or at checkout, for totals above QAR 25,000, which PayLater does not accept. Shoppers used to pick it and then see an error.
- **Fixed**: A failure or cancellation notice from PayLater no longer cancels the order straight away. The module first checks the payment's status with PayLater: it cancels only if PayLater confirms the failure, keeps the order if PayLater reports it paid, and otherwise leaves it for the regular status check. This protects orders from late or repeated notices.
- **Fixed**: If PayLater already holds the order number (for example a second store on the same PayLater account, or a store whose order numbers restarted), checkout no longer fails with "Order ID already exists". The module retries once with a short suffix, such as 000000123-a7f2, and that reference is what appears in the PayLater merchant portal for that order. Other orders keep their Magento order number.
- **Fixed**: Error messages from PayLater are shown as a plain sentence, such as "The maximum order value for PayLater at this merchant is QAR 25000.00" or the reason a refund was refused. Shoppers used to see raw technical text, and admins often saw only "Internal Server Error" or "Refund Error".
- **Fixed**: When a shopper cancels a payment, their cart comes back only if the cancelled order is the one they just placed. Before, the cart of their previous order, even an already paid one, could be reopened, risking a second payment.
- **Security**: Hardened payment status handling.
- **Security**: Hardened order creation at checkout.
- **Security**: The payment return and cancel pages show an order's confirmation only to the shopper whose session placed it. Before, anyone could open another shopper's order confirmation by changing the order number in the address.
- **Security**: The cancel page no longer displays text taken from the page address, which could be used to show misleading messages on the store.

### Magento 4.1 (2026-07-23)

Safer payment confirmation and an option to skip the pre-checkout stock check.

**Download:** [PayLater_PayLaterpay-4.1.0.zip](https://docs.paylaterapp.com/downloads/PayLater_PayLaterpay-4.1.0.zip)

- **Added**: Admin setting **Pre-Checkout Inventory Check**. Set it to No to skip the stock check before the shopper is sent to PayLater; Magento still checks stock when the order is placed.
- **Fixed**: A paid order is moved to Processing before its invoice is created.
- **Fixed**: A shopper who returns while PayLater is still confirming the payment sees the order confirmation, and the order waits for the background check. Only a payment PayLater reports as failed fails the order.
- **Changed**: If PayLater confirms a payment for an order that Magento has already cancelled, the order is left unchanged and the case is logged for the merchant to reconcile.
- **Changed**: Remaining Spotii names were removed from the module.

### Magento 4.0 (2026-06-04)

OAuth2 Bearer auth on the v2 web-checkout endpoints.

**Download:** [PayLaterpay-v4.0.zip](https://docs.paylaterapp.com/downloads/PayLaterpay-v4.0.zip)

- **Changed**: Authentication switched from `x-api-key` to **OAuth2 Bearer**.
- **Changed**: Endpoints moved to `/v2/web-checkout`.
- **Changed**: Payload field names are now `snake_case` (`outletId → outlet_id`, `orderId → order_id`, `successRedirectUrl → success_redirect_url`, `failRedirectUrl → fail_redirect_url`).
- **Changed**: `expiry_duration` is now required on create-payment-link.
- **Changed**: Full and partial refunds collapse onto one endpoint.
- **Changed**: Admin settings rearranged — the Test/Live API Key fields are removed.
- **Added**: New admin fields: Client ID and Client Secret. **Payment Mode** (UAT or Live) selects the environment.

### Magento 3.0 (2026-05-17)

Online refunds, webhook receiver, and admin validation.

- **Added**: Online refunds from the orders admin screen — calls PayLater’s gateway directly, no manual reversal needed.
- **Added**: Full refund routing: `GET /web-checkout/refund` with `transactionType=DOWN_PAYMENT`.
- **Added**: Partial refund routing: `POST /web-checkout/refund/partial` with `{"amount":…}`.
- **Added**: Webhook receiver for server-to-server settlement.
- **Security**: Webhook Secret admin field (encrypted) for signature verification.
- **Changed**: Minimum Order Amount must be ≥ 300 at save time, with field validation for immediate feedback.
- **Changed**: API Key validation preserves placeholder behaviour.

### Magento 2.0 (2026-04-30)

Refactor to the standard Magento redirect-gateway pattern + reconciliation cron.

- **Changed**: Order lifecycle refactored to match the standard Magento redirect-gateway pattern (Authorization & Capture).
- **Added**: New `paylater_reconcile_pending_orders` cron runs every 10 minutes — queries `web-checkout/status` for pending orders older than 3 minutes.

### Magento 1.3 (2026-01-28)

Branding refresh, visibility widgets, and admin workflow.

- **Changed**: Updated branding; seamless redirect and order-success sync; Authorization & Capture.
- **Added**: New visibility widgets and widget-management toggles in Stores → Configuration.
- **Added**: Streamlined setup wizard and enhanced debug logging for API requests.

### Magento 1.2 (2025-03-28)

Magento 2.4.7+ support and checkout polish.

- **Added**: Magento 2.4.7+ support — verified with PHP 8.1, 8.2, and 8.3.
- **Added**: Payment-method logo and checkout display.
- **Added**: Environment toggle, API management, setup wizard, and debug logging.

## WooCommerce

### WooCommerce 4.4.1 (2026-11-01)

Fix for stores using the block-based checkout, plus hardening.

**Download:** [paylater_v4.4.1.zip](https://docs.paylaterapp.com/downloads/paylater_v4.4.1.zip)

- **Fixed**: PayLater now appears in the block-based checkout, and the product widgets show, as soon as the API Configuration tab is saved. Before, they stayed off until the General and Widget Settings tabs had also been saved.
- **Security**: Settings tab links, labels and the product widget footer are escaped before output, and error messages from the PayLater API are escaped before they are added to order notes.
- **Changed**: Errors are logged to the WooCommerce log (WooCommerce → Status → Logs, source "paylater") instead of the PHP error log.

### WooCommerce 4.4 (2026-10-29)

Security and reliability update. All merchants should upgrade.

**Download:** [paylater_v4.4.zip](https://docs.paylaterapp.com/downloads/paylater_v4.4.zip)

- **Fixed**: Every payment link issued for an order is kept, so a payment on an earlier link (after a double click, the back button or a retry) is no longer lost. Refunds go to the link that was actually paid.
- **Fixed**: Two payment links created for one order in the same second no longer collide.
- **Fixed**: Webhooks for an unknown reference now return `404` so PayLater retries them, instead of being acknowledged and dropped.
- **Fixed**: The return page checks the payment status with PayLater before failing an order, and a new payment link is refused for an order already paid.
- **Fixed**: Payment link expiry is capped at 1,440 minutes, and WooCommerce no longer cancels an unpaid order while its PayLater link can still be paid.
- **Fixed**: Status checks, refunds and webhooks for an order use the environment (test or live) it was paid in, so switching Test Mode no longer strands earlier orders.
- **Fixed**: The block checkout no longer depends on jQuery, and unused scripts from the old iframe checkout were removed.
- **Fixed**: Failure webhooks, including the `fail` status PayLater sends today, are checked with the status API: a link PayLater reports as paid is marked paid, only a confirmed failure fails the order, and otherwise the order stays payable so the shopper can retry.
- **Fixed**: Refund order notes show the amount and currency in plain text and name the payment reference refunded.
- **Fixed**: The widget uses the price as the shop displays it, and the instalments shown add up exactly to the price (for example QAR 333.33 shows 83.33, 83.33, 83.33 and 83.34).
- **Fixed**: A notice from PayLater dated in the future no longer blocks later notices for the same payment.
- **Security**: An order is only marked paid when the amount the shopper paid matches the current order total. A mismatch puts the order on hold with a note for review.
- **Security**: Webhooks can no longer move an order backwards: replayed, duplicate or out-of-order notifications are ignored, and a failure on an older link never fails an order being paid with a newer one.
- **Security**: Shoppers see a plain message when PayLater cannot create a payment link. The gateway response is recorded in the order notes and the WooCommerce log (source `paylater`) instead.
- **Security**: Hardened storefront script handling.
- **Changed**: PayLater is only offered, in both the classic and block checkout, for QAR orders between the configured minimum (at least 300 QAR) and 25,000 QAR. The product widgets follow the same limits.

### WooCommerce 4.3 (2026-08-17)

The widget no longer changes the look of the rest of the store.

**Download:** [paylater_v4.3.zip](https://docs.paylaterapp.com/downloads/paylater_v4.3.zip)

- **Fixed**: The product page and product list widget styles now apply to the widget only. Before, they changed page spacing, fonts and headings across the store.
- **Changed**: PayLater's stylesheet and script load only on WooCommerce pages (shop, product, cart, checkout and account), not on every page. Developers can change this with the `paylater_enqueue_frontend_assets` filter.

### WooCommerce 4.2 (2026-08-09)

Plugin name and version clean-up.

**Download:** [paylater_v4.2.zip](https://docs.paylaterapp.com/downloads/paylater_v4.2.zip)

- **Changed**: The plugin is listed as **PayLater** (was PayLater Pro) under WordPress → Plugins, and shows its real version number.
- **Fixed**: After updating, browsers load the new checkout styles instead of keeping the old ones.

### WooCommerce 4.1 (2026-07-12)

Repackaged so the plugin installs through Upload Plugin.

**Download:** [paylater_v4.1.zip](https://docs.paylaterapp.com/downloads/paylater_v4.1.zip)

- **Fixed**: The download installs through **Plugins → Add New → Upload Plugin**: the zip now holds a single `paylater/` folder. Before, the plugin sat one folder too deep and WordPress could not install it. No code changes from 4.0.

### WooCommerce 4.0 (2026-06-04)

OAuth2 Bearer auth on the v2 web-checkout endpoints.

- **Changed**: Authentication switched from `x-api-key` to **OAuth2 Bearer**.
- **Changed**: Endpoints moved to `/v2/web-checkout`.
- **Changed**: Payload field names are now `snake_case` (`outletId → outlet_id`, `orderId → order_id`, …).
- **Changed**: `expiry_duration` is now required on create-payment-link.
- **Changed**: Full and partial refunds collapse onto one endpoint.
- **Changed**: Admin Test/Live API Key fields removed.
- **Added**: New admin fields: Test Client ID, Test Client Secret, Live Client ID, Live Client Secret.

### WooCommerce 3.0 (2026-05-17)

Online refunds, webhook receiver, and admin validation.

- **Added**: Online refunds from the orders admin screen.
- **Added**: Full refund routing: `GET /web-checkout/refund` with `transactionType=DOWN_PAYMENT`.
- **Added**: Partial refund routing: `POST /web-checkout/refund/partial`.
- **Added**: Webhook receiver for server-to-server settlement.
- **Security**: Webhook Secret admin field (encrypted) for signature verification.
- **Changed**: Minimum Order Amount must be ≥ 300 at save time, with field validation.
- **Changed**: API Key validation preserves placeholder behaviour.

### WooCommerce 2.1 (2026-04-30)

Callback hardening and safer redirects.

- **Security**: Callback `orderId` is now bound to the order’s stored reference; orders not initiated through PayLater are rejected.
- **Changed**: All redirects switched to `wp_safe_redirect()`.
- **Changed**: Error-field parsing aligned with the gateway contract.

### WooCommerce 2.0 (2026-01-28)

Dynamic instalments, WooCommerce Blocks + HPOS, and branding.

- **Added**: Dynamic monthly instalments, collapsible PDP widget, and PLP summary bar.
- **Added**: WooCommerce Blocks integration; HPOS certified; unified asset management; hardened admin interface.
- **Added**: Full-width branding, branded loader overlay, and mobile-optimised UI.

### WooCommerce 1.0 (2025-06-28)

First WooCommerce release.

- **Added**: Direct API handshake, order-total logic, and classic checkout support.
- **Added**: Centralized admin dashboard, dual-environment support, and automated refund engine.
- **Security**: Secure API handling, security callback handler, and smart redirects.

## Odoo

### Odoo 4.0.2 (2026-11-10)

Small display fixes in the shop and product page widgets. No change to how payments work.

**Download:** [payment_paylater_qa-v4.0.2.zip](https://docs.paylaterapp.com/downloads/payment_paylater_qa-v4.0.2.zip)

- **Fixed**: Instalment amounts of QAR 1,000 or more now show a thousands separator (QR 1,300.00, was QR 1300.00), matching how Odoo shows prices.
- **Changed**: The default widget terms text now says "instalments". If you never changed that text, it is updated for you; text you edited under **Settings → PayLater** is kept.

### Odoo 4.0.1 (2026-11-10)

Odoo Apps Store listing update. No change to how payments work.

**Download:** [payment_paylater_qa-v4.0.1.zip](https://docs.paylaterapp.com/downloads/payment_paylater_qa-v4.0.1.zip)

- **Changed**: The app description, shown on the Odoo Apps Store and on the module page in Odoo, now carries the full setup guide: compatibility, install, upgrade and switch-over steps, configuration fields, widget settings and testing, with screenshots.

### Odoo 4.0 (2026-11-04)

New module name, payment_paylater_qa, so the plugin can be listed on the Odoo Apps Store. Payments work the same as 3.1.

**Download:** [payment_paylater_qa-v4.0.0.zip](https://docs.paylaterapp.com/downloads/payment_paylater_qa-v4.0.0.zip)

- **Changed**: The module is now called `payment_paylater_qa` (it was `payment_paylater`, a name already taken on the Odoo Apps Store by an unrelated module). Odoo treats it as a new module, so you switch over once: note your Client ID, Client Secret, Outlet ID and Webhook Secret, uninstall the old PayLater module, install this one, enter them again and enable the provider. See [Switching from version 3.x to 4.0](https://docs.paylaterapp.com/odoo.html).
- **Changed**: Widget settings from **Settings → PayLater** are carried over automatically. Past PayLater payments stay in Odoo, linked to the old PayLater provider entry, which is left disabled.
- **Changed**: Version numbers now use the Odoo Apps Store format (`18.0.4.0.0` in the manifest). Odoo 18 only.
- **Added**: App listing page, icon and screenshot for the Odoo Apps Store, including what data the module sends to PayLater.

### Odoo 3.1 (2026-10-29)

Security and reliability update. All merchants should upgrade.

**Download:** [payment_paylater-v3.1.zip](https://docs.paylaterapp.com/downloads/payment_paylater-v3.1.zip)

- **Security**: Webhooks are matched to the order only by the signed `orderId`; unsigned fields can no longer redirect a webhook to another order.
- **Security**: Hardened payment status handling on the shopper return page.
- **Fixed**: Paid PayLater orders are now confirmed in Odoo and recorded in Accounting. Previously the payment succeeded but the sale order stayed unconfirmed.
- **Fixed**: A repeated payment webhook no longer marks pending refunds as complete.
- **Fixed**: Refunds can be issued from the Odoo admin again, and are booked once PayLater accepts them.
- **Fixed**: Rejected webhooks now return a real `4xx` status so PayLater can retry.
- **Fixed**: Shoppers always land on the payment status page after returning from PayLater, including when they did not complete the payment.
- **Fixed**: Failure notices from PayLater ("fail", "failed", "expired" and similar) are now acted on, after the module confirms the payment's status with PayLater. Before, "fail" and "expired" were ignored, and a confirmed failure was never recorded.
- **Fixed**: A scheduled check every 15 minutes asks PayLater about payments still waiting for a result, so a lost notice no longer leaves an order open. A payment still pending 24 hours after its link was created is closed, because the link has expired.
- **Fixed**: A shopper can no longer start a second payment for an order that is already paid, and a second payment that still arrives is flagged in the order's chatter for a refund.
- **Fixed**: Old, repeated or future-dated notices no longer change a payment.
- **Fixed**: The widget is shown only from QAR 300 (or the configured minimum, if higher) up to QAR 25,000, and the instalments shown add up exactly to the price.
- **Fixed**: Notices with an unrecognised status are recorded in the chatter.
- **Changed**: PayLater is only offered for QAR orders between 300 and 25,000 QAR.

### Odoo 3.0 (2026-06-04)

OAuth2 Bearer auth on the v2 web-checkout endpoints.

**Download:** [payment_paylater-v3.0.zip](https://docs.paylaterapp.com/downloads/payment_paylater-v3.0.zip)

- **Changed**: Authentication switched from `x-api-key` to **OAuth2 Bearer**.
- **Changed**: Endpoints moved to `/v2/web-checkout`.
- **Changed**: Payload field names are now `snake_case` (`outletId → outlet_id`, `orderId → order_id`, …).
- **Changed**: `expiry_duration` is now required on create-payment-link.
- **Changed**: Full and partial refunds collapse onto one endpoint.
- **Changed**: Admin Test/Live API Key fields removed.
- **Added**: New admin fields: Client ID and Client Secret. **Environment** (UAT or Live) selects the environment.

### Odoo 2.0 (2026-05-17)

Online refunds, webhook receiver, and admin validation.

- **Added**: Online refunds from the orders admin screen.
- **Added**: Full refund routing: `GET /web-checkout/refund` with `transactionType=DOWN_PAYMENT`.
- **Added**: Partial refund routing: `POST /web-checkout/refund/partial`.
- **Added**: Webhook receiver for server-to-server settlement.
- **Security**: Webhook Secret admin field for signature verification.
- **Changed**: Minimum Order Amount must be ≥ 300 at save time, with field validation.
- **Changed**: API Key validation preserves placeholder behaviour.

### Odoo 1.0 (2026-04-24)

First Odoo release.

- **Added**: Direct API handshake, order-total logic, and classic checkout support.
- **Added**: Centralized admin dashboard, dual-environment support, and automated refund engine.
- **Security**: Secure API handling, security callback handler, and smart redirects.

## OpenCart

### OpenCart 3.1.1 (2026-11-01)

Fixes for new installs and for stores not priced in QAR.

**Download:** [paylater.ocmod.zip](https://docs.paylaterapp.com/downloads/opencart/3.1.1/paylater.ocmod.zip)

- **Fixed**: A new install no longer shows blank UAT and Production Base URL fields, which broke every payment once saved. The defaults now show until the settings are first saved, a blank Base URL is saved as the PayLater address, and stores that already saved blank addresses use the PayLater addresses again.
- **Fixed**: PayLater is only offered, and its product widgets only shown, when the store's default currency and the shopper's chosen currency are both Qatari Riyal. Before, totals in another currency were sent to PayLater as the same number of riyals. The settings page now warns when the default currency is not QAR.
- **Fixed**: Removed `curl_close()` calls, which are deprecated in PHP 8.5.

### OpenCart 3.1 (2026-10-29)

Security and reliability update. All merchants should upgrade.

**Download:** [paylater.ocmod.zip](https://docs.paylaterapp.com/downloads/opencart/3.1.0/paylater.ocmod.zip)

- **Security**: An order is only marked paid when the amount the shopper paid matches the current order total. A mismatch is left for the merchant to review, with a note in the order history.
- **Security**: Webhooks can no longer move an order backwards: replayed, duplicate or out-of-order notifications are ignored, and a paid order is never reset to pending or failed.
- **Security**: Hardened payment status handling on the shopper return page.
- **Fixed**: Every payment link generated for an order is tracked, so a payment on an earlier link (after a double click or the back button) is no longer lost. Refunds go to the link that was actually paid.
- **Fixed**: A new payment link can no longer be generated for an order that is already paid.
- **Fixed**: The package now installs through **Extensions → Installer**: `install.json` sits at the root of the zip.
- **Fixed**: A shopper who cancels on the PayLater payment page now returns to their cart with a "Payment was not completed" message. Before, the store started a new, empty session on the way back (OpenCart's default session cookie setting), so the cart looked empty and no message appeared.
- **Fixed**: If a payment is confirmed for an order the store has already cancelled, the shopper is no longer told the order was placed. They see a message that the payment will be refunded, and the order history asks the merchant to refund it.
- **Fixed**: PayLater is only offered at checkout for order totals from QAR 300 to 25,000, which PayLater accepts. Shoppers were offered it and then refused at the pay button.
- **Fixed**: The product page widget uses the price including tax, the same as the product list, and the widget is hidden above QAR 25,000. The amounts shown add up exactly to the price.
- **Fixed**: A failure notice from PayLater no longer fails the order straight away. The extension checks the payment's status with PayLater first, so an old or repeated notice cannot fail an order the shopper is still paying, or has paid.
- **Fixed**: A notice dated in the future no longer blocks later notices for the same payment.
- **Fixed**: Notices with a status the extension does not recognise are now recorded in the order history.
- **Fixed**: The admin rejects a widget minimum below QAR 300 or above 25,000.

### OpenCart 3.0 (2026-06-04)

OAuth2 Bearer auth on the v2 web-checkout endpoints.

**Download:** [paylater.ocmod.zip](https://docs.paylaterapp.com/downloads/paylater.ocmod.zip)

- **Changed**: Authentication switched from `x-api-key` to **OAuth2 Bearer**.
- **Changed**: Endpoints moved to `/v2/web-checkout`.
- **Changed**: Payload field names are now `snake_case` (`outletId → outlet_id`, `orderId → order_id`, …).
- **Changed**: `expiry_duration` is now required on create-payment-link.
- **Changed**: Full and partial refunds collapse onto one endpoint.
- **Changed**: Admin Test/Live API Key fields removed.
- **Added**: New admin fields: Client ID and Client Secret. **Mode** (UAT or Production) selects the environment.

### OpenCart 2.0 (2026-05-17)

Online refunds, webhook receiver, and admin validation.

- **Added**: Online refunds from the orders admin screen.
- **Added**: Full refund routing: `GET /web-checkout/refund` with `transactionType=DOWN_PAYMENT`.
- **Added**: Partial refund routing: `POST /web-checkout/refund/partial`.
- **Added**: Webhook receiver for server-to-server settlement.
- **Security**: Webhook Secret admin field (encrypted) for signature verification.
- **Changed**: Minimum Order Amount must be ≥ 300 at save time, with field validation.
- **Changed**: API Key validation preserves placeholder behaviour.

### OpenCart 1.0 (2026-04-24)

First OpenCart release.

- **Added**: Core payment features: direct API handshake, order-total logic, and classic checkout support.
- **Added**: Centralized admin dashboard, dual-environment support, and automated refund engine.
- **Security**: Secure API handling, security callback handler, and smart redirects.
