Money and events
Balances and withdrawals
The payments you collect add up in a balance per coin. Withdraw it to your saved, trusted addresses from the dashboard or the API.
Balance
GET /v1/balances returns three values per coin: what you can use (available), what is held for payments flagged by screening (held) and what is reserved for withdrawals in progress (pending_withdrawals). GET /v1/balance-transactions lists the entries of the double-entry ledger.
curl https://hisarpay.com/v1/balances \
-H "Authorization: Bearer $HISARPAY_API_KEY"
curl "https://hisarpay.com/v1/balance-transactions?token=USDT&limit=50" \
-H "Authorization: Bearer $HISARPAY_API_KEY"const { data } = await hisarpay.balances.retrieve();
const history = await hisarpay.balances.transactions({ token: 'USDT', limit: 50 });$balances = $hisarpay->balances->retrieve();
$history = $hisarpay->balances->transactions(['token' => 'USDT', 'limit' => 50]);balances = client.balances.retrieve()
history = client.balances.transactions({"token": "USDT", "limit": 50}){
"data": [
{ "token": "USDT", "available": "8214.75", "held": "0", "pending_withdrawals": "251" },
{ "token": "TRX", "available": "3120.25", "held": "0", "pending_withdrawals": "0" }
]
}With test keys these endpoints return an empty list; test mode has no balance.
Trusted addresses
API and automatic withdrawals can only go to saved addresses marked as trusted. Even if your key leaks, money cannot go to an address you do not know.
- Add the address to your saved addresses in the dashboard.
- It can be marked trusted once it was added at least 7 days ago and at least 3 withdrawals to it have completed.
- An API withdrawal to an address that is not trusted returns
403 address_not_trusted.
Sending a withdrawal
Withdrawals need a live key with the withdrawals scope. The idempotency_key in the body is required and permanent: repeating the request with the same key and details opens no new withdrawal and returns the first one with 200 OK. The same key with a different amount, coin or address gets 409 idempotency_conflict.
curl -X POST https://hisarpay.com/v1/withdrawals \
-H "Authorization: Bearer $HISARPAY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: payout-2026-10-23-001" \
-d '{
"token": "USDT",
"amount": "250",
"to_address": "TPayoutAddressSavedInDashboard001",
"idempotency_key": "payout-2026-10-23-001"
}'const w = await hisarpay.withdrawals.create({
token: 'USDT',
amount: '250',
to_address: 'TPayoutAddressSavedInDashboard001',
idempotency_key: `payout-${payout.id}`,
});$w = $hisarpay->withdrawals->create([
'token' => 'USDT',
'amount' => '250',
'to_address' => 'TPayoutAddressSavedInDashboard001',
'idempotency_key' => 'payout-' . $payout->id,
]);w = client.withdrawals.create({
"token": "USDT",
"amount": "250",
"to_address": "TPayoutAddressSavedInDashboard001",
"idempotency_key": f"payout-{payout.id}",
}){
"id": "e1d2c3b4-a5f6-4e7d-8c9b-0a1b2c3d4e5f",
"object": "withdrawal",
"status": "queued",
"source": "api",
"token": "USDT",
"amount": "250",
"fee": "1",
"to_address": "TPayoutAddressSavedInDashboard001",
"idempotency_key": "payout-2026-10-23-001",
"txid": null,
"error": null,
"failure_code": null,
"created_at": "2026-10-23T12:00:00.000Z",
"completed_at": null
}Withdrawal statuses
| Status | Meaning |
|---|---|
pending_review | Above the review threshold; waiting for our team’s approval. |
queued | Waiting to be sent. |
processing | Signed and broadcast to the network. |
completed | Confirmed on chain; txid is set. Event: withdrawal.completed. |
failed | Could not be sent; amount and fee were returned to your balance. Event: withdrawal.failed. |
rejected | Rejected in review; the amount was returned. Event: withdrawal.rejected. |
Hold and failure codes
While a withdrawal waits in review or after it failed, error holds a readable explanation and failure_code a stable code. Map the code when you show messages in your own interface.
| Code | Meaning |
|---|---|
merchant_suspended | The account is suspended; the withdrawal waits in review. |
merchant_not_active | The account is not active; the withdrawal waits in review. |
merchant_frozen | Withdrawals are frozen for the account; the withdrawal waits in review. |
security_lock | Requested before a security change on the account (password reset, authenticator app removal); it waits for a review. |
address_lock | Withdrawals were restricted to saved addresses and the destination may not receive any; it waits for a review. |
signer_per_tx_limit | Above the per-transaction limit; an administrator will review it. |
broadcast_rejected | The TRON network refused the transaction; the amount is returned once it has expired. |
failed_on_chain | The transaction failed on-chain; the amount was returned. |
signer_refused | The signing service refused the transfer; the amount was returned. |
payout_error | The withdrawal could not be sent; the amount was returned. |
rejected_in_review | Rejected in review; error carries the reason. |
Fees and limits
| Rule | Value | Error |
|---|---|---|
| Withdrawal fee | 1 USDT or 1 TRX (on top of the amount) | — |
| Minimum | Worth 10 USD | 400 amount_too_small |
| Insufficient balance | Amount plus fee exceeds the available balance | 409 insufficient_balance |
| Daily limit | The USD limit set for your account | 403 limit_exceeded |
| Security lock | For 24 hours after a password reset or a change of two-step verification, or while the account is frozen | 403 withdrawals_locked |