Settlement & Reconciliation

How 3PAY settles transactions, tracks balances, and supports reconciliation.

Settlement & Reconciliation

3PAY settles on-chain and maintains an off-chain ledger for balance tracking and fee accounting.


Deposit Settlement

  1. Customer sends USDT → payment detected on-chain
  2. Deposit fee deducted (tiered per merchant)
  3. Net amount credited to merchant balance atomically
  4. Webhook fires

Withdrawal Settlement

  1. Withdrawal request created (API or dashboard)
  2. Auto-approved or queued for merchant approval
  3. On approval: flat fee deducted, on-chain transfer executed
  4. Webhook fires with final status

Merchants approve their own withdrawals. Admin has no withdrawal management ability.


Transaction Statuses

Deposits

StatusMeaning
initiatedAwaiting payment
amount confirmedPayment detected, sweeping to merchant wallet
confirmedFunds credited
expiredInvoice expired
cancelledCancelled before payment

Withdrawals

StatusMeaning
pendingAwaiting merchant approval
completedExecuted on-chain
rejectedRejected by merchant
failedBlockchain execution failed (balance restored)

Payouts (Dashboard)

StatusMeaning
completedExecuted after OTP
failedBlockchain failed (balance restored)

Balance Model

FieldDescription
totalAmtAvailable balance
pendingAmtLocked for pending withdrawals
  • Deposits add to totalAmt
  • Withdrawals atomically move from totalAmt to pendingAmt
  • Approval sends from pendingAmt on-chain
  • Rejection/failure restores to totalAmt

All balance operations are atomic — no race conditions.


Fees

Deposits

Tiered per merchant (or legacy percentage). Fee payer configurable via depositFeePayer.

NetworkMinimum Fee
TRC201 USDT
ERC201.50 USDT

Withdrawals

NetworkFee
TRC202 USDT flat
ERC202–2.5 USDT flat

Fee payer configurable via withdrawalFeePayer. Gas costs included.

Fee Sweep

Accumulated deposit fees swept to admin wallet weekly (Saturday cron). No merchant action required.


Reconciliation

Use the on-chain transaction hash as source of truth.

GET /api/v1/public/transaction/list?status=confirmed&sortBy=confirmedAt&sortOrder=desc

Match against your records using transactionId, blockchainTxHash, amount, fee, netAmount.

Cross-reference on-chain:

  • Ethereum: https://etherscan.io/tx/{hash}
  • Tron: https://tronscan.org/#/transaction/{hash}

The dashboard also supports Excel export for offline reconciliation.

Only count confirmed/completed transactions for accounting.