One order in two USDT settlement batches: available balance, reservations and corrections

Two individually deduplicated statements can still settle the same balance twice. Reserve the order balance atomically before confirming a batch; a paid order is not proof that its full balance remains available.

Continue by topic

Confirm the funds flow and settlement terms

This concerns merchant USDT settlement after CNY collection, currently only on TRON/TRC20. Public collection methods include WeChat Pay, Alipay and UnionPay, subject to configuration. Customer payment, business delivery and merchant receipt are separate outcomes. Owned-wallet monitoring is a different TRC20/ERC20 service with funds sent directly to the merchant wallet; its receipts do not establish collection-settlement allocations.

Onboarding confirms business/site scope, reconciliation contacts and formal integration materials. Agree eligibility, fee basis, refund holds, exchange quote, minimum settlement conditions and timing with the team. There is no assumed universal rate, deadline or daily settlement entitlement. The reservation states below describe a merchant reconciliation design, not an available public automated payout or settlement-request API.

Prepare order capacity and batch snapshots

Establish the eligible base for each original order, then record completed and in-flight allocations, refund/dispute holds and evidenced corrections. Use fixed-point amounts in agreed units and preserve fee and conversion versions. Do not subtract received USDT directly from a CNY order value. Maintain allocation capacity in one accounting unit and associate conversion and blockchain receipt through separate records.

Illustrative accounting units: an order has 100 available, batch A reserves 60, so B can reserve at most 40. A new refund hold of 20 requires a fresh capacity check; B cannot simply retain an assumed 40. An internal allocation (order_id, batch_id, amount, revision, state) table may deduplicate a batch revision, but cross-batch capacity also needs an order lock or conditional atomic update. A composite UNIQUE alone cannot cap the total allocated amount.

Reserve atomically before confirming a batch

Authenticate payment callbacks and check order, amount and currency, then record payment and business credit once. Do not create another settlement request on every callback. Within one transaction lock the relevant orders, recalculate remaining capacity, and persist allocations plus a batch snapshot. Lock multiple orders in a stable order; any deadlock retry must restart the whole transaction with bounded, audited attempts. Exporting first and reducing capacity later leaves a race.

Simulate A and B each requesting 80 from the same 100. After the first commit, the other must reject insufficient capacity or create an explicitly reviewed revision. Do not silently reduce it to 20 under the old quote. Keep batch references, order allocation references and amount summaries traceable. If a submitted batch has unknown acceptance or transfer status, keep its reservation and investigate using the same reference rather than allocating again under a new number.

Resolve duplicate allocation and reconcile

An order appearing twice may reflect legitimate partial settlement or duplicate display. Check effective revisions, acceptance and actual transfers first. Authorized cancellation can release an unexecuted allocation. Preserve completed settlement history and use a referenced correction and agreed later adjustment for an executed duplicate. Offsets, refunds and supplements require agreement; do not ask the customer to repay or treat an on-chain transfer as a reversible database row.

Test concurrent reservation, batch replay, transaction rollback, refund holds and recovery from unknown status. Effective reservations must not exceed the confirmed eligible capacity. Reconcile original orders, allocations, batch revisions, team confirmations and TRC20 transfer evidence daily. Split transfers are possible only with an explainable total. Use isolated simulated evidence without real payments or customer queries; separately verify destination, network, asset and confirmed receipt.

Frequently asked questions

Does an order in two batches always mean duplication?

No. Authorized partial settlement can span batches. Check effective allocation totals, revision states and execution evidence, not just the order ID.

Can a timeout immediately release a reservation?

No. Resolve acceptance and transfer status using the original reference. Unknown results retain the in-flight reservation to prevent a second allocation.

References