A deposit that cannot be fulfilled is returned to refund_address on the source chain, in the token that was deposited. The router pays it from its own balance, the same way it pays fulfillments.

What triggers one

What is deducted

The refund returns the deposit minus the refund fees committed in the quote — src_refund_gas plus any src_burn_cost and dst_burn_cost, carried on the order as refund_fee_bridge. The rest of the breakdown is not charged: no spread, no referrer fee, no gas drop.
The deduction is fixed at quote time, so the refund does not get more expensive if gas rises afterwards.

Deferral when gas is high

If the live gas price would push the refund’s cost above the amount committed for it, the refund is not submitted at a loss and it is not taken out of the user’s principal. The order stays in pending_refund and is rechecked later, submitting as soon as gas comes back down. An order sitting in pending_refund for a while is usually this, not a failure.

When it does not happen automatically

Three terminal states mean no refund was paid and the funds need manual handling. All three are rare and none of them is silent. Surface these distinctly in your interface. A user seeing “failed” with no explanation will assume the funds are gone, when in practice they are in the vault and recoverable through support.

Reading refund detail

GetOrder returns a refund message once one exists:
As with fulfillments, src_tx being present means submitted, not confirmed. The order state is the authority; see Order lifecycle.