Description
When a customer initiates multiple payment attempts for the same WooCommerce order via the order-pay endpoint (e.g., by clicking 'Back' and restarting the payment process), the Mollie plugin creates multiple Mollie transactions (e.g., tr_A and tr_B).
If the customer completes the payment for the latest transaction (tr_B), but the previous transaction (tr_A) eventually expires, the expired webhook for tr_A triggers a status change in WooCommerce to "Cancelled". This happens even if the order shouldn't be cancelled, leading to data inconsistency and manual recovery work.
Steps to Reproduce
- Generate a WooCommerce order and navigate to the order-pay URL: /checkout/order-pay/[ID]/?pay_for_order=true&key=[KEY].
- Select a payment method (e.g., iDEAL) and proceed to the Mollie hosted checkout (Transaction A is created).
- Instead of paying, go back to the merchant site or refresh the order-pay page.
- Restart the payment process (Transaction B is created).
- Complete the payment for Transaction B. The order status in WooCommerce correctly moves to "Processing" or "Completed".
- Wait for Transaction A to reach the expired state (Mollie timeout).
- Mollie sends an expired webhook for Transaction A.
Note: We generated the orders with code to couple them to registrations, it were no orders made by a webshop cart.
Actual Behavior
The plugin processes the webhook for the expired Transaction A and updates the WooCommerce order status from "Processing/Completed" (or "Pending") to Cancelled.
Expected Behavior
The plugin should check if there are newer or successful transactions associated with the order before applying an "Expired" or "Cancelled" status update based on an old transaction ID. If the order is already "Paid" or if a newer transaction is still "Open", the expired webhook of an older transaction should be ignored.
Order Notes:
- Mollie – iDEAL | Wero betaling verlopen (tr_ohYj....). - 31/01/2026 om 18:20
- Bestellingsstatus gewijzigd van Wachtend op betaling naar Geannuleerd. - 31/01/2026 om 18:20
- Bestelling kon niet worden geannuleerd bij Mollie, want de bestelstatus is expired. - 31/01/2026 om 18:20
- ideal betaling gestart (tr_ohYj.....). - 31/01/2026 om 17:15
- ideal betaling gestart (tr_Cn2R.....). - 31/01/2026 om 17:09
WooCommerce Logs:
2026-01-31T18:20:32+00:00 DEBUG Mollie\WooCommerce\Payment\PaymentModule::cancelOrderAtMollie - 3499 - Try to process cancelled order at Mollie.
2026-01-31T18:20:32+00:00 DEBUG Mollie\WooCommerce\Payment\PaymentModule::cancelOrderAtMollie - 3499 - Order could not be canceled at Mollie, because order status is expired.
Environment
WooCommerce version: 10.4.3
Mollie Payments for WooCommerce version: 8.1.3
Frequency: Occurs in approximately 5% of orders.
Description
When a customer initiates multiple payment attempts for the same WooCommerce order via the order-pay endpoint (e.g., by clicking 'Back' and restarting the payment process), the Mollie plugin creates multiple Mollie transactions (e.g., tr_A and tr_B).
If the customer completes the payment for the latest transaction (tr_B), but the previous transaction (tr_A) eventually expires, the expired webhook for tr_A triggers a status change in WooCommerce to "Cancelled". This happens even if the order shouldn't be cancelled, leading to data inconsistency and manual recovery work.
Steps to Reproduce
Note: We generated the orders with code to couple them to registrations, it were no orders made by a webshop cart.
Actual Behavior
The plugin processes the webhook for the expired Transaction A and updates the WooCommerce order status from "Processing/Completed" (or "Pending") to Cancelled.
Expected Behavior
The plugin should check if there are newer or successful transactions associated with the order before applying an "Expired" or "Cancelled" status update based on an old transaction ID. If the order is already "Paid" or if a newer transaction is still "Open", the expired webhook of an older transaction should be ignored.
Order Notes:
WooCommerce Logs:
Environment
WooCommerce version: 10.4.3
Mollie Payments for WooCommerce version: 8.1.3
Frequency: Occurs in approximately 5% of orders.