How to integrate TRON USDT deposits with BroSettlement

Map TRON USDT deposits to customers, apply posted ledger credits once, and reconcile missing deposits after a WebSocket disconnect.

StablecoinsPaymentsIntegration
TRON USDT deposit moving from the assigned receiving address through transaction and ledger checks to funds available to spend.

To make a TRON USDT deposit spendable, verify the receiving address and customer assignment, read the current deposit transaction, find the corresponding posted ledger credit, and check your product’s availability rules. Record the application of that credit and the resulting balance change in one database transaction when the funds qualify for immediate release. A repeated notification or a reconciliation job can then reach the same credit without increasing the customer’s balance again.

BroSettlement provides transaction reads, a wallet ledger, and WebSocket lifecycle notifications. This guide follows a deposit from address assignment to the customer’s available balance, then covers two ways to find unfinished work after a disconnect. The API examples use reads documented in the production Integration API v1.0 snapshot dated November 18, 2026. Confirm the enabled asset, applicable finality rules, and delivery features under your active integration contract. BroSettlement API reference · Production OpenAPI

Table of Contents

Assign and verify a customer deposit address

Before showing a receiving address, persist its association with the internal customer account that should receive the funds. Record the BroSettlement account and wallet identifiers, the receiving address, and the network and asset for which you offer that address. These application records give support and finance a way to trace a transfer even after the customer’s deposit screen shows a different address. When rotating or retiring an address, retain the historical assignment for as long as your integration needs to resolve late transfers and investigate discrepancies.

Show the network, asset, and address together. For this flow, the instructions should identify USDT on TRON. Verify that your integration enables the asset on that network and use the network and asset identifiers specified by the active contract. A ticker or screenshot supplied by the customer can help locate a support case. Use the provider’s records to establish which asset arrived and where it was sent. Follow the contract’s address representation rules when comparing the receiving destination with the saved assignment.

When a deposit is discovered, use the transaction’s accountId and walletId to locate the relevant customer mapping. Verify the chain, asset, receiving destination, and amount using the representations defined by the active contract. If the destination cannot be matched to the saved assignment or the records identify different beneficiaries, leave the available balance unchanged and open a reconciliation case. Record enough context to explain which mapping was checked and where the records disagree.

Keep amount checks exact. The transaction field amountAtomic expresses the amount in atomic units. Preserve it with exact arithmetic and apply the configured asset precision when displaying the amount. Compare the deposit amount and corresponding ledger credit under the contract’s rules. If the relationship is unclear, retain both records for review. A customer’s expected amount can narrow a search, while the verified transaction and ledger records establish the amount eligible for application.

Read events, transaction states, and ledger entries

deposit.observed indicates that a transfer was detected. deposit.confirmed indicates that a transfer met the provider’s confirmation policy. Have either notification queue a read of the current transaction. If the latest records show a pending deposit, the application can display it as pending while ledger and availability checks are outstanding. Design the consumer for at-least-once delivery and recognize repeated notifications by stable event ID. Check which events, topic subscriptions, acknowledgments, and resume features your integration actually supports. WebSocket events

For a known operation, call GET /api/v1/transactions/{id} with transactions:read. Verify type=DEPOSIT and read the current status alongside the account, wallet, chain, asset, and amount. The detail record includes id, accountId, walletId, chain, asset, amountAtomic, createdAt, and updatedAt. The availability of balanceEffects and onChainDetails can depend on transaction state. Check the destination using the representation supported by your active contract.

Read GET /api/v1/wallets/{walletId}/ledger-entries with wallets:read. Use transactionId to narrow the results to the deposit. For each candidate, verify its relationship to the transaction and wallet, the network and asset, the amount, the entry status, and the credit direction applicable to that account under the contract. Keep documented field names and status values when building comparisons. Production OpenAPI · Operational ledger

RecordEvidence to readApplication action
WebSocket notificationdeposit.observed or deposit.confirmedQueue or refresh a verification job. Derive the customer-facing state from current records.
TransactionDEPOSIT, PENDINGKeep the deposit under review and leave available funds unchanged.
TransactionDEPOSIT, CONFIRMEDCheck the applicable confirmation rules and look for the corresponding posted credit.
TransactionFAILED or FAILED_ON_CHAINWithhold a new credit. Investigate any conflict with a prior local application.
Ledger entryPENDING or VOIDEDExclude the entry from new credits. Review a conflict with a previously applied entry.
Ledger entryPOSTED with the applicable credit direction, verified ownership, and verified amountApply the entry once when transaction and availability checks pass.
Application balanceDurable record of the applied entry and resulting balance effectDisplay funds according to local availability rules and use the applied-entry record to handle retries.

