Create a draft batch payout (payroll) + preview
curl --request POST \
--url http://localhost:3001/api/v1/business/payouts/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotencyKey": "<string>",
"items": [
{
"currency": "<string>",
"recipientId": "<string>",
"srcAmount": "50.00",
"dstAmount": "50000",
"reference": "<string>"
}
],
"source": "MANUAL",
"metadata": {}
}
'import requests
url = "http://localhost:3001/api/v1/business/payouts/batches"
payload = {
"idempotencyKey": "<string>",
"items": [
{
"currency": "<string>",
"recipientId": "<string>",
"srcAmount": "50.00",
"dstAmount": "50000",
"reference": "<string>"
}
],
"source": "MANUAL",
"metadata": {}
}
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({
idempotencyKey: '<string>',
items: [
{
currency: '<string>',
recipientId: '<string>',
srcAmount: '50.00',
dstAmount: '50000',
reference: '<string>'
}
],
source: 'MANUAL',
metadata: {}
})
};
fetch('http://localhost:3001/api/v1/business/payouts/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/business/payouts/batches",
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([
'idempotencyKey' => '<string>',
'items' => [
[
'currency' => '<string>',
'recipientId' => '<string>',
'srcAmount' => '50.00',
'dstAmount' => '50000',
'reference' => '<string>'
]
],
'source' => 'MANUAL',
'metadata' => [
]
]),
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 := "http://localhost:3001/api/v1/business/payouts/batches"
payload := strings.NewReader("{\n \"idempotencyKey\": \"<string>\",\n \"items\": [\n {\n \"currency\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"srcAmount\": \"50.00\",\n \"dstAmount\": \"50000\",\n \"reference\": \"<string>\"\n }\n ],\n \"source\": \"MANUAL\",\n \"metadata\": {}\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("http://localhost:3001/api/v1/business/payouts/batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"<string>\",\n \"items\": [\n {\n \"currency\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"srcAmount\": \"50.00\",\n \"dstAmount\": \"50000\",\n \"reference\": \"<string>\"\n }\n ],\n \"source\": \"MANUAL\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/business/payouts/batches")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotencyKey\": \"<string>\",\n \"items\": [\n {\n \"currency\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"srcAmount\": \"50.00\",\n \"dstAmount\": \"50000\",\n \"reference\": \"<string>\"\n }\n ],\n \"source\": \"MANUAL\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"businessId": "<string>",
"totalItems": 123,
"totalsByCurrency": {},
"createdAt": "<string>",
"updatedAt": "<string>",
"items": [
{
"index": 123,
"country": "<string>",
"currency": "<string>",
"payoutId": {},
"recipientId": {},
"recipientLabel": {},
"srcAmount": {},
"dstAmount": {},
"rate": {},
"networkFee": {},
"platformFee": {},
"totalFee": {},
"totalDebit": {},
"failureReason": {}
}
],
"affordable": true,
"errorCount": 123,
"requiresTwoFactor": true,
"twoFaVerifiedAt": {},
"completedAt": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}Business Payout Batches
Create a draft batch payout (payroll) + preview
Validates up to BATCH_MAX_ITEMS line items, resolves each recipient (saved or inline — inline ones are sanctions-screened and saved), server-side quotes every item, and persists a DRAFT batch with child payouts in CREATED (not yet dispatched). Returns the per-item fee breakdown, summed totals, and an affordability flag. Idempotent on (business, idempotencyKey).
POST
/
api
/
v1
/
business
/
payouts
/
batches
Create a draft batch payout (payroll) + preview
curl --request POST \
--url http://localhost:3001/api/v1/business/payouts/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotencyKey": "<string>",
"items": [
{
"currency": "<string>",
"recipientId": "<string>",
"srcAmount": "50.00",
"dstAmount": "50000",
"reference": "<string>"
}
],
"source": "MANUAL",
"metadata": {}
}
'import requests
url = "http://localhost:3001/api/v1/business/payouts/batches"
payload = {
"idempotencyKey": "<string>",
"items": [
{
"currency": "<string>",
"recipientId": "<string>",
"srcAmount": "50.00",
"dstAmount": "50000",
"reference": "<string>"
}
],
"source": "MANUAL",
"metadata": {}
}
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({
idempotencyKey: '<string>',
items: [
{
currency: '<string>',
recipientId: '<string>',
srcAmount: '50.00',
dstAmount: '50000',
reference: '<string>'
}
],
source: 'MANUAL',
metadata: {}
})
};
fetch('http://localhost:3001/api/v1/business/payouts/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3001",
CURLOPT_URL => "http://localhost:3001/api/v1/business/payouts/batches",
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([
'idempotencyKey' => '<string>',
'items' => [
[
'currency' => '<string>',
'recipientId' => '<string>',
'srcAmount' => '50.00',
'dstAmount' => '50000',
'reference' => '<string>'
]
],
'source' => 'MANUAL',
'metadata' => [
]
]),
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 := "http://localhost:3001/api/v1/business/payouts/batches"
payload := strings.NewReader("{\n \"idempotencyKey\": \"<string>\",\n \"items\": [\n {\n \"currency\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"srcAmount\": \"50.00\",\n \"dstAmount\": \"50000\",\n \"reference\": \"<string>\"\n }\n ],\n \"source\": \"MANUAL\",\n \"metadata\": {}\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("http://localhost:3001/api/v1/business/payouts/batches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"<string>\",\n \"items\": [\n {\n \"currency\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"srcAmount\": \"50.00\",\n \"dstAmount\": \"50000\",\n \"reference\": \"<string>\"\n }\n ],\n \"source\": \"MANUAL\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3001/api/v1/business/payouts/batches")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotencyKey\": \"<string>\",\n \"items\": [\n {\n \"currency\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"srcAmount\": \"50.00\",\n \"dstAmount\": \"50000\",\n \"reference\": \"<string>\"\n }\n ],\n \"source\": \"MANUAL\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"businessId": "<string>",
"totalItems": 123,
"totalsByCurrency": {},
"createdAt": "<string>",
"updatedAt": "<string>",
"items": [
{
"index": 123,
"country": "<string>",
"currency": "<string>",
"payoutId": {},
"recipientId": {},
"recipientLabel": {},
"srcAmount": {},
"dstAmount": {},
"rate": {},
"networkFee": {},
"platformFee": {},
"totalFee": {},
"totalDebit": {},
"failureReason": {}
}
],
"affordable": true,
"errorCount": 123,
"requiresTwoFactor": true,
"twoFaVerifiedAt": {},
"completedAt": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "email must be an email",
"statusCode": 400,
"errors": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Active business context
Merchant API key (alternative to dashboard JWT)
Body
application/json
Idempotency key — unique per (business, key). A replay returns the same batch.
Required string length:
8 - 64Line items (one per recipient).
Show child attributes
Show child attributes
How the batch was authored. Defaults to MANUAL.
Available options:
MANUAL, CSV, API, SCHEDULE, CHANNEL Optional caller metadata persisted on the batch.
⌘I
