---
name: onchain-payment-check
description: Verify a USDT or USDC payment on TRON or an EVM chain (Ethereum, BNB Chain, Base, Arbitrum, Polygon) from a transaction hash — token, recipient, amount, status and confirmations. Use when the user asks whether a crypto payment arrived, or pastes a tx hash / TxID.
---

# On-chain payment check

Confirm a stablecoin payment directly from a public node. Never trust a screenshot or an explorer link alone — read the receipt.

## Inputs to collect

- Transaction hash (EVM: `0x` + 64 hex; TRON: 64 hex, with or without `0x`).
- Network. If unknown: a `0x…` hash on several EVM chains is ambiguous — ask, or try each RPC below.
- Optional expectations: recipient address, token, exact amount.

## Token contracts

| Network | Token | Contract | Decimals |
|---|---|---|---|
| TRON | USDT | `TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t` | 6 |
| Ethereum | USDT / USDC | `0xdAC17F958D2ee523a2206206994597C13D831ec7` / `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48` | 6 / 6 |
| BNB Chain | USDT / USDC | `0x55d398326f99059fF775485246999027B3197955` / `0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d` | 18 / 18 |
| Base | USDC | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | 6 |
| Arbitrum | USDT / USDC | `0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9` / `0xaf88d065e77c8cC2239327C5EDb3A432268e5831` | 6 / 6 |
| Polygon | USDT / USDC | `0xc2132D05D31c914a87C6611C10748AEb04B58e8F` / `0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359` | 6 / 6 |

Public RPCs: `https://ethereum-rpc.publicnode.com`, `https://bsc-dataseed.bnbchain.org`, `https://mainnet.base.org`, `https://arb1.arbitrum.io/rpc`, `https://polygon-bor-rpc.publicnode.com`, TRON `https://api.trongrid.io`.

## EVM procedure

1. `eth_getTransactionReceipt` for the hash. `null` → not found or still pending.
2. `status` must be `0x1`.
3. Find logs where `address` equals the token contract (case-insensitive) and `topics[0]` is `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef` (Transfer).
   - from = last 40 hex chars of `topics[1]`, to = last 40 of `topics[2]`, value = `data` as uint256.
4. Confirmations = `eth_blockNumber` − `receipt.blockNumber` + 1. Treat ≥ 12 (Ethereum), 15 (BNB), 10 (Base/Arbitrum), 30 (Polygon) as final.

```bash
curl -s https://mainnet.base.org -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":["0xHASH"]}'
```

## TRON procedure

1. `POST https://api.trongrid.io/walletsolidity/gettransactioninfobyid` with `{"value":"<hash without 0x>"}`. An empty `{}` means not yet solidified (irreversible) — wait and retry; `/wallet/gettransactioninfobyid` shows unconfirmed state.
2. `receipt.result` must be `SUCCESS`.
3. In `log[]`, `address` is the contract as 40 hex chars (prefix `41` to get the TRON hex address). Match `a614f803b6fd780986a42c78ec9c7f77e6ded13c` for USDT. Topics are as on EVM; convert hex addresses to base58 (`41` + 20 bytes, base58check) before comparing with `T…` addresses.

## Report

State clearly: network, token, from, to, amount (divide by 10^decimals, keep all decimals), status, confirmations, and whether each expectation matched. If anything does not match, say which field and the actual value. Never round an amount when the user is matching an exact payment.
