Create managed-wallet bulk payments
curl --request POST \
--url https://api.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chain": "Sepolia",
"batch": [
{
"coin": "USDT",
"to_address": "0x2222222222222222222222222222222222222222",
"amount": "10.25",
"memo": "BulkPay"
},
{
"coin": "USDC",
"to_address": "0x3333333333333333333333333333333333333333",
"amount": "4.50",
"memo": "BulkPay"
}
],
"scheds": null
}
'import requests
url = "https://api.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}"
payload = {
"chain": "Sepolia",
"batch": [
{
"coin": "USDT",
"to_address": "0x2222222222222222222222222222222222222222",
"amount": "10.25",
"memo": "BulkPay"
},
{
"coin": "USDC",
"to_address": "0x3333333333333333333333333333333333333333",
"amount": "4.50",
"memo": "BulkPay"
}
],
"scheds": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'Sepolia',
batch: [
{
coin: 'USDT',
to_address: '0x2222222222222222222222222222222222222222',
amount: '10.25',
memo: 'BulkPay'
},
{
coin: 'USDC',
to_address: '0x3333333333333333333333333333333333333333',
amount: '4.50',
memo: 'BulkPay'
}
],
scheds: null
})
};
fetch('https://api.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}', 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.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}",
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([
'chain' => 'Sepolia',
'batch' => [
[
'coin' => 'USDT',
'to_address' => '0x2222222222222222222222222222222222222222',
'amount' => '10.25',
'memo' => 'BulkPay'
],
[
'coin' => 'USDC',
'to_address' => '0x3333333333333333333333333333333333333333',
'amount' => '4.50',
'memo' => 'BulkPay'
]
],
'scheds' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}"
payload := strings.NewReader("{\n \"chain\": \"Sepolia\",\n \"batch\": [\n {\n \"coin\": \"USDT\",\n \"to_address\": \"0x2222222222222222222222222222222222222222\",\n \"amount\": \"10.25\",\n \"memo\": \"BulkPay\"\n },\n {\n \"coin\": \"USDC\",\n \"to_address\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"4.50\",\n \"memo\": \"BulkPay\"\n }\n ],\n \"scheds\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"Sepolia\",\n \"batch\": [\n {\n \"coin\": \"USDT\",\n \"to_address\": \"0x2222222222222222222222222222222222222222\",\n \"amount\": \"10.25\",\n \"memo\": \"BulkPay\"\n },\n {\n \"coin\": \"USDC\",\n \"to_address\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"4.50\",\n \"memo\": \"BulkPay\"\n }\n ],\n \"scheds\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"Sepolia\",\n \"batch\": [\n {\n \"coin\": \"USDT\",\n \"to_address\": \"0x2222222222222222222222222222222222222222\",\n \"amount\": \"10.25\",\n \"memo\": \"BulkPay\"\n },\n {\n \"coin\": \"USDC\",\n \"to_address\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"4.50\",\n \"memo\": \"BulkPay\"\n }\n ],\n \"scheds\": null\n}"
response = http.request(request)
puts response.read_body{
"status": "200 OK",
"data": {
"bulk_pay_id": "1b0123456789abcdef01234567",
"receipt_ids": [
"1r0123456789abcdef01234567",
"1r89abcdef0123456701234567"
]
}
}<string><string><string><string><string><string><string>Pay
Create managed-wallet bulk payments
Submits two or more same-chain payments from a UniFi-managed wallet. UniFi handles controlled-wallet approval and signing and returns one durable bulk payment ID plus one receipt ID per recipient.
POST
/
v1
/
payment
/
onchain
/
cw_bulkpay
/
{user_id}
/
{is_fee_incl}
Create managed-wallet bulk payments
curl --request POST \
--url https://api.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chain": "Sepolia",
"batch": [
{
"coin": "USDT",
"to_address": "0x2222222222222222222222222222222222222222",
"amount": "10.25",
"memo": "BulkPay"
},
{
"coin": "USDC",
"to_address": "0x3333333333333333333333333333333333333333",
"amount": "4.50",
"memo": "BulkPay"
}
],
"scheds": null
}
'import requests
url = "https://api.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}"
payload = {
"chain": "Sepolia",
"batch": [
{
"coin": "USDT",
"to_address": "0x2222222222222222222222222222222222222222",
"amount": "10.25",
"memo": "BulkPay"
},
{
"coin": "USDC",
"to_address": "0x3333333333333333333333333333333333333333",
"amount": "4.50",
"memo": "BulkPay"
}
],
"scheds": None
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'Sepolia',
batch: [
{
coin: 'USDT',
to_address: '0x2222222222222222222222222222222222222222',
amount: '10.25',
memo: 'BulkPay'
},
{
coin: 'USDC',
to_address: '0x3333333333333333333333333333333333333333',
amount: '4.50',
memo: 'BulkPay'
}
],
scheds: null
})
};
fetch('https://api.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}', 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.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}",
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([
'chain' => 'Sepolia',
'batch' => [
[
'coin' => 'USDT',
'to_address' => '0x2222222222222222222222222222222222222222',
'amount' => '10.25',
'memo' => 'BulkPay'
],
[
'coin' => 'USDC',
'to_address' => '0x3333333333333333333333333333333333333333',
'amount' => '4.50',
'memo' => 'BulkPay'
]
],
'scheds' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}"
payload := strings.NewReader("{\n \"chain\": \"Sepolia\",\n \"batch\": [\n {\n \"coin\": \"USDT\",\n \"to_address\": \"0x2222222222222222222222222222222222222222\",\n \"amount\": \"10.25\",\n \"memo\": \"BulkPay\"\n },\n {\n \"coin\": \"USDC\",\n \"to_address\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"4.50\",\n \"memo\": \"BulkPay\"\n }\n ],\n \"scheds\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"Sepolia\",\n \"batch\": [\n {\n \"coin\": \"USDT\",\n \"to_address\": \"0x2222222222222222222222222222222222222222\",\n \"amount\": \"10.25\",\n \"memo\": \"BulkPay\"\n },\n {\n \"coin\": \"USDC\",\n \"to_address\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"4.50\",\n \"memo\": \"BulkPay\"\n }\n ],\n \"scheds\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payunifi.com/v1/payment/onchain/cw_bulkpay/{user_id}/{is_fee_incl}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"Sepolia\",\n \"batch\": [\n {\n \"coin\": \"USDT\",\n \"to_address\": \"0x2222222222222222222222222222222222222222\",\n \"amount\": \"10.25\",\n \"memo\": \"BulkPay\"\n },\n {\n \"coin\": \"USDC\",\n \"to_address\": \"0x3333333333333333333333333333333333333333\",\n \"amount\": \"4.50\",\n \"memo\": \"BulkPay\"\n }\n ],\n \"scheds\": null\n}"
response = http.request(request)
puts response.read_body{
"status": "200 OK",
"data": {
"bulk_pay_id": "1b0123456789abcdef01234567",
"receipt_ids": [
"1r0123456789abcdef01234567",
"1r89abcdef0123456701234567"
]
}
}<string><string><string><string><string><string><string>Authorizations
Path Parameters
Body
application/json