Automation · 8 min · 2026-11-07

How to cancel expired Multibanco orders and restock with Shopify Flow

Unpaid Multibanco references hold stock until someone cancels by hand. How to build automatic cancellation in Shopify Flow, aligned with your gateway.

Shopify FlowMultibancoUnpaid ordersStockifthenpay

Summary

What matters before moving forward.

  • An unpaid Multibanco order reserves stock. If nobody cancels it, the item stays unavailable to other customers until the reference expires, or longer.
  • On Shopify Payments the order is cancelled after 7 days. With gateways such as ifthenpay, the store sets the reference validity, but cancelling the order in Shopify is always the store's own automation.
  • Shopify Flow has no ready template for this. It is built with a scheduled trigger, a query for pending orders and the Cancel order action with restocking.
  • The most dangerous mistake is cancelling an order that was just paid. The time rule has to leave room for payment confirmation.
  • Before cancelling for real, run the flow for a week that only adds a tag. It is the cheapest way to catch a wrong rule.

The cost of a forgotten pending order

When a customer chooses Multibanco, the order is created immediately and stock is reserved. Payment comes later, or never. While nobody looks at the order, the item shows as sold out to people who wanted to pay now.

With high stock items this goes unnoticed. With unique pieces, sizes with few units or launches, a pending order can block a sale to another customer for days.

The manual fix, opening the pending orders list every morning and cancelling old ones, works until the first long weekend.

Who cancels: the gateway or the store?

On Shopify Payments the rule is documented: the customer has 7 days to pay and, if they do not, the order is cancelled.

With third party gateways such as ifthenpay, the store can set the reference validity in the gateway itself. But a reference expiring does not mean the order is cancelled in Shopify. Cancelling the order, restocking and notifying the customer always sits with the store, usually as a Shopify Flow automation.

The first decision is therefore simple: the cancellation window in Shopify should be equal to or slightly longer than the reference validity. If the reference is valid for 48 hours and Flow cancels at 24, you are cancelling orders the customer can still pay.

How to build the flow in Shopify Flow

Scheduled trigger. Start with the scheduled time trigger, for example every hour or every four hours. A scheduled trigger has one advantage over an order created trigger with a wait: it also catches orders that were already pending before the flow existed.

Order query. Use the get order data action with a query that filters pending financial status, orders not cancelled and a creation date older than your window. Also filter by payment method, so you do not catch bank transfers or other methods with different deadlines.

Cancel action. For each order found, use the Cancel order action with the restock option. Since there was no payment there is nothing to refund, but check the options in the current version of the action, which Shopify replaced in 2024 with one that also voids payment authorisations.

Customer notice. Enable the cancellation notification or add your own email explaining that the reference expired and how to order again. A customer who only wanted more time to pay often comes back if the notice is friendly.

Do not cancel people who just paid

Confirmation of a Multibanco payment does not reach the store the instant the customer pays. If the flow runs exactly at the validity limit, it can cancel an order paid minutes before.

Leave a margin. If the reference is valid for 48 hours, cancel from 50 or 52. And make the flow check the order status at the moment of the action, not only in the query.

Also define what happens if a payment arrives after cancellation. With stock already released, there may be nothing left to ship. The store needs a procedure: refund to the original method, offer another item or reinstate the order.

Testing without cancelling anyone

In the first week, replace the cancel action with an action that only adds a tag, for example cancel-mb. After a few days, look at which orders got the tag and confirm one by one that they all should have been cancelled.

Look especially for orders paid by another method, orders with partial payment and orders created by hand in the admin. These are the ones that usually slip through filters.

Only after a week with no false positives swap the tag for the cancel action.

How Vokzar builds the automation

We read the reference validity in the gateway you use, whether Shopify Payments, ifthenpay or another, and set the cancellation window with a margin.

We build the flow in Shopify Flow with a scheduled trigger, payment method filters, cancellation with restocking and a customer notice, and connect the SMS reminder before expiry if it makes sense for your store.

We run it in tag mode first, review the results with you and only then switch on cancellation. You end up with a weekly record of cancelled orders and released stock.

Related next steps

Next steps.

Proof and validation

  • The 7 day window on Shopify Payments comes from Shopify's official help on Multibanco.
  • The Cancel order action options and their 2024 replacement come from Shopify Flow documentation and changelog.
  • Reference validity on third party gateways depends on each gateway's contract and configuration.

Official documentation

Validated sources.

Technical strategy should be auditable. These sources link directly to the official documentation behind this guide.

Frequently asked questions

Common questions about this topic.

Does Shopify cancel unpaid Multibanco orders on its own?

On Shopify Payments, yes, after 7 days. With third party gateways such as ifthenpay, the reference expires in the gateway, but cancelling the order in Shopify has to be automated by the store.

Is there a ready template in Shopify Flow for this?

There is no specific official template. It is built with a scheduled trigger, a query for pending orders and the Cancel order action with restocking.

How long should I wait before cancelling?

A little longer than the reference validity in your gateway. If the reference is valid for 48 hours, cancel from 50 or 52 to leave room for payment confirmation.

How do I test the flow without cancelling orders by mistake?

For a week, replace the cancellation with a tag. Review the tagged orders and only then switch on the cancel action.

Want to apply this to your site?

Next step Technical audit