← Back to Blog
·5 min read

How to Accept USDT Payments on Your Website (TRC20 & ERC20)

usdtstablecointutorial

Why Accept USDT?

USDT (Tether) is the world's most widely used stablecoin, with a market cap exceeding $140 billion. Unlike Bitcoin or Ethereum, USDT is pegged 1:1 to the US dollar — meaning your customers pay in dollars, and you receive dollars. No volatility risk.

For merchants, USDT solves the biggest objection to accepting crypto: price fluctuation. A $100 payment stays worth $100 whether you withdraw it today or next month. It combines the benefits of crypto (no chargebacks, global reach, no KYC) with the stability of fiat currency.

USDT is available on multiple blockchains, but the two most popular networks for payments are TRC20 (TRON) and ERC20 (Ethereum).

TRC20 vs ERC20: Which Should You Accept?

FeatureTRC20 (TRON)ERC20 (Ethereum)
Transaction Fee~$1$2–$15
Confirmation Time~3 minutes~5 minutes
Network CongestionRareCommon during peaks
PopularityVery high (Asia, global)High (DeFi, exchanges)
Best ForSmall–medium paymentsLarge payments, DeFi users

Our recommendation: Accept both. With ChainPay, you can accept TRC20 and ERC20 USDT from a single integration — customers choose their preferred network at checkout.

Integration with ChainPay: 5 Lines of Code

Here's everything you need to create a USDT payment order:

const response = await fetch('https://chainpay.pro/api/v1/orders', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    amount: 49.99,
    currency: 'USDT_TRC20',  // or 'USDT_ERC20'
    merchant_order_id: 'order-123'
  })
});
const order = await response.json();
// Redirect customer to: order.payment_url

That's it. ChainPay generates a unique deposit address, displays a checkout page to your customer, monitors the blockchain for incoming transactions, and sends you a webhook when the payment is confirmed.

Setting Up Webhooks for Automatic Fulfillment

Webhooks let you automatically fulfill orders when payments are confirmed. In your ChainPay dashboard, set your webhook URL (e.g., https://yoursite.com/api/webhooks/chainpay).

Here's how to handle incoming webhooks:

import crypto from 'crypto';

export async function POST(request) {
  const body = await request.text();
  const signature = request.headers.get('x-chainpay-signature');

  // Verify webhook signature
  const expected = crypto
    .createHmac('sha256', process.env.WEBHOOK_SECRET)
    .update(body)
    .digest('hex');

  if (signature !== expected) {
    return new Response('Invalid signature', { status: 401 });
  }

  const event = JSON.parse(body);

  if (event.type === 'payment.completed') {
    // Fulfill the order
    await fulfillOrder(event.data.merchant_order_id);
  }

  return new Response('OK');
}

ChainPay signs every webhook with HMAC-SHA256 using your webhook secret. Always verify the signature before processing events. Failed deliveries are automatically retried up to 5 times with exponential backoff.

Step-by-Step Setup Summary

  1. Create an account at chainpay.pro/register — no KYC required.
  2. Add your wallet addresses in the dashboard settings. Add your TRON wallet for TRC20 and your Ethereum wallet for ERC20.
  3. Copy your API key from the dashboard settings page.
  4. Set your webhook URL to receive payment notifications.
  5. Create payment orders via the API and redirect customers to the payment URL.

Start Accepting USDT Today

USDT is the most practical cryptocurrency for merchant payments — stable value, low fees (especially on TRC20), and massive global adoption. With ChainPay, you can start accepting USDT payments in under 5 minutes with zero KYC and just 0.8% in fees.

Read the full API documentation or create your account to get started.