These records can reflect different points in the process. A transaction may already be CONFIRMED while the credit entry is PENDING or absent. Keep that deposit open and recheck the wallet ledger. Change the available balance only when the funds are eligible and the local update commits. If the product shows a pending amount, label it separately and tie spending and withdrawal decisions to the available balance. Support can then explain whether a deposit is waiting for confirmation, a ledger posting, or a product availability decision.

Either deposit notification triggers a transaction read. A matching posted ledger credit and an availability check lead to one local credit.

Apply a posted credit once

Keep notification deduplication and accounting idempotency independent. A stable event ID identifies a notification that may be delivered again. A verified ledger entry identity identifies the balance effect your application intends to apply. An observation, a confirmation, a scheduled scan, and a support recheck can all converge on the same entry. Each should use the same balance update path and the same record of applied credits.

Confirm the stable identity of the ledger entry and its uniqueness scope under the active contract. Include the provider environment and any account or wallet context the contract requires in your uniqueness key. A network transaction hash can help trace a transfer. The application still needs an identity for the specific accounting effect. Save the verified entry identity alongside the transaction, wallet, internal customer account, asset, and amount so an operator can reconstruct the decision later.

Use a database uniqueness constraint to enforce one application when workers overlap. In a single database transaction, register the source entry under the unique key and record its local accounting effect. When the funds qualify for immediate release and the application stores an available-balance projection, update it in the same commit. If release comes later, persist the posted credit and the release decision separately and apply the release idempotently. Ensure two distinct credits for the same account can both succeed without one balance update overwriting the other.

If the key already exists, compare the customer, wallet, asset, and amount with the saved record. If they agree, keep the original application. If they differ, preserve both sets of evidence and open a reconciliation case. Keep the source identity available throughout the recovery and reprocessing periods your operations support. On a timeout with an unknown commit outcome, retry through the same key. If the first attempt committed, the retry will find its record. If it rolled back, the credit can be applied after verification.

Use the same path for out-of-order notifications. When a confirmation arrives before an observation, read the current records and apply the credit only when all checks pass. A late observation can trigger another read while the previously applied credit remains recorded. If a later authoritative read conflicts with the earlier accounting effect, capture the current evidence and follow the correction process defined by the contract and your accounting policy. Preserve the original application record so finance can explain the correction. BroSettlement reconciliation

Recover after a WebSocket disconnect

Start a reconciliation run after a disconnect. Restart unfinished work if recovery itself is interrupted. Reconnect to /v1/ws with websockets:read where supported to restore live intake. Recover gaps through transaction and ledger reads. This covers deposits that were already known and deposits for which the application received no notification. Confirm the event features available in the target environment. WebSocket events · BroSettlement reconciliation

Recheck known operations. Read each unresolved deposit by transaction ID, including deposits created before the disconnect. Read the corresponding ledger entries for its wallet using transactionId. Compare the current evidence with the record of applied credits. An earlier deposit may confirm during the outage, or a deposit already confirmed may receive a posted entry while the stream is down. Keep each item open until the credit checks pass or an operator resolves the discrepancy.

Search for missed deposits. Use the cursor-based GET /api/v1/transactions with transactions:read. Start with type=DEPOSIT and the relevant chain and asset values under the contract. Narrow the search by accountId or walletId as appropriate. Set createdFrom and createdTo to bound the creation window, overlapping the previous completed scan. These filters concern record creation time. The known-ID pass covers earlier deposits that may have changed state during the outage.

Follow the documented cursor through the entire window. Send each candidate through the same transaction, ledger, and availability checks used for live events. Retain pending discoveries for later reconciliation. Advance the saved scan boundary only after all pages have been processed or the remaining work has been durably queued. After a partial failure, resume the recorded work or repeat the overlapping window. The shared credit key allows a previously applied entry to appear again while other deposits are still being discovered.

Failure or gapRecovery actionExpected accounting outcome
The connection drops before the first notification is seenFind the deposit in the overlapping cursor scan, then read the current transaction and wallet ledger.Apply an eligible posted credit once. Keep a pending deposit under review.
A known deposit confirms during the outageRead the saved transaction ID and its ledger entries even if it predates the scan window.Apply the credit when the entry and availability checks pass.
A confirmed deposit has no eligible posted creditKeep the item open and recheck the ledger under the integration’s retry policy.Available funds remain unchanged while accounting evidence is incomplete.
Live delivery and recovery find the same posted entryUse the shared application path and unique ledger-entry key.One durable application records the effect.
Wallet, asset, amount, or local records disagreePreserve the transaction and entry references and route the discrepancy for review.The original accounting evidence is available for investigation. No new credit is applied while the discrepancy is open.

