Now live on 6 chainsStart accepting payments in 5 minutes
Back to blog
Developer 7 min readMarch 28, 2026

USDT Payment Gateway API: Complete Integration Guide

Accept Tether (USDT) payments on 6 blockchains with a single REST API. Under 10 minutes from signup to first payment.

USDT is the world's most-used stablecoin — over $110B in circulation. If your customers are international, crypto-native, or just tired of 3% card fees, accepting USDT is a no-brainer. This guide shows you exactly how to integrate a USDT payment gateway API with Zateway in under 10 minutes.

What You'll Build

A checkout endpoint that creates a USDT payment session, returns a unique payment URL, and fires a webhook when the customer pays. Works on Polygon, Solana, Base, BSC, Arbitrum, and Optimism — your customer picks the network they prefer.

Step 1: Get Your API Key

Sign up at zateway.com, go to Dashboard → API Keys, and click Create key. Your key will be shown only once — copy it immediately and store it as ZATEWAY_API_KEY in your environment. Save the returned key id too; you'll need it for rotation and revocation.

Step 2: Create a Payment Session

One POST request creates a payment session. Customer pays via a hosted checkout or your own UI.

curl -X POST https://zateway.com/api/v1/payments \
  -H "X-API-Key: $ZATEWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "49.99",
    "currency": "USDT",
    "chain": "polygon",
    "merchantWallet": "0xYourWalletAddress",
    "metadata": { "orderId": "12345" },
    "webhookUrl": "https://yourapp.com/webhooks/zateway"
  }'

Response:

{
  "id": "zate_sess_abc123def456",
  "checkoutUrl": "https://zateway.com/checkout/zate_sess_abc123def456",
  "amount": "49.99",
  "currency": "USDT",
  "chain": "polygon",
  "status": "pending",
  "expiresAt": "2026-03-28T12:30:00Z"
}

Step 3: Handle the Webhook

When USDT payment confirms on-chain, Zateway POSTs to your webhook URL. Signature is HMAC-SHA256 of the raw body with your webhook secret.

// Next.js API route
import crypto from "crypto";

export async function POST(req: Request) {
  const body = await req.text();
  const sig = req.headers.get("x-zateway-signature");
  const expected = crypto
    .createHmac("sha256", process.env.ZATEWAY_WEBHOOK_SECRET!)
    .update(body)
    .digest("hex");

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

  const event = JSON.parse(body);
  if (event.type === "payment.completed") {
    // Fulfill order — USDT already in your wallet
    await fulfillOrder(event.data.metadata.orderId);
  }
  return new Response("ok");
}

Step 4: Test with Testnet

Use the ZATEWAY_TEST_MODE=true environment flag to hit the Polygon Amoy testnet. You can get test USDT from the Circle faucet. Every production flow works identically.

Why Zateway Over Self-Hosted

You could roll your own USDT gateway with ethers.js and a blockchain listener — but you'd spend weeks handling reorg events, RPC failovers, underpayments, dust attacks, and 6 different chain quirks. Zateway handles all of that for 1% per transaction. You focus on your product.

Start accepting USDT in 10 minutes

Free tier. No credit card. 1% flat fee per transaction.

Get your API key

Related Articles

Guide
How to Accept Crypto Payments on Your Website in 5 Minutes
Analysis
Crypto vs Traditional Payment Gateways: The Real Cost Comparison
Education
What Is a Non-Custodial Payment Gateway?