Payout
Get Payout Requests in a Period of Time
You can easily query payout payments in a period of time. Currently we support up to 1 year period. Should you need more, please contact us directly.
GET
/
v2
/
payouts
/
all
Get Payout Requests in a Period of Time
curl --request GET \
--url https://api.cleverhub.co/api/v2/payouts/all \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>'import requests
url = "https://api.cleverhub.co/api/v2/payouts/all"
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'app-id': '<api-key>', 'secret-key': '<api-key>'}};
fetch('https://api.cleverhub.co/api/v2/payouts/all', 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.cleverhub.co/api/v2/payouts/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"app-id: <api-key>",
"secret-key: <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.cleverhub.co/api/v2/payouts/all"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cleverhub.co/api/v2/payouts/all")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/payouts/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"from_date": "2022-01-01T00:00:00.000+0000",
"to_date": "2022-12-01T00:00:00.000+0000",
"page": 1,
"size": 10,
"next_page": 2,
"total_page": 1,
"total_count": 10,
"records": [
{
"uuid": "OHXTEF9M",
"currency": "PHP",
"payout_method_name": "ph_ewallet_gcash_php",
"description": "Payout payment 2023",
"total_amount": "1000",
"status": "completed",
"webhook_notification": {
"endpoint_url": "https://example.org",
"authorization_header": "SECRET"
},
"scheduled_at": "2023-04-01T00:00:00.000+0000",
"payout_transactions": [
{
"uuid": "OHXTEF9M",
"balance_id": "808C75EF-988143EB",
"payee": "John Scarlet",
"amount": "100.00",
"payout_method_params": {
"account_number": 123456789999,
"account_name": "Luyx",
"bank_code": 11111
},
"status": "settled",
"external_id": "456",
"error_message": "PayID not found",
"created_at": "2022-01-01T00:00:00.000+0000"
}
],
"error_code": "HC_PAYOUT1",
"error_message": "Insufficient available funds. Top up your balance.",
"external_id": "123"
}
]
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}{
"errors": {
"message": "Not found"
}
}{
"errors": {
"message": "Invalid date"
}
}Authorizations
A unique identifier assigned to each application.
A secure token associated with the app-id.
Query Parameters
Start date to queries payment requests from, format 'DD/MM/YY' or 'YYYY-MM-DDThh:mm:ss'. This datetime would be in UTC timezone
End date to queries payment requests, format 'DD/MM/YY' or 'YYYY-MM-DDThh:mm:ss'. This datetime would be in UTC timezone
Page number to query. Currently we support 20 records per page
Filter payout requests by a custom external_id (either the global-level ID assigned to the payout request or any ID inside individual payout_transactions[]).
Get Payout Requests in a Period of Time
curl --request GET \
--url https://api.cleverhub.co/api/v2/payouts/all \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>'import requests
url = "https://api.cleverhub.co/api/v2/payouts/all"
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'app-id': '<api-key>', 'secret-key': '<api-key>'}};
fetch('https://api.cleverhub.co/api/v2/payouts/all', 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.cleverhub.co/api/v2/payouts/all",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"app-id: <api-key>",
"secret-key: <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.cleverhub.co/api/v2/payouts/all"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cleverhub.co/api/v2/payouts/all")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/payouts/all")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"from_date": "2022-01-01T00:00:00.000+0000",
"to_date": "2022-12-01T00:00:00.000+0000",
"page": 1,
"size": 10,
"next_page": 2,
"total_page": 1,
"total_count": 10,
"records": [
{
"uuid": "OHXTEF9M",
"currency": "PHP",
"payout_method_name": "ph_ewallet_gcash_php",
"description": "Payout payment 2023",
"total_amount": "1000",
"status": "completed",
"webhook_notification": {
"endpoint_url": "https://example.org",
"authorization_header": "SECRET"
},
"scheduled_at": "2023-04-01T00:00:00.000+0000",
"payout_transactions": [
{
"uuid": "OHXTEF9M",
"balance_id": "808C75EF-988143EB",
"payee": "John Scarlet",
"amount": "100.00",
"payout_method_params": {
"account_number": 123456789999,
"account_name": "Luyx",
"bank_code": 11111
},
"status": "settled",
"external_id": "456",
"error_message": "PayID not found",
"created_at": "2022-01-01T00:00:00.000+0000"
}
],
"error_code": "HC_PAYOUT1",
"error_message": "Insufficient available funds. Top up your balance.",
"external_id": "123"
}
]
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}{
"errors": {
"message": "Not found"
}
}{
"errors": {
"message": "Invalid date"
}
}