Implementation notes

Minimal exact-amount USDT checkout pattern

This is the public technical summary behind the starter. It is intentionally plain: no private keys on the server, no custody, and no promise that this replaces a full payment processor.

Order model

order = {
  id: randomId(),
  status: "pending",
  amountUnits: priceUnits + uniqueOffset,
  sellerAddress,
  tokenContract,
  downloadToken: randomToken(),
  expiresAt
}

Receipt verification

receipt = eth_getTransactionReceipt(txHash)
assert receipt.status == 0x1
assert confirmations >= requiredConfirmations
find Transfer log where:
  log.address == USDT_CONTRACT
  log.to == sellerAddress
  log.value == order.amountUnits
assert txHash has not been used before
mark order paid
unlock download URL

Log scanner

every N seconds:
  load pending orders
  scan confirmed USDT Transfer logs to seller wallet
  match logs by exact amount
  mark matching orders paid
  remember used transaction hashes

Why exact amounts

A single static wallet address can receive many payments, but the server needs a way to identify which order a transfer belongs to. Adding a tiny unique offset to the USDT amount lets the checkout match payments without generating new deposit addresses or holding keys.

Operational checklist

Preview the starter files Generate config