At the end of the run, compare eligible posted credits with local application records for the same environment, wallet, customer mapping, and asset. Reconcile the deposit effects with the application balance while accounting for other balance changes. Record the scan window, completed pages or durably queued work, unresolved IDs, and discrepancies. An operator recovering from a second interruption can use those records to see which pages were processed and which deposits still need attention.

After a WebSocket disconnect, known deposit IDs and an overlapping scan for missed deposits feed the same transaction and ledger checks. Matching credits are applied once and discrepancies go to review.

Test the deposit flow before launch

Use an enabled test configuration under the applicable contract. Choose a controlled amount and a customer account with a known starting balance. For each case, capture the event or simulated interruption, the transaction state, the relevant ledger entry, the local application record, and the available balance before and after processing. Use the following outcomes as acceptance criteria.

  1. Typical deposit. Send USDT on TRON to the assigned address. If the product shows pending funds, confirm that it displays the deposit there while the available balance stays unchanged. After transaction, posting, and availability checks pass, verify one durable application and one increase of the eligible amount.
  2. Repeated notification. Process the same notification again and recheck the deposit through reconciliation. Verify that the same ledger entry resolves to the original application record and the balance stays consistent.
  3. Concurrent processing. Let two workers reach the same eligible ledger entry at the same time. Expect one committed accounting effect. Repeat with a retry after an ambiguous timeout and confirm that the available balance reflects one release.
  4. Out-of-order delivery. Deliver a confirmation and then an earlier observation. Verify that both use current records and that the later delivery preserves a completed credit. Repeat with a delayed ledger posting and confirm that the funds remain unavailable until the ledger and availability checks pass.
  5. WebSocket disconnect. Interrupt intake before the first notification for one deposit while another, already known deposit remains pending. Make both eligible during the interruption. Verify that the cursor scan finds the first and the known-ID recheck finds the second. Restart reconciliation and verify that each credit still has one application record.
  6. Ownership or amount mismatch. Introduce a controlled discrepancy between authoritative records and the local mapping or candidate credit. Verify that balance remains unchanged for that candidate and that an operator can reconstruct the exception from the stored identifiers and amounts.

Before rollout, confirm the finality criterion applicable to TRON USDT, the conditions for spending or withdrawing credited funds, the handling of corrections, and the WebSocket features exposed in your environment. Verify that read credentials reach the intended transactions and wallet ledger records. Record the contract version, test outcomes, and the owner of unresolved discrepancies. BroSettlement API reference · Operational ledger · BroSettlement reconciliation

Frequently asked questions

What should the application do on deposit.observed?

Queue a current transaction read and check the receiving destination against the saved assignment. Keep the deposit pending while confirmation, ledger posting, or availability checks are incomplete. Release funds after all applicable checks pass.

What if the transaction is CONFIRMED but the credit entry is missing?

Keep the operation unresolved and reread the wallet ledger using transactionId. If the expected entry remains absent beyond the integration’s operating threshold, open an exception using the transaction and wallet identifiers.

Which identifier should prevent duplicate credits?

Use the stable identity of the applicable ledger entry within its contract-defined scope. Use the stable event ID to identify repeated notifications. The entry identity lets distinct events and reconciliation jobs converge on one accounting effect.

Why should both deposit notifications trigger a current transaction read?

They report different points in the provider’s process and can reach the application in a different order. A fresh read provides the current transaction state. Read the related ledger entries to verify posting, then evaluate the availability rules before applying an eligible credit.

What if a deposit was created before the disconnect?

Read known unresolved transactions by ID and check their ledger entries. Use the cursor scan to discover records created inside its window. Keep tracking known older deposits because they can change state during the outage.

How many TRON confirmations should I require?

Use the criterion specified by the active integration contract. Verify how it maps to the transaction state and when your product allows the credited funds to be spent or withdrawn.

What if a later read conflicts with a credit I already applied?

Preserve the original application record, gather current transaction and ledger evidence, and open a reconciliation case. Use the correction mechanism defined by the contract and your accounting policy.

CEO & Founder at BroLabel

Former Product Lead and CEO at a crypto exchange. Builds wallet, signing, and ledger systems for crypto product teams.

TRON USDT Deposit Integration with BroSettlement