Payin
Get Payin Requests in a Period of Time
This API allows you to fetch a complete list of payin linked to your app-id. You can filter the results based on multiple query params. This API is paginated. The default is 20 transactions per page.
GET
/
v2
/
payins
/
all
Get Payin Requests in a Period of Time
curl --request GET \
--url https://api.cleverhub.co/api/v2/payins/all \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>'import requests
url = "https://api.cleverhub.co/api/v2/payins/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/payins/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/payins/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/payins/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/payins/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/payins/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{
"total": 100,
"page": 1,
"per_page": 20,
"records": [
{
"uuid": "VMMAOTFQ",
"name": "Test",
"email": "test@example.com",
"external_id": "123456",
"status": "pending",
"pay_code": {
"payment_url": "https://api.cleverhub.co/v1/shorted_url?hash=ApvZIZ9"
},
"currency": "PHP",
"gst": false,
"amount": "1000.0",
"gst_amount": "0",
"total": "1000.0",
"paid_amount": "0",
"payment_method": "ph_ewallet_gcash_php",
"description": "description",
"is_refundable": "false",
"expired_at": "2021-12-23T06:00:00.000+0000",
"pay_by": "2021-12-23T06:00:00.000+0000",
"webhook_notification": {
"endpoint_url": "https://yourserver.co/notifications",
"authorization_header": "****"
},
"metadata": {
"custom_note": "Priority customer"
}
}
]
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}Authorizations
A unique identifier assigned to each application.
A secure token associated with the app-id.
Query Parameters
Start date to query payment requests from, format 'DD/MM/YY' or 'YYYY-MM-DDThh:mm:ss'. This datetime would be in UTC timezone
End date to query payment requests, format 'DD/MM/YY' or 'YYYY-MM-DDThh:mm:ss'. The datetime would be in UTC timezone
Page number to query. Currently we support 20 records per page
Default 20 records per page
Filter payin requests by a custom external_id.
Get Payin Requests in a Period of Time
curl --request GET \
--url https://api.cleverhub.co/api/v2/payins/all \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>'import requests
url = "https://api.cleverhub.co/api/v2/payins/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/payins/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/payins/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/payins/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/payins/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/payins/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{
"total": 100,
"page": 1,
"per_page": 20,
"records": [
{
"uuid": "VMMAOTFQ",
"name": "Test",
"email": "test@example.com",
"external_id": "123456",
"status": "pending",
"pay_code": {
"payment_url": "https://api.cleverhub.co/v1/shorted_url?hash=ApvZIZ9"
},
"currency": "PHP",
"gst": false,
"amount": "1000.0",
"gst_amount": "0",
"total": "1000.0",
"paid_amount": "0",
"payment_method": "ph_ewallet_gcash_php",
"description": "description",
"is_refundable": "false",
"expired_at": "2021-12-23T06:00:00.000+0000",
"pay_by": "2021-12-23T06:00:00.000+0000",
"webhook_notification": {
"endpoint_url": "https://yourserver.co/notifications",
"authorization_header": "****"
},
"metadata": {
"custom_note": "Priority customer"
}
}
]
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}