List Refunds
curl --request GET \
--url https://api.fyatu.com/api/v3/refunds \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fyatu.com/api/v3/refunds"
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/refunds', 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/refunds",
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/refunds"
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/refunds")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3/refunds")
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": {
"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": {
"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"
}
}List Refunds
List all refunds with pagination — track refund status, amounts, and associated collections. GET /refunds.
GET
/
refunds
List Refunds
curl --request GET \
--url https://api.fyatu.com/api/v3/refunds \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fyatu.com/api/v3/refunds"
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/refunds', 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/refunds",
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/refunds"
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/refunds")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3/refunds")
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": {
"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": {
"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 refunds for your application.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) |
collectionId | string | Filter by original collection ID |
dateFrom | string | Filter from date (YYYY-MM-DD) |
dateTo | string | Filter to date (YYYY-MM-DD) |
Response
| Field | Type | Description |
|---|---|---|
refunds | array | List of refund objects |
pagination | object | Pagination info |
Refund Object
| Field | Type | Description |
|---|---|---|
refundId | string | Unique refund identifier |
collectionId | string | Original collection ID |
amount | number | Refunded amount |
currency | string | Currency code |
reason | string | Reason code (e.g., CUSTOMER_REQUEST) |
reasonDescription | string | Human-readable reason description |
status | string | Refund status |
completedAt | string | Completion timestamp |
createdAt | string | Creation 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";
// Get all refunds from the last 30 days
const params = new URLSearchParams({
dateFrom: new Date(Date.now() - 30 * 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/refunds?${params}`,
{
headers: {
'Authorization': `Bearer ${accessToken}`
}
}
);
const result = await response.json();
let totalRefunded = 0;
for (const refund of result.data.refunds) {
if (refund.status === 'COMPLETED') {
totalRefunded += refund.amount;
}
console.log(`${refund.refundId}: ${refund.amount} ${refund.currency} - ${refund.status}`);
}
console.log(`Total refunded: ${totalRefunded} USD`);
Example Response
{
"success": true,
"status": 200,
"message": "Refunds retrieved successfully",
"data": {
"refunds": [
{
"refundId": "ref_a1b2c3d4e5f6",
"collectionId": "col_a1b2c3d4e5f6",
"amount": 25.00,
"currency": "USD",
"reason": "CUSTOMER_REQUEST",
"reasonDescription": "Customer requested refund",
"status": "COMPLETED",
"completedAt": "2026-01-08T14:00:00+00:00",
"createdAt": "2026-01-08T13:45: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=col_a1b2c3d4e5f6
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
JWT access token obtained from /auth/token
Query Parameters
Required range:
x <= 100Available options:
PENDING, COMPLETED, FAILED ⌘I

