Sell Digital Products for USDT: Auto-Delivery Guide

SaaS plans, license keys, game items and downloads are a natural fit for USDT. Here is how to design the order flow, deliver automatically from the payment webhook and keep renewals, support and accounting simple.

TTillCrypto team8 min read

If you sell something that lives on a server, like a SaaS plan, a license key, an in-game item or a download, crypto fits better than it does for physical goods. There's nothing to ship, so you can sell digital products for USDT and deliver as soon as the transfer confirms. The chain is rarely where things go wrong. The order flow, duplicate events and the support inbox are.

The order flow for selling digital products for USDT

A lot of checkout bugs come from a vague order model. Write the states down before you write code:

Your order status Meaning What the customer sees
awaiting_payment Order created, checkout link issued Checkout page with QR code and timer
paid Confirmed payment received "Payment received, preparing your order"
fulfilled Key sent, plan active, item granted The thing they bought
expired Window closed, nothing arrived "This order expired, start a new one"
needs_review Wrong amount, failed delivery, anything odd "We're looking into it"

The sequence that works:

  1. The customer clicks Buy. You create the order in your own database with a fixed price.
  2. Your server creates a payment with your order ID attached and redirects the customer to the checkout URL it gets back.
  3. The customer pays. The gateway detects the confirmed transfer and sends a payment.paid webhook.
  4. Your webhook handler marks the order paid and queues fulfillment.
  5. Fulfillment runs, and the order moves to fulfilled.

With TillCrypto, step 2 is a POST /v1/payments with amount, currency, order_id, success_url and cancel_url. If that request times out and your server retries with the same order_id, you get the same payment back instead of a second one. A different amount under a used order_id is rejected with a 409. That's also why an expired order should become a new order with a new ID: the old ID just returns the old, expired payment. The full walk-through is in how to accept USDT payments on your website.

Deliver automatically from the payment.paid webhook

Keep the handler short: verify, check, flip the state, queue the work, return 200. Do the slow part (emailing keys, calling a game server) in a background job, so a sluggish email provider doesn't turn into timeouts and retries.

javascript
app.post('/webhooks/tillcrypto', express.raw({ type: 'application/json' }), async (req, res) => {
  // Verify X-TillCrypto-Signature against the raw body before anything else
  if (!verifySignature(req.get('X-TillCrypto-Signature'), req.body, process.env.TILL_WEBHOOK_SECRET)) {
    return res.status(400).send('bad signature');
  }
  const event = JSON.parse(req.body.toString('utf8'));
  if (event.type !== 'payment.paid') return res.sendStatus(200);
  if (event.livemode !== IS_PRODUCTION) return res.sendStatus(200);

  const p = event.data;
  // Only one delivery can win this update
  const result = await db.query(
    `UPDATE orders SET status = 'paid', payment_id = $1, txid = $2, paid_at = now()
      WHERE id = $3 AND status IN ('awaiting_payment', 'expired')
        AND amount = $4 AND currency = $5`,
    [p.id, p.txid, p.order_id, p.amount, p.currency]
  );

  if (result.rowCount === 1) {
    await queue.add('fulfill', { orderId: p.order_id });
  } else {
    // Either a duplicate delivery, or money we can't match automatically
    const order = p.order_id ? await db.getOrder(p.order_id) : null;
    const alreadyHandled = order && ['paid', 'fulfilled', 'needs_review'].includes(order.status);
    if (!alreadyHandled) {
      if (order) await db.markNeedsReview(order.id, p.id);
      await alertSupport('payment.paid did not match an order', p);
    }
  }

  res.sendStatus(200);
});

Some details worth pointing out:

  • Signature first, on the raw body. Parse the JSON before checking the HMAC and the bytes can change, so verification fails or quietly gets skipped. Verifying crypto payment webhooks covers the format and timestamp checks.
  • Test events stay out of production. Test payments can be simulated as paid. Checking livemode means one can never unlock a real license.
  • A paid event is never dropped silently. A 200 stops the retries, so if the update matched nothing and the order isn't already handled, a human has to hear about it. Price mismatches and dashboard payment links with no order_id end up here. The customer has paid either way.
  • Store values the way the API sends them. currency is the API value (USDT-TRC20 or TRX) and amount is a decimal string like "100.00". Save plain USDT and every comparison fails.
  • Compare against amount, not what hit the chain. When two customers pay the same amount at once, one may be asked to send 100.01 so the transfers can be told apart. The price is still 100.00.
  • expired can become paid. Payments arriving within 30 minutes after the window closes are still credited, so if you expire orders on your own 60-minute timer, a payment.paid can follow. payment.expired only fires after that grace period and is final, which makes it the simplest trigger for expiring orders.

Make fulfillment idempotent

Webhooks are delivered at least once, not exactly once. If your server is slow to answer or returns an error, the event is retried after 1 minute, then 5, 15, 1 hour, 6 hours and 24 hours, and a failed event can be resent from the dashboard. The nasty case is a handler that did the work but whose response never made it back. The next attempt looks brand new.

