Skip to content
HisarPay
  • Crypto basics
  • Published:
  • Reading time: 5 min read
  • Türkçe oku

Price volatility and rate locks: how crypto is priced on USD invoices

If you price in dollars and get paid in crypto, the exchange rate is the bridge between the two, and it can move between the moment an invoice is created and the moment the payment is final. This article shows how a rate lock closes that gap and how to manage the risk that remains.

On this page
  1. The problem: prices do not wait
  2. How the rate lock works
  3. Payments that arrive after expiry
  4. Coin-priced invoices: skipping the rate entirely
  5. Let the customer choose, or restrict the coin?
  6. Reducing exposure after payment
  7. Frequently asked questions

The problem: prices do not wait

A customer places a $100 order and wants to pay in TRX. When the invoice is created, $100 equals a certain amount of TRX; by the time the customer opens a wallet and sends the payment, the TRX price may have moved a few percent. If it falls, the same TRX is no longer worth $100; if it rises, the customer overpays.

That uncertainty has two separate phases:

  • Before payment: the rate moves while the invoice is open. The rate lock handles this.
  • After payment: TRX sitting in your balance changes in value. That depends on your treasury decisions.

How the rate lock works

When you create a USD-priced invoice on HisarPay, no coin amount is fixed yet. The moment the customer picks TRX or USDT on the checkout, that coin’s current rate is locked and the amount due is calculated. From then on, the amount the customer sees does not change.

The lock gives the customer a reasonable window to pay. After a coin is chosen, the invoice always has at least 15 minutes left: if less time remains it is extended, and if more remains it is left alone. The window is never shortened. As long as nothing has been paid yet, the customer can switch coins, which locks the new coin’s rate instead.

An example timeline

TimeEventResult
14:00A $100 invoice is created (valid for 60 min)Expires 15:00, no coin amount yet
14:50The customer picks TRXRate locked; only 10 min left, so expiry moves to 15:05
14:53The customer sends the paymentThe payment is seen on-chain
14:5420 confirmations completeThe invoice is final as paid and the webhook is sent

How the amount is calculated

USDT is pegged to the dollar, so it is priced 1:1: a $49.90 invoice comes to 50.90 USDT including the 1 USDT network fee. For TRX, the amount is calculated at the locked rate and rounded up, so rounding never works against you.

Why lock at selection?The lock starts when the customer picks a coin, not when the invoice is created. Even on invoices that stay open for a long time, the customer sees the rate that applies when they are actually about to pay.

Payments that arrive after expiry

Sometimes a customer pays at the last second, or their exchange delays the withdrawal. On HisarPay a late payment is never lost: it is always credited to your balance and flagged with late: true. Whether a payment is late is judged by its block time, not by when our servers happened to see it.

The locked rate holds for the life of the invoice. Once that has passed, two rules apply:

  • USD-priced TRX invoices are repriced at the current rate, so price movement after the lock expired is not pushed onto one side. The event’s repriced field shows the old and new amounts.
  • USDT invoices are not repriced, because USDT already tracks the dollar.

We cover every late, short and excess payment scenario in a separate guide.

Coin-priced invoices: skipping the rate entirely

Some businesses set prices directly in a coin, for example selling a digital product for 25 USDT. In that case you create the invoice with token and amount instead of price_usd. There is no dollar price to convert, so no rate lock or repricing applies.

Let the customer choose, or restrict the coin?

By default the customer chooses between TRX and USDT. Offering a choice lets customers who only hold one coin pay, which can lift conversion. On the other hand, every TRX payment carries price risk in your balance until you withdraw it.

ApproachUpsideWatch out for
Customer choosesMore customers can payYour TRX balance moves with the market
USDT onlyRemoves most price riskCustomers who only hold TRX cannot pay
Price in a coinNo conversion neededYou have to keep prices up to date yourself

Show prices in dollars on your site and say that the exact coin amount is calculated on the checkout when the customer picks a coin. That makes the link between the price in the cart and the amount on the checkout easy to follow.

Reducing exposure after payment

The rate lock solves the risk up to the moment of payment. TRX credited to your balance moves with the market until you withdraw or convert it. A few ways to manage that:

  • Limit invoices to USDT. If you want no price exposure at all, accept only USDT through the tokens field.
  • Withdraw on a schedule. Move your TRX balance to your own wallet or exchange account at regular intervals.
  • Turn on automatic withdrawals. Funds can be sent to a trusted address automatically once your balance reaches a threshold you choose. An address becomes trusted after it is at least 7 days old and has received at least 3 completed withdrawals.
  • Pick the invoice lifetime deliberately. Lifetimes range from 5 minutes to 24 hours. Shorter windows mean less rate exposure, but less time for the customer.
A 30-minute invoice that accepts USDT onlyTypeScript
const invoice = await hisarpay.invoices.create({
  price_usd: '100.00',
  tokens: ['USDT'],          // accept USDT only
  expires_in_minutes: 30,    // 5–1440 minutes
  order_id: 'ORD-2088',
});
CommunicationExplain your rate policy to customers too. The checkout already shows when the amount was locked and how long it stays valid; repeating that in your order emails builds trust.

Frequently asked questions

When is the rate locked?
The moment the customer picks TRX or USDT on the checkout. The invoice then stays valid for at least another 15 minutes; if more time is left, nothing changes.
Can the customer switch coins?
Yes, as long as nothing has been paid yet. Choosing a new coin locks that coin’s current rate and recalculates the amount.
What if a TRX payment arrives after the invoice expired?
It is credited to your balance and flagged as late. If the invoice was priced in dollars, the amount is repriced at the rate current when the payment arrived; USDT invoices are not repriced.
Can I remove exchange-rate risk completely?
Limiting invoices to USDT removes most price risk. Keep in mind that stablecoins carry risks of their own.
  • #Rate lock
  • #Volatility
  • #Invoices
  • #TRX

Try crypto payments in test mode

No setup or monthly fees. Experiment as much as you like in test mode and go live when you are ready.

More guides that go well with this one.