curl --request POST \
--url https://api.example.com/v1/public/payouts \
--header 'Content-Type: application/json' \
--header 'X-Signature: <api-key>' \
--data '
{
"orderId": "<string>",
"assetCode": "USDT_TRC20",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amount": "50.00",
"destinationMemo": "WP-XXXXXXXX",
"priority": "recommended",
"urlCallback": "https://shop.example.com/webhooks/wallet"
}
'import requests
url = "https://api.example.com/v1/public/payouts"
payload = {
"orderId": "<string>",
"assetCode": "USDT_TRC20",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amount": "50.00",
"destinationMemo": "WP-XXXXXXXX",
"priority": "recommended",
"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({
orderId: '<string>',
assetCode: 'USDT_TRC20',
destinationAddress: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
amount: '50.00',
destinationMemo: 'WP-XXXXXXXX',
priority: 'recommended',
urlCallback: 'https://shop.example.com/webhooks/wallet'
})
};
fetch('https://api.example.com/v1/public/payouts', 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/payouts",
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([
'orderId' => '<string>',
'assetCode' => 'USDT_TRC20',
'destinationAddress' => 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
'amount' => '50.00',
'destinationMemo' => 'WP-XXXXXXXX',
'priority' => 'recommended',
'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/payouts"
payload := strings.NewReader("{\n \"orderId\": \"<string>\",\n \"assetCode\": \"USDT_TRC20\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"amount\": \"50.00\",\n \"destinationMemo\": \"WP-XXXXXXXX\",\n \"priority\": \"recommended\",\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/payouts")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"<string>\",\n \"assetCode\": \"USDT_TRC20\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"amount\": \"50.00\",\n \"destinationMemo\": \"WP-XXXXXXXX\",\n \"priority\": \"recommended\",\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/payouts")
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 \"orderId\": \"<string>\",\n \"assetCode\": \"USDT_TRC20\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"amount\": \"50.00\",\n \"destinationMemo\": \"WP-XXXXXXXX\",\n \"priority\": \"recommended\",\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "payout_77",
"status": "queued",
"assetCode": "USDT_TRC20",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"destinationMemo": null,
"amount": "50.000000",
"requiresApproval": false,
"txHash": "a1b2c3...e9f0",
"confirmations": 12,
"requiredConfirmations": 19,
"networkStatus": "confirmed",
"explorerTxUrl": "https://tronscan.org/#/transaction/a1b2c3",
"failReason": "<string>",
"approvedAt": "2023-11-07T05:31:56Z",
"broadcastedAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"network": "TRON",
"isFinal": false,
"priority": "recommended",
"amountUsd": "50.00",
"rateUsd": "1.00",
"commission": "<string>",
"networkFee": "<string>"
}Create payout request
Создаёт выплату на указанный адрес. Идемпотентно по (site, order_id) и опц. X-Idempotency-Key. Может потребовать ручного одобрения (requiresApproval=true).
curl --request POST \
--url https://api.example.com/v1/public/payouts \
--header 'Content-Type: application/json' \
--header 'X-Signature: <api-key>' \
--data '
{
"orderId": "<string>",
"assetCode": "USDT_TRC20",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amount": "50.00",
"destinationMemo": "WP-XXXXXXXX",
"priority": "recommended",
"urlCallback": "https://shop.example.com/webhooks/wallet"
}
'import requests
url = "https://api.example.com/v1/public/payouts"
payload = {
"orderId": "<string>",
"assetCode": "USDT_TRC20",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amount": "50.00",
"destinationMemo": "WP-XXXXXXXX",
"priority": "recommended",
"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({
orderId: '<string>',
assetCode: 'USDT_TRC20',
destinationAddress: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
amount: '50.00',
destinationMemo: 'WP-XXXXXXXX',
priority: 'recommended',
urlCallback: 'https://shop.example.com/webhooks/wallet'
})
};
fetch('https://api.example.com/v1/public/payouts', 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/payouts",
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([
'orderId' => '<string>',
'assetCode' => 'USDT_TRC20',
'destinationAddress' => 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
'amount' => '50.00',
'destinationMemo' => 'WP-XXXXXXXX',
'priority' => 'recommended',
'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/payouts"
payload := strings.NewReader("{\n \"orderId\": \"<string>\",\n \"assetCode\": \"USDT_TRC20\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"amount\": \"50.00\",\n \"destinationMemo\": \"WP-XXXXXXXX\",\n \"priority\": \"recommended\",\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/payouts")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"orderId\": \"<string>\",\n \"assetCode\": \"USDT_TRC20\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"amount\": \"50.00\",\n \"destinationMemo\": \"WP-XXXXXXXX\",\n \"priority\": \"recommended\",\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/payouts")
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 \"orderId\": \"<string>\",\n \"assetCode\": \"USDT_TRC20\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"amount\": \"50.00\",\n \"destinationMemo\": \"WP-XXXXXXXX\",\n \"priority\": \"recommended\",\n \"urlCallback\": \"https://shop.example.com/webhooks/wallet\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"orderId": "payout_77",
"status": "queued",
"assetCode": "USDT_TRC20",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"destinationMemo": null,
"amount": "50.000000",
"requiresApproval": false,
"txHash": "a1b2c3...e9f0",
"confirmations": 12,
"requiredConfirmations": 19,
"networkStatus": "confirmed",
"explorerTxUrl": "https://tronscan.org/#/transaction/a1b2c3",
"failReason": "<string>",
"approvedAt": "2023-11-07T05:31:56Z",
"broadcastedAt": "2023-11-07T05:31:56Z",
"confirmedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"network": "TRON",
"isFinal": false,
"priority": "recommended",
"amountUsd": "50.00",
"rateUsd": "1.00",
"commission": "<string>",
"networkFee": "<string>"
}Authorizations
HMAC-SHA256-Hex(timestamp + "." + raw_body, api_secret)
Body
"USDT_TRC20"
"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
"50.00"
Memo для memo-based сетей (TON Jetton)
"WP-XXXXXXXX"
1.4.0: приоритет сетевой комиссии. economy — дешевле/дольше, high — дороже/быстрее. Учитывается сетями с рынком комиссий (EVM gas, UTXO sat/vB); остальные игнорируют.
economy, recommended, high 1.4.0: webhook-URL именно для этой выплаты (вместо callback_url сайта). Публичный http(s) хост.
"https://shop.example.com/webhooks/wallet"
Response
Выплата создана (или возвращена существующая).
Публичный идентификатор выплаты.
Ваш order_id (label).
"payout_77"
Бизнес-статус выплаты (полный набор). Поток: new → pending_approval → approved → queued → signing → broadcasted → confirmed. Терминальные: rejected (отклонена оператором), failed (ошибка broadcast/revert), cancelled (отменена до подписи).
new, pending_approval, approved, rejected, queued, signing, broadcasted, confirmed, failed, cancelled "queued"
"USDT_TRC20"
Адрес получателя.
"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
Memo получателя (для memo-based сетей), иначе null.
null
Сумма выплаты (string).
"50.000000"
Требуется ли ручное одобрение оператором.
false
Хеш исходящей blockchain-tx (после broadcast). null пока не отправлена.
"a1b2c3...e9f0"
Текущее число подтверждений сети для исходящей tx. null пока не отправлена.
12
Сколько подтверждений нужно для финализации (asset.minConfirmations). null пока не отправлена.
19
On-chain статус исходящей tx: pending → mempool → confirmed | fail. null пока не отправлена.
pending, mempool, confirmed, fail "confirmed"
Ссылка на исходящую tx в explorer.
"https://tronscan.org/#/transaction/a1b2c3"
Причина ошибки (для status=failed/rejected/cancelled), иначе null.
Когда выплата одобрена оператором. null если ещё не одобрена / auto-approve.
Когда tx отправлена в сеть (broadcast). null пока не отправлена.
Когда выплата подтверждена сетью. null пока не подтверждена.
Время создания выплаты.
Время последнего обновления.
1.4.0: сеть актива.
"TRON"
1.4.0: терминальный ли статус — можно прекращать поллинг.
false
1.4.0: приоритет сетевой комиссии.
economy, recommended, high "recommended"
1.4.0: оценка суммы в USD.
"50.00"
1.4.0: курс актива к USD.
"1.00"
1.4.0: комиссия обменника (ledger), если учёт включён.
1.4.0: фактическая сетевая комиссия исходящей tx (нативная монета сети).