Crypto Invoice Expiry Time: Choosing 30 Minutes to 24 Hours
How long should a crypto invoice stay open? Expiry options from 30 minutes to 24 hours, rate locks, last-second payments, cancellation and late payment rules.

Your crypto invoice expiry time looks like a minor setting, yet it affects both conversion and exchange rate risk. Too short, and customers paying from an exchange can't make it in time; too long, and a volatile coin may be paid at a stale rate. This post explains how invoice lifetimes work in MercanPay, which duration fits which scenario, and what happens when an invoice expires or is cancelled.
How the crypto invoice expiry time is set
Every MercanPay invoice has an expiry timestamp (expires_at), and an invoice can stay open for at most 24 hours.
When you create an invoice in the panel, the validity field offers four options:
- 30 minutes
- 1 hour (selected by default)
- 6 hours
- 24 hours
Through the API, pass expires_in_minutes with any value from 5 to 1440 (24 hours):
$invoice = $zp->createUsdInvoice('49.90', [
'order_id' => 'order-1001',
'expires_in_minutes' => 60,
]);
In Python it's create_invoice(price_usd="49.90", order_id="order-1001", expires_in_minutes=60). The payment page shows the remaining time as a countdown calculated from server time, so customers see the right figure even if their device clock is off.
Which duration for which scenario?
| Scenario | Suggested expiry | Why |
|---|---|---|
| Instant checkout on a website (e-commerce, digital goods) | 30 min – 1 hour | The customer is ready to pay; shorter means less rate risk |
| Customers paying from an exchange | 1 – 6 hours | Exchange withdrawals can take a while to approve |
| Payment links sent by DM or email | 6 – 24 hours | The customer may not open the link right away |
| B2B payments with approval steps | 24 hours | Leaves room for internal sign-off |
Selling through social media? See crypto payment links for Telegram and Instagram sellers.
Rate locks and expiry
On USD-priced invoices (where the customer chooses the coin), the rate is locked the moment the customer picks a coin and holds until the invoice expires. One small but important detail: if very little time is left when the customer picks a coin, the expiry is extended so they still have time to pay. The duration you set is never shortened.
As long as nothing has been paid, the customer can switch coins, and the rate is recalculated for the new choice.
The effect on rate risk is covered in crypto payment exchange rate risk. In short: with USDT the expiry hardly matters for rates; with TRX a shorter window reduces risk.
Last-second payments
What if the customer sends payment a few seconds before the deadline? Block confirmations take about a minute, so the payment may not be final yet.
MercanPay handles this in two ways:
- If a payment is already visible on-chain, the invoice isn't marked expired straight away. The payment page tells the customer "Time is up — checking for a last-second payment…", and once confirmations complete the invoice is paid as normal.
- Block time decides lateness. Whether a payment counts as late is based on when the transaction entered the blockchain, not when confirmations finished. A customer who paid at the last second isn't penalised by confirmation delay.
Extra time on partial payments
If the customer underpays, the invoice becomes partial and gets at least 30 more minutes, so it won't expire while they send the rest. Partial payments and the tolerance setting are covered in handling underpayments, overpayments and late payments.
Payments after expiry
A payment that arrives after expiry isn't lost; it's credited to your balance. In the webhook, data.payment.late is true.
If a USD-priced invoice is paid late in a volatile coin (TRX), the amount due is re-priced at the current rate. Otherwise a customer could wait for the coin to drop and pay the old, now cheaper amount. When that happens, the webhook's payment object includes:
"payment": {
"txid": "a3f9…",
"amount": "310.5",
"late": true,
"repriced": {
"previous_amount": "298.2",
"amount": "305.9",
"rate_usd": "0.3269"
}
}
previous_amount is the old amount due, amount the re-priced one and rate_usd the rate used. The invoice status then depends on whether the payment covers the new amount. Coins designed to track the dollar, like USDT, aren't re-priced.
Decide on a late-payment rule up front: deliver if it's an unlimited digital product, or contact the customer if stock or a promotional price is involved.
Cancelling an invoice
Sometimes you want to close an invoice early: the customer changed their mind, the price was wrong or you're out of stock. There are two ways:
- In the panel: open the invoice on the Invoices page and use Cancel invoice.
- Via the API: send
POST /v1/invoices/{id}/cancel.
curl -X POST https://mercanpay.com/v1/invoices/7b0c1f7e-…/cancel \
-H "Authorization: Bearer $MERCANPAY_API_KEY"
The rules are simple:
- Only invoices that are still pending with nothing received can be cancelled. An invoice with a partial payment can't be; the request fails with
not_cancellable. - The payment page then shows "Invoice cancelled" and tells the customer not to send funds to that address.
- An
invoice.cancelledwebhook is sent. - If the customer pays anyway after cancellation, the amount is still credited to your balance.
If you need a new invoice for a cancelled order, use a new order_id; the old one returns the cancelled invoice. See idempotent invoices with order_id.
What to do when an invoice expires
When an invoice expires unpaid, its status becomes expired and an invoice.expired webhook is sent. The payment page tells the customer not to send funds and to ask for a new link. On your side:
- Close the order or release any stock reservation.
- If the customer still wants to buy, create a new invoice.
- If invoices expire often, consider a longer window or a short "how to pay" guide. More ideas in 9 crypto checkout tips to boost conversion.
FAQ
Can I extend an invoice after creating it?
No. The expiry is set at creation. The system only extends it automatically for rate locks and partial payments. If you need more time, create a new invoice.
Can an invoice stay open longer than 24 hours?
No. The 24-hour maximum limits rate risk and the reuse of old links.
The customer paid after expiry. Should I deliver?
The payment has been credited to your balance; delivery is your business decision. The late field in the webhook lets you tell these payments apart.
Why can't I cancel an invoice with a partial payment?
Because money has already arrived. If the rest never comes, the invoice expires and the amount received stays in your balance.
Get started with MercanPay
The right crypto invoice expiry time saves both your customers and your books from headaches. Apply for a merchant account, create your first invoice from the panel or the API, and see the API documentation for every field.


