Массовая выплата
curl --request POST \
--url https://api.oblodai.com/v1/payout/mass \
--header 'Content-Type: application/json' \
--header 'X-Public-Id: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>' \
--data '
{
"payouts": [
{
"address": "<string>",
"amount": "25",
"currency": "USDT",
"order_id": "payout-1",
"from_currency": "USDT",
"is_subtract": true,
"memo": "<string>",
"network": "tron",
"source": "<string>",
"url_callback": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oblodai.com/v1/payout/mass",
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([
'payouts' => [
[
'address' => '<string>',
'amount' => '25',
'currency' => 'USDT',
'order_id' => 'payout-1',
'from_currency' => 'USDT',
'is_subtract' => true,
'memo' => '<string>',
'network' => 'tron',
'source' => '<string>',
'url_callback' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Public-Id: <api-key>",
"X-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {
'X-Public-Id': '<api-key>',
'X-Signature': '<api-key>',
'X-Timestamp': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payouts: [
{
address: '<string>',
amount: '25',
currency: 'USDT',
order_id: 'payout-1',
from_currency: 'USDT',
is_subtract: true,
memo: '<string>',
network: 'tron',
source: '<string>',
url_callback: '<string>'
}
]
})
};
fetch('https://api.oblodai.com/v1/payout/mass', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oblodai.com/v1/payout/mass"
payload = { "payouts": [
{
"address": "<string>",
"amount": "25",
"currency": "USDT",
"order_id": "payout-1",
"from_currency": "USDT",
"is_subtract": True,
"memo": "<string>",
"network": "tron",
"source": "<string>",
"url_callback": "<string>"
}
] }
headers = {
"X-Public-Id": "<api-key>",
"X-Signature": "<api-key>",
"X-Timestamp": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.oblodai.com/v1/payout/mass"
payload := strings.NewReader("{\n \"payouts\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"25\",\n \"currency\": \"USDT\",\n \"order_id\": \"payout-1\",\n \"from_currency\": \"USDT\",\n \"is_subtract\": true,\n \"memo\": \"<string>\",\n \"network\": \"tron\",\n \"source\": \"<string>\",\n \"url_callback\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Public-Id", "<api-key>")
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Timestamp", "<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))
}Массовая выплата
Много выплат за один запрос (до 100). Каждая независима: ошибка по одной не останавливает остальные, по каждой возвращается результат. Идемпотентно по order_id, как обычная выплата.
POST
/
v1
/
payout
/
mass
Массовая выплата
curl --request POST \
--url https://api.oblodai.com/v1/payout/mass \
--header 'Content-Type: application/json' \
--header 'X-Public-Id: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>' \
--data '
{
"payouts": [
{
"address": "<string>",
"amount": "25",
"currency": "USDT",
"order_id": "payout-1",
"from_currency": "USDT",
"is_subtract": true,
"memo": "<string>",
"network": "tron",
"source": "<string>",
"url_callback": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oblodai.com/v1/payout/mass",
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([
'payouts' => [
[
'address' => '<string>',
'amount' => '25',
'currency' => 'USDT',
'order_id' => 'payout-1',
'from_currency' => 'USDT',
'is_subtract' => true,
'memo' => '<string>',
'network' => 'tron',
'source' => '<string>',
'url_callback' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Public-Id: <api-key>",
"X-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'POST',
headers: {
'X-Public-Id': '<api-key>',
'X-Signature': '<api-key>',
'X-Timestamp': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payouts: [
{
address: '<string>',
amount: '25',
currency: 'USDT',
order_id: 'payout-1',
from_currency: 'USDT',
is_subtract: true,
memo: '<string>',
network: 'tron',
source: '<string>',
url_callback: '<string>'
}
]
})
};
fetch('https://api.oblodai.com/v1/payout/mass', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oblodai.com/v1/payout/mass"
payload = { "payouts": [
{
"address": "<string>",
"amount": "25",
"currency": "USDT",
"order_id": "payout-1",
"from_currency": "USDT",
"is_subtract": True,
"memo": "<string>",
"network": "tron",
"source": "<string>",
"url_callback": "<string>"
}
] }
headers = {
"X-Public-Id": "<api-key>",
"X-Signature": "<api-key>",
"X-Timestamp": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.oblodai.com/v1/payout/mass"
payload := strings.NewReader("{\n \"payouts\": [\n {\n \"address\": \"<string>\",\n \"amount\": \"25\",\n \"currency\": \"USDT\",\n \"order_id\": \"payout-1\",\n \"from_currency\": \"USDT\",\n \"is_subtract\": true,\n \"memo\": \"<string>\",\n \"network\": \"tron\",\n \"source\": \"<string>\",\n \"url_callback\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Public-Id", "<api-key>")
req.Header.Add("X-Signature", "<api-key>")
req.Header.Add("X-Timestamp", "<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))
}Авторизации
pk_live_… для платёжных эндпоинтов, wk_live_… для выплат/возвратов.
hex(HMAC-SHA256(секрет, "\n<МЕТОД>\n<путь>\n<тело>"))
Текущее время Unix в секундах (в пределах допустимого расхождения).
Тело
application/json
Ответ
200
Success
⌘I