The conditional UPDATE above is the first layer: only one request can move the order out of awaiting_payment. The second layer lives in the fulfillment job, because jobs get retried too. Give each delivery a natural unique key, usually your order ID:

Product Fulfillment action Idempotency key
SaaS plan Extend plan_active_until on the account A plan_grants row with UNIQUE(order_id)
License key Assign one key from a pool UNIQUE(order_id) on the keys table
Game item or credits Call the game server's grant API Order ID as the grant ID, if the API accepts one
Download Email a signed, expiring link The purchase record; links can be regenerated

For license keys, first look for a key already assigned to this order and reuse it. Only if there's none, claim a free one in a single statement, and let the unique constraint catch the rare race between two workers. Emailing the same key twice is harmless. Two keys for one order is the mistake to avoid.

Pricing digital products in USDT vs converting from USD

Price directly in USDT. The plan is 29 USDT, and that's what the customer sends. USDT is pegged one-to-one to the US dollar, so for most digital products this works like a USD price and keeps your books clean.

Price in USD and convert at checkout. This makes sense if you also take cards and want one price list, or if you accept TRX, whose price moves all day. Convert when you create the payment, store both the USD price and the crypto amount, and treat the quote as fixed for the 60-minute checkout window.

Price in USDT Convert from USD
Customer sees A round number An exact figure, like 31.42 TRX
Exchange-rate risk Small with USDT Yours during the checkout window
Best for USDT-only shops Mixed payment methods, TRX

Either way, the customer has to send the exact amount. Warn people paying straight from an exchange that some exchanges take the withdrawal fee out of the amount sent, which leaves the payment short.

Subscriptions: one invoice, as many attempts as it takes

Crypto has no "pull". You can't charge a wallet on the first of the month the way you charge a saved card, so a crypto subscription is really a series of invoices, each paid on its own.

A pattern that holds up:

  1. A few days before renewal, create an invoice in your system, say inv_8812-2026-12, and email a link to your invoice page. Checkout links expire after 60 minutes, so creating one at email time just produces a dead link.
  2. When the customer clicks Pay, create a payment with a fresh order_id for that attempt, like inv_8812-2026-12-a1, and record which invoice it belongs to. If that checkout lapses, the next click is -a2. Reusing the invoice ID would return the old expired checkout.
  3. On payment.paid, find the invoice behind the attempt. If it's still unpaid, mark it paid and extend access by one period from the later of today or the current end date, in one transaction.
  4. Allow a short grace period before downgrading, and send a reminder or two.

The guard sits on the invoice, not the order_id. "Extend only if this invoice is still unpaid" stops a retried webhook from adding two months, and it also catches a customer who pays two attempts (possible, since late payments still get credited). Flag that second payment for a refund or account credit.

Consider offering a discounted annual plan to crypto payers: one payment a year instead of twelve.

Support scripts for the questions you will get

Most tickets fall into a few buckets, and ready answers keep replies fast and consistent.

"I paid but didn't get anything." Ask for the order number and transaction hash. If the payment is still pending, the transfer probably isn't confirmed yet. "Thanks, we can see your order. Payments are credited once the network confirms them, usually within a few minutes, and delivery is automatic after that. If nothing arrives within 30 minutes, reply with your transaction hash and we'll check by hand."

"The timer ran out while I was sending." "No problem. Payments that arrive shortly after the timer ends are still matched to your order, so it should go through on its own."

"I sent the wrong amount." Wrong-amount and wrong-coin transfers are recorded as unmatched for manual review. "Thanks for letting us know. Please send the transaction hash and we'll sort it out." Then deliver anyway, ask for the difference through a new order, or refund.

"Can I get a refund?" There are no chargebacks on-chain, so a refund is a transfer you make. "Of course. Please send an address for the same coin and network you paid with (for example, USDT on TRON/TRC20) and we'll refund it there." Don't just send it back to the address the payment came from. If they paid from an exchange, that address belongs to the exchange. More odd cases are in crypto payment edge cases.

Accounting and export basics

Reconciliation is easy if you store the right fields from day one. For every paid order, keep:

  • Your order ID and the gateway's payment ID
  • Currency and price, plus the USD reference price if you converted
  • The amount actually received and the transaction hash
  • The paid-at timestamp, in UTC

On TillCrypto there's no processing fee, so a payment's net_amount is what arrived on-chain. That can be 100.01 against a 100.00 price, which is why summing order prices won't tie out. The 2 USDT payout fee comes out of the payout itself: a 500 USDT payout lands as 498 USDT and your balance drops by 500. Payouts are deducted when requested, and rejected ones are credited back.

So the check is: total net_amount of paid payments, minus payout amounts, equals your balance. Do it per currency, since USDT and TRX balances are separate. For exports, GET /v1/payments returns payments newest first, a page at a time, and also filters by order_id. Page back past the start of the month and cut on created_at.

Sources and further reading

Accept USDT on your website

Hosted checkout, signed webhooks and a test mode. 0% processing fee, no monthly fee.