> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ambichain.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancellations and refunds

> Every way escrow goes back to the maker, and what each one costs.

| Situation | Call | Who | Maker gets | Fillers get |
| - | - | - | - | - |
| Unmatched, maker changes their mind | `refund` | Maker, any time | Escrow | Every bond back |
| Unmatched, deadline passed | `refund` | Anyone | Escrow | Every bond back |
| Matched, filler didn't pay in time | `expire` on the router, then `refundExpired` | Anyone | Escrow **+ the filler's bond** | Nothing |
| Matched, both agree to stop | `proposeCancel` + `acceptCancel` | Maker and filler | Escrow | Bond back |

## Expiry refunds

When a matched filler doesn't pay by `payBy`:

**1. Record the expiry**

Anyone calls `expire(order)` on the destination router. It records ExpiredUnpaid and sends it home.

**2. Wait for the window**

The expiry is claimed on the inbox like a payment, and settles once its 30-minute dispute window closes. A filler who did pay disputes, and the bridge decides.

**3. Refund**

Anyone calls `refundExpired(id, "")`. The maker is credited the escrow and the filler's bond.

![An order that expired unpaid and refunded the maker](https://mintcdn.com/ambi/YFcg3UdfEoAyYkl8/images/app/order-refunded-light.webp?fit=max\&auto=format\&n=YFcg3UdfEoAyYkl8\&q=85\&s=e8c79fe1235ac1d912e5e88014d3cd40)

## Mutual cancel

A matched order can't be cancelled by one side. Either party proposes with `proposeCancel`, and the other accepts with `acceptCancel`.

`acceptCancel` first asks the inbox whether Paid has already been recorded. If it has, the cancel reverts and the filler's payment settles normally. A payment still in flight to Ethereum is not visible yet, so **a filler who has paid should never accept a cancel.**

Mutual cancel is the way out when a route stalls before anyone pays.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.