Approve and disburse a payroll batch
curl --request POST \
--url https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve \
--header 'X-API-Key: <api-key>' \
--header 'X-API-Secret: <api-key>'import requests
url = "https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve"
headers = {
"X-API-Key": "<api-key>",
"X-API-Secret": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'X-API-Secret': '<api-key>'}
};
fetch('https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve', 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.hyparrow.cloud/api/v1/payroll/batches/{id}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>",
"X-API-Secret: <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"
"net/http"
"io"
)
func main() {
url := "https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-API-Secret", "<api-key>")
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.hyparrow.cloud/api/v1/payroll/batches/{id}/approve")
.header("X-API-Key", "<api-key>")
.header("X-API-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-API-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{}Payroll
Approve and disburse a payroll batch
Reserves the full amount plus fees from the wallet and submits every valid beneficiary payment. Send exactly one of:
code: a current TOTP code or an unused recovery code of the account owner; ormandateIdwithexternalApproval(API keys only): approve under an API approval mandate the owner armed from the dashboard. The mandate must be bound to the calling key, the batch must have been created with that key, and the batch must fit the mandate’s ceilings.externalApprovalnames who approved the payroll in your product:approverName,approverEmailorapproverId,approvedAt,reference.
Returns 402 with the shortfall when the wallet cannot cover the batch, and 403 when a mandate does not cover it.
POST
/
payroll
/
batches
/
{id}
/
approve
Approve and disburse a payroll batch
curl --request POST \
--url https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve \
--header 'X-API-Key: <api-key>' \
--header 'X-API-Secret: <api-key>'import requests
url = "https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve"
headers = {
"X-API-Key": "<api-key>",
"X-API-Secret": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'X-API-Secret': '<api-key>'}
};
fetch('https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve', 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.hyparrow.cloud/api/v1/payroll/batches/{id}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>",
"X-API-Secret: <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"
"net/http"
"io"
)
func main() {
url := "https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-API-Secret", "<api-key>")
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.hyparrow.cloud/api/v1/payroll/batches/{id}/approve")
.header("X-API-Key", "<api-key>")
.header("X-API-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyparrow.cloud/api/v1/payroll/batches/{id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-API-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{}Authorizations
Your API key, sent in the "X-API-Key" header. Every endpoint needs the key and the secret together; a request carrying only one of the pair is rejected with 401.
Your API secret, sent in the "X-API-Secret" header alongside the API key on every request.
Response
200 - application/json
OK
The response is of type object.

