Query Deposit Records — getDeposits
Returns a paginated list of credited deposits for your merchant account, optionally filtered by currency. Useful for reconciliation and for verifying deposits that may have missed a callback.
| Item | Value |
|---|---|
| Endpoint | POST https://api.anonypay.io/api/merchant/getDeposits |
| Request body | RSA-OAEP-encrypted ciphertext of the business JSON (see Encryption & Signing Protocol) |
| Request headers | ANONY-APP-ID / ANONY-TOKEN / ANONY-TIMESTAMP / ANONY-NONCE / ANONY-SIGN |
| Prerequisite | Call getToken first to obtain an ANONY-TOKEN |
USDC deposits on TRON are disabled
USDC transfers sent to TRON addresses are no longer accepted: funds are not credited, no callback is fired, and such transfers will not appear in this endpoint's results. Do not direct users to deposit USDC on TRON. USDT/USDC on other chains and native-coin deposits on all chains are unaffected.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
currency | string | No | Filter by currency symbol (e.g. trx.usdt); omit to query all currencies |
page | int | No | Page number, defaults to 1 |
limit | int | No | Records per page, defaults to 10, maximum 100 |
For the full list of currency symbols, see the API Conventions page, or fetch them dynamically via the public getCurrencies endpoint.
limit range is strictly validated
When limit is omitted it defaults to 10. Once provided, however, any value greater than 100 or less than 1 fails immediately with limitError — the API does not clamp it to the boundary. Validate the range on your side before sending.
Response
When code == 10000, data — after signature verification and decryption — is an array whose elements carry exactly the same fields as the deposit callback:
| Field | Type | Description |
|---|---|---|
businessType | string | Always deposit |
txid | string | On-chain transaction hash |
address | string | Receiving address |
addressType | string | Address type (live: trx/solana/eth_bnb/ton; btc is reserved) |
fromAddress | string | Sender address |
amount | string | Credited amount |
currency | string | Currency symbol |
fee | string | Fee |
apiOrder | string | Platform order ID |
userOrder | string | Merchant order ID (supplied when the address was created) |
Example of the decrypted data:
json
[
{
"businessType": "deposit",
"txid": "d5b2...c91a",
"address": "TXyz...abcd",
"addressType": "trx",
"fromAddress": "TAbc...wxyz",
"amount": "100.000000",
"currency": "trx.usdt",
"fee": "1.000000",
"apiOrder": "P20260708...",
"userOrder": "A1001"
}
]Amount fields are strings. Never compare them as floating-point numbers — use a decimal library instead.
Code Examples
All examples below use the official SDKs (see the SDK Overview); see getToken for how to obtain a token.
php
require 'AnonyV2Client.php';
$client = new AnonyV2Client($appId, $serverPublicKeyB64, $merchantPrivateKeyB64);
$token = $client->getToken($secret);
// Query trx.usdt, page 1, 20 records per page
$res = $client->post('getDeposits', [
'currency' => 'trx.usdt',
'page' => 1,
'limit' => 20,
], $token);
// $res['data'] is already verified and decrypted — an array of deposit records
foreach ($res['data'] as $item) {
echo $item['userOrder'] . ' ' . $item['amount'] . ' ' . $item['currency'] . PHP_EOL;
}python
from anony_v2 import AnonyV2Client
import requests
c = AnonyV2Client(app_id, server_pub_b64, merchant_priv_b64)
# See the getToken page for how to obtain a token
req = c.build_request({"currency": "trx.usdt", "page": 1, "limit": 20}, token)
r = requests.post(c.base_url + "getDeposits", data=req["body"], headers=req["headers"])
body = r.json()
if body["code"] == 10000:
deposits = c.verify_response(body["data"], r.headers["ANONY-TIMESTAMP"],
r.headers["ANONY-NONCE"], r.headers["ANONY-SIGN"])
for item in deposits:
print(item["userOrder"], item["amount"], item["currency"])js
const { AnonyV2Client } = require('./anony_v2');
const c = new AnonyV2Client(appId, serverPubB64, merchantPrivB64);
const token = await c.getToken(secret); // Node ≥18
const req = c.buildRequest({ currency: 'trx.usdt', page: 1, limit: 20 }, token);
const r = await fetch(c.baseUrl + 'getDeposits', { method: 'POST', body: req.body, headers: req.headers });
const body = await r.json();
if (body.code === 10000) {
const deposits = c.verifyResponse(body.data, r.headers.get('anony-timestamp'),
r.headers.get('anony-nonce'), r.headers.get('anony-sign'));
for (const item of deposits) {
console.log(item.userOrder, item.amount, item.currency);
}
}Common Errors
When code != 10000, message contains the error reason and data is empty. Errors specific to this endpoint:
| message | Description |
|---|---|
limitError | limit is greater than 100 or less than 1 |
tokenExpired | Token has expired — call getToken again |
signatureFailed | Signature, timestamp-window, or nonce validation failed; see the Troubleshooting Guide |
Oops (plain text) | Source IP is not on the whitelist |
For the full list, see Error Codes.
Related Pages
- Deposit Callback — real-time credit notifications (same fields as the elements returned by this endpoint)
- createAddress — Create a Deposit Address
- API Conventions & Enums