Skip to main content
GET
/
refunds
List Refunds
curl --request GET \
  --url https://api.fyatu.com/api/v3/refunds \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "status": 200,
  "message": "<string>",
  "data": {
    "refunds": [
      {
        "refundId": "<string>",
        "collectionId": "<string>",
        "amount": 123,
        "currency": "<string>",
        "reason": "<string>",
        "reasonDescription": "<string>",
        "status": "<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 refunds for your application.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
statusstringFilter by status (PENDING, COMPLETED, FAILED)
collectionIdstringFilter by original collection ID
dateFromstringFilter from date (YYYY-MM-DD)
dateTostringFilter to date (YYYY-MM-DD)

Response

FieldTypeDescription
refundsarrayList of refund objects
paginationobjectPagination info

Refund Object

FieldTypeDescription
refundIdstringUnique refund identifier
collectionIdstringOriginal collection ID
amountnumberRefunded amount
currencystringCurrency code
reasonstringReason code (e.g., CUSTOMER_REQUEST)
reasonDescriptionstringHuman-readable reason description
statusstringRefund status
completedAtstringCompletion timestamp
createdAtstringCreation timestamp

Example Usage

<?php
// Get all refunds from the last 30 days
$params = http_build_query([
    'dateFrom' => date('Y-m-d', strtotime('-30 days')),
    'dateTo' => date('Y-m-d'),
    'limit' => 50
]);

$response = file_get_contents(
    "https://api.fyatu.com/api/v3/refunds?{$params}",
    false,
    stream_context_create([
        'http' => [
            'method' => 'GET',
            'header' => 'Authorization: Bearer ' . $accessToken
        ]
    ])
);

$result = json_decode($response, true);

$totalRefunded = 0;
foreach ($result['data']['refunds'] as $refund) {
    if ($refund['status'] === 'COMPLETED') {
        $totalRefunded += $refund['amount'];
    }
    echo "{$refund['refundId']}: {$refund['amount']} {$refund['currency']} - {$refund['status']}\n";
}

echo "Total refunded: $totalRefunded USD\n";

Example Response

{
  "success": true,
  "status": 200,
  "message": "Refunds retrieved successfully",
  "data": {
    "refunds": [
      {
        "refundId": "REF679A1B2C3D4E5",
        "collectionId": "SCI679A1B2C3D4E5",
        "amount": 24.25,
        "currency": "USD",
        "reason": "CUSTOMER_REQUEST",
        "reasonDescription": "Customer requested refund",
        "status": "COMPLETED",
        "completedAt": "2026-01-08T14:00:00+00:00",
        "createdAt": "2026-01-08T14:00:00+00:00"
      },
      {
        "refundId": "REF679F5E4D3C2B1",
        "collectionId": "SCI679F5E4D3C2B1",
        "amount": 10.00,
        "currency": "USD",
        "reason": "PRODUCT_NOT_AS_DESCRIBED",
        "reasonDescription": "Product/service not as described",
        "status": "COMPLETED",
        "completedAt": "2026-01-07T10:30:00+00:00",
        "createdAt": "2026-01-07T10:30:00+00:00"
      }
    ],
    "pagination": {
      "currentPage": 1,
      "itemsPerPage": 20,
      "totalItems": 12,
      "totalPages": 1
    }
  },
  "meta": {
    "requestId": "req_reflist123",
    "timestamp": "2026-01-08T15:00:00+00:00"
  }
}

Filtering Examples

Refunds for a Specific Collection

GET /refunds?collectionId=SCI679A1B2C3D4E5

Completed Refunds Only

GET /refunds?status=COMPLETED

This Month’s Refunds

GET /refunds?dateFrom=2026-01-01&dateTo=2026-01-31
Use refund reports for accounting reconciliation and to track refund rates over time.

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,
FAILED
collectionId
string
dateFrom
string<date>
dateTo
string<date>

Response

Refunds retrieved successfully

success
boolean
Example:

true

status
integer
Example:

200

message
string
data
object
meta
object