List Collections
curl --request GET \
--url https://api.fyatu.com/api/v3/collections \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fyatu.com/api/v3/collections"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fyatu.com/api/v3/collections', 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.fyatu.com/api/v3/collections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.fyatu.com/api/v3/collections"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.fyatu.com/api/v3/collections")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "<string>",
"data": {
"collections": [
{
"collectionId": "<string>",
"reference": "<string>",
"orderId": "<string>",
"amount": 123,
"fee": 123,
"netAmount": 123,
"currency": "<string>",
"status": "<string>",
"payerClientId": "<string>",
"payerName": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"currentPage": 123,
"itemsPerPage": 123,
"totalItems": 123,
"totalPages": 123
}
},
"meta": {
"requestId": "req_abc123def456",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"status": 401,
"message": "Unable to identify business",
"error": {
"code": "AUTH_TOKEN_INVALID"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2026-01-05T10:30:00+00:00"
}
}Collections
List Collections
List all payment collections with pagination and status filtering. GET /collections.
GET
/
collections
List Collections
curl --request GET \
--url https://api.fyatu.com/api/v3/collections \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fyatu.com/api/v3/collections"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fyatu.com/api/v3/collections', 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.fyatu.com/api/v3/collections",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.fyatu.com/api/v3/collections"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.fyatu.com/api/v3/collections")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "<string>",
"data": {
"collections": [
{
"collectionId": "<string>",
"reference": "<string>",
"orderId": "<string>",
"amount": 123,
"fee": 123,
"netAmount": 123,
"currency": "<string>",
"status": "<string>",
"payerClientId": "<string>",
"payerName": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"currentPage": 123,
"itemsPerPage": 123,
"totalItems": 123,
"totalPages": 123
}
},
"meta": {
"requestId": "req_abc123def456",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"status": 401,
"message": "Unable to identify business",
"error": {
"code": "AUTH_TOKEN_INVALID"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2026-01-05T10:30:00+00:00"
}
}Overview
Retrieve a paginated list of your collections with optional filtering.Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20, max: 100) |
status | string | Filter by status (PENDING, COMPLETED, FAILED, REFUNDED) |
orderId | string | Search by order ID (partial match) |
reference | string | Search by reference (partial match) |
dateFrom | string | Filter from date (YYYY-MM-DD) |
dateTo | string | Filter to date (YYYY-MM-DD) |
Response
| Field | Type | Description |
|---|---|---|
collections | array | List of collection objects |
pagination | object | Pagination info |
Collection Object (Summary)
| Field | Type | Description |
|---|---|---|
collectionId | string | Unique identifier |
reference | string | Human-readable reference |
orderId | string | Your order ID |
amount | number | Payment amount |
fee | number | Processing fee |
netAmount | number | Net amount received |
currency | string | Currency code |
status | string | Payment status |
payerEmail | string | Payer’s email |
payerName | string | Payer’s name |
completedAt | string | Completion time |
createdAt | string | Creation time |
Pagination Object
| Field | Type | Description |
|---|---|---|
currentPage | integer | Current page number |
itemsPerPage | integer | Items per page |
totalItems | integer | Total number of items |
totalPages | integer | Total number of pages |
Example Usage
<?php
// Get completed collections from the last 7 days
$params = http_build_query([
'status' => 'COMPLETED',
'dateFrom' => date('Y-m-d', strtotime('-7 days')),
'dateTo' => date('Y-m-d'),
'limit' => 50
]);
$response = file_get_contents(
"https://api.fyatu.com/api/v3/collections?{$params}",
false,
stream_context_create([
'http' => [
'method' => 'GET',
'header' => 'Authorization: Bearer ' . $accessToken
]
])
);
$result = json_decode($response, true);
foreach ($result['data']['collections'] as $collection) {
echo "{$collection['reference']}: {$collection['amount']} {$collection['currency']} - {$collection['status']}\n";
}
// Pagination info
$pagination = $result['data']['pagination'];
echo "Page {$pagination['currentPage']} of {$pagination['totalPages']}\n";
// Get completed collections from the last 7 days
const params = new URLSearchParams({
status: 'COMPLETED',
dateFrom: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0],
dateTo: new Date().toISOString().split('T')[0],
limit: '50'
});
const response = await fetch(
`https://api.fyatu.com/api/v3/collections?${params}`,
{
headers: {
'Authorization': `Bearer ${accessToken}`
}
}
);
const result = await response.json();
for (const collection of result.data.collections) {
console.log(`${collection.reference}: ${collection.amount} ${collection.currency} - ${collection.status}`);
}
// Pagination info
const { currentPage, totalPages } = result.data.pagination;
console.log(`Page ${currentPage} of ${totalPages}`);
Example Response
{
"success": true,
"status": 200,
"message": "Collections retrieved successfully",
"data": {
"collections": [
{
"collectionId": "col_a1b2c3d4e5f6",
"reference": "A2B4C6D8E0F2",
"orderId": "ORD-0001",
"amount": 25.00,
"fee": 0.75,
"netAmount": 24.25,
"currency": "USD",
"status": "COMPLETED",
"payerEmail": "alice@example.com",
"payerName": "Alice Example",
"completedAt": "2026-01-08T11:35:00+00:00",
"createdAt": "2026-01-08T11:30:00+00:00"
}
],
"pagination": {
"currentPage": 1,
"itemsPerPage": 20,
"totalItems": 156,
"totalPages": 8
}
},
"meta": {
"requestId": "req_list123abc",
"timestamp": "2026-01-08T12:00:00+00:00"
}
}
Filtering Tips
By Date Range
GET /collections?dateFrom=2026-01-01&dateTo=2026-01-31
Pending Payments
GET /collections?status=PENDING
Search by Order ID
GET /collections?orderId=INV-001
Paginate Large Results
GET /collections?page=1&limit=100
GET /collections?page=2&limit=100
Use date filtering to reduce response size and improve performance when you have many collections.
Authorizations
JWT access token obtained from /auth/token
Query Parameters
Required range:
x <= 100Available options:
PENDING, COMPLETED, EXPIRED, FAILED, REFUNDED, PARTIALLY_REFUNDED ⌘I

