What a rate lock is
Crypto exchange rates are volatile and update second by second. If a merchant prices something at a fiat amount — say in euros or dollars — but accepts payment in a crypto asset, the number of coins or tokens that equals that fiat price keeps changing. Without a fixed rate, the amount owed would drift between the moment the customer is shown a price and the moment their transaction lands, and it would be unclear what counts as paid in full.
A rate lock resolves this by taking the conversion rate at one instant and freezing it for the duration of the payment. At that instant the fiat price is converted into a precise crypto amount, and that amount becomes the obligation. While the lock holds, market movement no longer affects what the customer owes: a price of one hundred units of fiat stays the equivalent crypto amount computed at lock time, regardless of where the rate goes next.
A lock is bounded by an expiry because no rate can be honored indefinitely — the further the market drifts from the locked rate, the more the party holding the risk is exposed. The window is long enough to complete payment but short enough to limit that exposure. If it passes before the payment lands, the lock is no longer valid and the amount has to be re-quoted at a fresh rate. The lock applies to the conversion math, not to network behavior: once the on-chain transaction is sent, how long it takes to confirm is governed by the chain, not the lock.
What it means in a crypto payment
For a merchant, a rate lock is what makes a fiat-priced sale payable in crypto without either side carrying open-ended exchange-rate risk during checkout. The customer sees one crypto amount and a deadline, pays exactly that, and there is no ambiguity about whether a payment that arrives a few minutes later still settles the bill. The locked amount is also the reference point for underpayment and overpayment: a deposit is measured against it, not against a rate that has since moved.
The expiry is the other half of the mechanism. A customer who pays within the window pays the quoted amount; one who waits too long finds the quote stale and is re-priced, because the original rate can no longer be safely honored. This is why a rate-locked payment carries a countdown — the lock and its deadline are a single guarantee, not two separate ones.
Rate lock on halfin
halfin invoices are fiat-anchored: a merchant sets the amount in a fiat currency, and halfin locks the fiat-to-crypto rate when the invoice is activated. From that point the invoice carries an exact crypto amount the customer must send and an expiry by which it must arrive. The customer is paying a fixed figure against a deadline, not a moving target, and the merchant knows that a payment landing inside the window settles the agreed fiat price.
The locked amount is the yardstick for the rest of the invoice lifecycle. A deposit that matches it settles the invoice; one that falls short is treated as underpaid and one that exceeds it as overpaid, always measured against the locked amount rather than the live market rate. If the invoice expires before a payment arrives, the lock lapses with it — a new invoice would capture a fresh rate. A late deposit that lands after expiry is surfaced as its own event rather than silently settling at a stale rate, so the merchant can decide how to handle it.