curl --request POST \
--url https://api.example.com/v1/public/deposits \
--header 'Content-Type: application/json' \
--header 'X-Signature: <api-key>' \
--data '
{
"assetCode": "USDT_TRC20",
"orderId": "order_42_abc",
"expectedAmount": "100.50",
"comment": "User #42 deposit",
"lifetime": 3600,
"accuracyPaymentPercent": 1,
"allowTopUp": true,
"urlCallback": "https://shop.example.com/webhooks/wallet"
}
'import requests
url = "https://api.example.com/v1/public/deposits"
payload = {
"assetCode": "USDT_TRC20",
"orderId": "order_42_abc",
"expectedAmount": "100.50",
"comment": "User #42 deposit",
"lifetime": 3600,
"accuracyPaymentPercent": 1,
"allowTopUp": True,
"urlCallback": "https://shop.example.com/webhooks/wallet"
}
headers = {
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Signature': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetCode: 'USDT_TRC20',
orderId: 'order_42_abc',
expectedAmount: '100.50',
comment: 'User #42 deposit',
lifetime: 3600,
accuracyPaymentPercent: 1,
allowTopUp: true,
urlCallback: 'https://shop.example.com/webhooks/wallet'
})
};
fetch('https://api.example.com/v1/public/deposits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/public/deposits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assetCode' => 'USDT_TRC20',
'orderId' => 'order_42_abc',
'expectedAmount' => '100.50',
'comment' => 'User #42 deposit',
'lifetime' => 3600,
'accuracyPaymentPercent' => 1,
'allowTopUp' => true,
'urlCallback' => 'https://shop.example.com/webhooks/wallet'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Signature: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/public/deposits"
payload := strings.NewReader("{\n \"assetCode\": \"USDT_TRC20\",\n \"orderId\": \"order_42_abc\",\n \"expectedAmount\": \"100.50\",\n \"comment\": \"User #42 deposit\",\n \"lifetime\": 3600,\n \"accuracyPaymentPercent\": 1,\n \"allowTopUp\": true,\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/public/deposits")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assetCode\": \"USDT_TRC20\",\n \"orderId\": \"order_42_abc\",\n \"expectedAmount\": \"100.50\",\n \"comment\": \"User #42 deposit\",\n \"lifetime\": 3600,\n \"accuracyPaymentPercent\": 1,\n \"allowTopUp\": true,\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/deposits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetCode\": \"USDT_TRC20\",\n \"orderId\": \"order_42_abc\",\n \"expectedAmount\": \"100.50\",\n \"comment\": \"User #42 deposit\",\n \"lifetime\": 3600,\n \"accuracyPaymentPercent\": 1,\n \"allowTopUp\": true,\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "order_42_abc",
"address": "TXYZ...abcd",
"memo": "WP-1A2B3C4D",
"assetCode": "USDT_TRC20",
"expectedAmount": "100.50",
"status": "check",
"expiresAt": "2023-11-07T05:31:56Z",
"explorerAddressUrl": "https://tronscan.org/#/address/TXYZ",
"transaction": {
"networkStatus": "confirmed",
"receivedAmount": "100.500000",
"txhash": "a1b2c3...e9f0",
"confirmations": 12,
"requiredConfirmations": 19,
"blockNumber": "65123456",
"explorerTxUrl": "https://tronscan.org/#/transaction/a1b2c3",
"detectedAt": "2023-11-07T05:31:56Z",
"paidAt": "2023-11-07T05:31:56Z",
"fromAddress": "<string>"
},
"network": "TRON",
"isFinal": false,
"amountUsd": "100.50",
"rateUsd": "1.00",
"commission": "0.50",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"accuracyPaymentPercent": "1.00",
"allowTopUp": false,
"topUp": {
"enabled": true,
"waiting": true,
"remainingAmount": "39.5",
"closedAt": "2023-11-07T05:31:56Z",
"txs": [
{
"txhash": "<string>",
"amount": "10.5",
"fromAddress": "<string>",
"confirmations": 3,
"requiredConfirmations": 19,
"confirmed": false,
"detectedAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z"
}
]
},
"staticAddress": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "customer-42",
"label": "Ivan"
},
"refund": {
"payoutUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending_approval",
"amount": "95.5",
"destinationAddress": "TXYZ…",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Create new deposit request
Создаёт депозит и возвращает адрес (+ memo для memo-based сетей) для оплаты. Идемпотентно по (site, order_id, asset) и опц. X-Idempotency-Key.
curl --request POST \
--url https://api.example.com/v1/public/deposits \
--header 'Content-Type: application/json' \
--header 'X-Signature: <api-key>' \
--data '
{
"assetCode": "USDT_TRC20",
"orderId": "order_42_abc",
"expectedAmount": "100.50",
"comment": "User #42 deposit",
"lifetime": 3600,
"accuracyPaymentPercent": 1,
"allowTopUp": true,
"urlCallback": "https://shop.example.com/webhooks/wallet"
}
'import requests
url = "https://api.example.com/v1/public/deposits"
payload = {
"assetCode": "USDT_TRC20",
"orderId": "order_42_abc",
"expectedAmount": "100.50",
"comment": "User #42 deposit",
"lifetime": 3600,
"accuracyPaymentPercent": 1,
"allowTopUp": True,
"urlCallback": "https://shop.example.com/webhooks/wallet"
}
headers = {
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Signature': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetCode: 'USDT_TRC20',
orderId: 'order_42_abc',
expectedAmount: '100.50',
comment: 'User #42 deposit',
lifetime: 3600,
accuracyPaymentPercent: 1,
allowTopUp: true,
urlCallback: 'https://shop.example.com/webhooks/wallet'
})
};
fetch('https://api.example.com/v1/public/deposits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/public/deposits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assetCode' => 'USDT_TRC20',
'orderId' => 'order_42_abc',
'expectedAmount' => '100.50',
'comment' => 'User #42 deposit',
'lifetime' => 3600,
'accuracyPaymentPercent' => 1,
'allowTopUp' => true,
'urlCallback' => 'https://shop.example.com/webhooks/wallet'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Signature: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/public/deposits"
payload := strings.NewReader("{\n \"assetCode\": \"USDT_TRC20\",\n \"orderId\": \"order_42_abc\",\n \"expectedAmount\": \"100.50\",\n \"comment\": \"User #42 deposit\",\n \"lifetime\": 3600,\n \"accuracyPaymentPercent\": 1,\n \"allowTopUp\": true,\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/public/deposits")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assetCode\": \"USDT_TRC20\",\n \"orderId\": \"order_42_abc\",\n \"expectedAmount\": \"100.50\",\n \"comment\": \"User #42 deposit\",\n \"lifetime\": 3600,\n \"accuracyPaymentPercent\": 1,\n \"allowTopUp\": true,\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/deposits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetCode\": \"USDT_TRC20\",\n \"orderId\": \"order_42_abc\",\n \"expectedAmount\": \"100.50\",\n \"comment\": \"User #42 deposit\",\n \"lifetime\": 3600,\n \"accuracyPaymentPercent\": 1,\n \"allowTopUp\": true,\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "order_42_abc",
"address": "TXYZ...abcd",
"memo": "WP-1A2B3C4D",
"assetCode": "USDT_TRC20",
"expectedAmount": "100.50",
"status": "check",
"expiresAt": "2023-11-07T05:31:56Z",
"explorerAddressUrl": "https://tronscan.org/#/address/TXYZ",
"transaction": {
"networkStatus": "confirmed",
"receivedAmount": "100.500000",
"txhash": "a1b2c3...e9f0",
"confirmations": 12,
"requiredConfirmations": 19,
"blockNumber": "65123456",
"explorerTxUrl": "https://tronscan.org/#/transaction/a1b2c3",
"detectedAt": "2023-11-07T05:31:56Z",
"paidAt": "2023-11-07T05:31:56Z",
"fromAddress": "<string>"
},
"network": "TRON",
"isFinal": false,
"amountUsd": "100.50",
"rateUsd": "1.00",
"commission": "0.50",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"accuracyPaymentPercent": "1.00",
"allowTopUp": false,
"topUp": {
"enabled": true,
"waiting": true,
"remainingAmount": "39.5",
"closedAt": "2023-11-07T05:31:56Z",
"txs": [
{
"txhash": "<string>",
"amount": "10.5",
"fromAddress": "<string>",
"confirmations": 3,
"requiredConfirmations": 19,
"confirmed": false,
"detectedAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z"
}
]
},
"staticAddress": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "customer-42",
"label": "Ivan"
},
"refund": {
"payoutUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending_approval",
"amount": "95.5",
"destinationAddress": "TXYZ…",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
HMAC-SHA256-Hex(timestamp + "." + raw_body, api_secret)
Body
"USDT_TRC20"
order_id обменника. Уникален per site_id + asset. Если не указан — генерируется автоматически (уникальный код вида NNNN-NNNN-NNNN).
"order_42_abc"
Ожидаемая сумма как decimal-строка. По умолчанию — мин. сумма приёма валюты (asset.minDepositAmount).
"100.50"
Опциональный комментарий
"User #42 deposit"
1.4.0: срок жизни депозита в секундах (окно мониторинга адреса). По умолчанию — окно сети из настроек (обычно 24 ч). Диапазон 300 с … 30 дней. По истечении депозит получает статус expired (оживляется через POST /deposits/{uuid}/refresh, если tx всё же пришла).
300 <= x <= 25920003600
1.4.0: допуск недоплаты в процентах именно для этого депозита (Heleket accuracy_payment_percent): received ≥ expected × (1 − N/100) считается оплаченным (paid). По умолчанию — настройка сайта / платформы.
0 <= x <= 1001
1.4.0: режим доплаты. При недоплате депозит остаётся открытым до конца окна мониторинга: клиент досылает недостающую сумму на тот же адрес, суммы складываются (wrong_amount → paid). В ответе — объект topUp с remainingAmount и списком доплат. По умолчанию — настройка сайта.
true
1.4.0: webhook-URL именно для этого депозита (вместо callback_url сайта). Публичный http(s) хост.
"https://shop.example.com/webhooks/wallet"
Response
Депозит создан (или возвращён существующий).
Публичный идентификатор депозита (используйте в GET /{uuid}).
Ваш order_id (label), переданный при создании.
"order_42_abc"
Адрес для оплаты. Для memo-based сетей (TON) — общий приёмный адрес + memo.
"TXYZ...abcd"
Memo/comment (ОБЯЗАТЕЛЕН для memo-based сетей, иначе null).
"WP-1A2B3C4D"
"USDT_TRC20"
Ожидаемая сумма (string). 0 = принимаем любую сумму.
"100.50"
Бизнес-статус депозита (полный набор). Поток: check → process → confirm_check → paid | paid_over | wrong_amount. Терминальные/прочие: expired (окно мониторинга истекло), cancel, fail, system_fail, refund_process → refund_paid | refund_fail.
check, process, confirm_check, paid, paid_over, wrong_amount, expired, cancel, fail, system_fail, refund_process, refund_paid, refund_fail "check"
До какого момента сеть мониторится на оплату.
Ссылка на адрес в explorer.
"https://tronscan.org/#/address/TXYZ"
On-chain данные incoming-транзакции. null пока депозит не получил ни одной tx.
Show child attributes
Show child attributes
1.4.0: сеть актива.
"TRON"
1.4.0: терминальный ли статус — можно прекращать поллинг.
false
1.4.0: оценка суммы в USD (полученной, иначе ожидаемой).
"100.50"
1.4.0: курс актива к USD на момент ответа.
"1.00"
1.4.0: комиссия обменника (если учёт включён и депозит финализирован).
"0.50"
1.4.0: время создания депозита.
1.4.0: время последнего изменения статуса.
1.4.0: допуск недоплаты (%) для этого депозита; null — по настройкам сайта/платформы.
"1.00"
1.4.0: режим доплаты включён.
false
1.4.0: состояние режима доплаты (null, если выключен).
Show child attributes
Show child attributes
1.4.0: платёж на статический адрес — ссылка на родительский адрес (null для обычных депозитов).
Show child attributes
Show child attributes
1.4.0: последняя выплата-возврат депозита (null — возврат не запрашивался).
Show child attributes
Show child attributes