curl --request POST \
--url https://api.oblodai.com/v1/payment/batch \
--header 'Content-Type: application/json' \
--header 'X-Public-Id: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>' \
--data '
{
"payments": [
{
"amount": "10",
"currency": "USD",
"accuracy_payment_percent": 123,
"additional_data": "<string>",
"is_payment_multiple": true,
"is_refresh": true,
"lifetime": 3600,
"network": "tron",
"order_id": "order-1",
"payer_email": "<string>",
"subtract": 123,
"theme": "dark",
"to_currency": "USDT",
"url_callback": "<string>",
"url_return": "<string>",
"url_success": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oblodai.com/v1/payment/batch",
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([
'payments' => [
[
'amount' => '10',
'currency' => 'USD',
'accuracy_payment_percent' => 123,
'additional_data' => '<string>',
'is_payment_multiple' => true,
'is_refresh' => true,
'lifetime' => 3600,
'network' => 'tron',
'order_id' => 'order-1',
'payer_email' => '<string>',
'subtract' => 123,
'theme' => 'dark',
'to_currency' => 'USDT',
'url_callback' => '<string>',
'url_return' => '<string>',
'url_success' => '<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({
payments: [
{
amount: '10',
currency: 'USD',
accuracy_payment_percent: 123,
additional_data: '<string>',
is_payment_multiple: true,
is_refresh: true,
lifetime: 3600,
network: 'tron',
order_id: 'order-1',
payer_email: '<string>',
subtract: 123,
theme: 'dark',
to_currency: 'USDT',
url_callback: '<string>',
url_return: '<string>',
url_success: '<string>'
}
]
})
};
fetch('https://api.oblodai.com/v1/payment/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oblodai.com/v1/payment/batch"
payload = { "payments": [
{
"amount": "10",
"currency": "USD",
"accuracy_payment_percent": 123,
"additional_data": "<string>",
"is_payment_multiple": True,
"is_refresh": True,
"lifetime": 3600,
"network": "tron",
"order_id": "order-1",
"payer_email": "<string>",
"subtract": 123,
"theme": "dark",
"to_currency": "USDT",
"url_callback": "<string>",
"url_return": "<string>",
"url_success": "<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/payment/batch"
payload := strings.NewReader("{\n \"payments\": [\n {\n \"amount\": \"10\",\n \"currency\": \"USD\",\n \"accuracy_payment_percent\": 123,\n \"additional_data\": \"<string>\",\n \"is_payment_multiple\": true,\n \"is_refresh\": true,\n \"lifetime\": 3600,\n \"network\": \"tron\",\n \"order_id\": \"order-1\",\n \"payer_email\": \"<string>\",\n \"subtract\": 123,\n \"theme\": \"dark\",\n \"to_currency\": \"USDT\",\n \"url_callback\": \"<string>\",\n \"url_return\": \"<string>\",\n \"url_success\": \"<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))
}{
"result": {
"batch_id": "9f4c1a2b-77de-4a55-9c1f-0e2b3d4a5f60",
"count": 2,
"kind": "payment",
"status": "pending"
},
"state": 0
}Массовое создание платежей
До 5000 платежей за ОДИН запрос (одна отметка rate-limit). Каждый элемент — обычный объект /v1/payment (разные валюты/сети допустимы). В ответ сразу приходит batch_id; обработка идёт в фоне. Статус и результаты (включая uuid и ссылку оплаты каждого платежа) — через /v1/batch/info.
on_error: continue (по умолчанию — ошибка одного не мешает остальным) или stop (после первой ошибки оставшиеся отменяются). Каждый элемент идемпотентен по своему order_id; вся пачка — по заголовку Idempotency-Key.
curl --request POST \
--url https://api.oblodai.com/v1/payment/batch \
--header 'Content-Type: application/json' \
--header 'X-Public-Id: <api-key>' \
--header 'X-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>' \
--data '
{
"payments": [
{
"amount": "10",
"currency": "USD",
"accuracy_payment_percent": 123,
"additional_data": "<string>",
"is_payment_multiple": true,
"is_refresh": true,
"lifetime": 3600,
"network": "tron",
"order_id": "order-1",
"payer_email": "<string>",
"subtract": 123,
"theme": "dark",
"to_currency": "USDT",
"url_callback": "<string>",
"url_return": "<string>",
"url_success": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oblodai.com/v1/payment/batch",
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([
'payments' => [
[
'amount' => '10',
'currency' => 'USD',
'accuracy_payment_percent' => 123,
'additional_data' => '<string>',
'is_payment_multiple' => true,
'is_refresh' => true,
'lifetime' => 3600,
'network' => 'tron',
'order_id' => 'order-1',
'payer_email' => '<string>',
'subtract' => 123,
'theme' => 'dark',
'to_currency' => 'USDT',
'url_callback' => '<string>',
'url_return' => '<string>',
'url_success' => '<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({
payments: [
{
amount: '10',
currency: 'USD',
accuracy_payment_percent: 123,
additional_data: '<string>',
is_payment_multiple: true,
is_refresh: true,
lifetime: 3600,
network: 'tron',
order_id: 'order-1',
payer_email: '<string>',
subtract: 123,
theme: 'dark',
to_currency: 'USDT',
url_callback: '<string>',
url_return: '<string>',
url_success: '<string>'
}
]
})
};
fetch('https://api.oblodai.com/v1/payment/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oblodai.com/v1/payment/batch"
payload = { "payments": [
{
"amount": "10",
"currency": "USD",
"accuracy_payment_percent": 123,
"additional_data": "<string>",
"is_payment_multiple": True,
"is_refresh": True,
"lifetime": 3600,
"network": "tron",
"order_id": "order-1",
"payer_email": "<string>",
"subtract": 123,
"theme": "dark",
"to_currency": "USDT",
"url_callback": "<string>",
"url_return": "<string>",
"url_success": "<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/payment/batch"
payload := strings.NewReader("{\n \"payments\": [\n {\n \"amount\": \"10\",\n \"currency\": \"USD\",\n \"accuracy_payment_percent\": 123,\n \"additional_data\": \"<string>\",\n \"is_payment_multiple\": true,\n \"is_refresh\": true,\n \"lifetime\": 3600,\n \"network\": \"tron\",\n \"order_id\": \"order-1\",\n \"payer_email\": \"<string>\",\n \"subtract\": 123,\n \"theme\": \"dark\",\n \"to_currency\": \"USDT\",\n \"url_callback\": \"<string>\",\n \"url_return\": \"<string>\",\n \"url_success\": \"<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))
}{
"result": {
"batch_id": "9f4c1a2b-77de-4a55-9c1f-0e2b3d4a5f60",
"count": 2,
"kind": "payment",
"status": "pending"
},
"state": 0
}Авторизации
pk_live_… для платёжных эндпоинтов, wk_live_… для выплат/возвратов.
hex(HMAC-SHA256(секрет, "\n<МЕТОД>\n<путь>\n<тело>"))
Текущее время Unix в секундах (в пределах допустимого расхождения).
Тело
Массив от 1 до 5000 элементов — те же поля, что у POST /v1/payment; задавайте order_id каждому элементу: по нему сопоставляются результаты и он защищает от дублей.
Show child attributes
Show child attributes
Что делать при ошибке элемента: continue (по умолчанию) — обрабатывать остальные; stop — прекратить обработку после первой ошибки.
"continue"