Skip to main content
GET
/
collections
List Collections
curl --request GET \
  --url https://api.fyatu.com/api/v3/collections \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "status": 200,
  "message": "<string>",
  "data": {
    "collections": [
      {
        "collectionId": "<string>",
        "batch": "<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": {
      "page": 123,
      "perPage": 123,
      "totalItems": 123,
      "totalPages": 123
    }
  },
  "meta": {
    "requestId": "req_abc123def456",
    "timestamp": "2023-11-07T05:31:56Z"
  }
}

Overview

Retrieve a paginated list of your collections with optional filtering.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
statusstringFilter by status (PENDING, COMPLETED, FAILED, REFUNDED)
orderIdstringSearch by order ID (partial match)
referencestringSearch by reference (partial match)
dateFromstringFilter from date (YYYY-MM-DD)
dateTostringFilter to date (YYYY-MM-DD)

Response

FieldTypeDescription
collectionsarrayList of collection objects
paginationobjectPagination info

Collection Object (Summary)

FieldTypeDescription
collectionIdstringUnique identifier
referencestringHuman-readable reference
orderIdstringYour order ID
amountnumberPayment amount
feenumberProcessing fee
netAmountnumberNet amount received
currencystringCurrency code
statusstringPayment status
payerEmailstringPayer’s email
payerNamestringPayer’s name
completedAtstringCompletion time
createdAtstringCreation time

Pagination Object

FieldTypeDescription
currentPageintegerCurrent page number
itemsPerPageintegerItems per page
totalItemsintegerTotal number of items
totalPagesintegerTotal 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";

Example Response

{
  "success": true,
  "status": 200,
  "message": "Collections retrieved successfully",
  "data": {
    "collections": [
      {
        "collectionId": "SCI679A1B2C3D4E5",
        "reference": "A2B4C6D8E0F2",
        "orderId": "INV-001",
        "amount": 25.00,
        "fee": 0.75,
        "netAmount": 24.25,
        "currency": "USD",
        "status": "COMPLETED",
        "payerEmail": "[email protected]",
        "payerName": "John Doe",
        "completedAt": "2026-01-08T11:35:00+00:00",
        "createdAt": "2026-01-08T11:30:00+00:00"
      },
      {
        "collectionId": "SCI679F5E4D3C2B1",
        "reference": "X9Y8Z7W6V5U4",
        "orderId": "INV-002",
        "amount": 50.00,
        "fee": 1.50,
        "netAmount": 48.50,
        "currency": "USD",
        "status": "PENDING",
        "payerEmail": null,
        "payerName": null,
        "completedAt": null,
        "createdAt": "2026-01-08T10:00: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

Authorization
string
header
required

JWT access token obtained from /auth/token

Query Parameters

page
integer
default:1
limit
integer
default:20
Required range: x <= 100
status
enum<string>
Available options:
PENDING,
COMPLETED,
EXPIRED,
FAILED,
REFUNDED,
PARTIALLY_REFUNDED
orderId
string
dateFrom
string<date>
dateTo
string<date>

Response

Collections retrieved successfully

success
boolean
Example:

true

status
integer
Example:

200

message
string
data
object
meta
object