Chargebacks

The charges object represents charges against transactions raised by a merchant acquirer.

An example of the charges object

{
"transaction": {
"id": "fb826843-9a37-45d5-9efd-7afd24a8037b",
"amount": 47900,
"status": "COMPLETE",
"method": "MOTO_OTHER",
"type": "CARD",
"created_at": "2022-03-25T11:24:10.915Z",
"completed_at": "2022-03-25T11:24:10.915Z",
"organisation": {
"id": "T9304",
"name": "TTA Travel",
"image": "organisation/t9304.png"
}
},
"received_date": "2022-07-05",
"status": "Unknown",
"reason": "Cardholder Dispute - Defective/Not as described",
"amount": 47900,
"currency": "GBX",
"due_date": null,
"posting_date": "2022-07-05",
"created_at": "2022-07-06T11:00:35.919Z"
}

transactionobject

The transaction object that the chargeback relates to.

received_datedate

The date the chargeback was received by the merchant acquirer

statusdate

The status of the chargeback

reasondate

The reason why the chargeback was raised

amountdate

The amount (in pence) that the chargeback is for

currencystring

The currency of the chargeback | see currency documentation

due_datedate

The due date for the chargeback

posting_datedate

The date the chargeback was posted by the customer

created_atdatetime

The datetime the chargeback was received by our systems


Fetch all

POST/agent/chargebacks

import axios from 'axios';
const response = await axios(
{
method: 'post',
url: 'https://api.felloh.com/agent/chargebacks',
data: {
organisation: 'X9876',
skip: 10,
take: 20
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function getChargebacks($token, $skip, $take) {
$url = 'https://api.felloh.com/agent/chargebacks';
$client = new Client();
$response = $client->post($url, [
'json' => [
'organisation' => 'X9876',
'skip' => $skip,
'take' => $take,
],
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$skip = 10; // Specify the number of chargebacks to skip
$take = 20; // Specify the number of chargebacks to take
$response = getChargebacks($token, $skip, $take);
import requests
import json
def post_agent_chargebacks(organisation, skip, take, access_token):
api_url = 'https://api.felloh.com/agent/chargebacks'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
data = {
'organisation': organisation,
'skip': skip,
'take': take
}
response = requests.post(api_url, headers=headers, data=json.dumps(data))
response.raise_for_status()
return response.text
response_data = post_agent_chargebacks('X9876', 10, 20, '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var response = await PostAgentChargebacks("X9876", 10, 20, "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> PostAgentChargebacks(string organisation, int skip, int take, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = "https://api.felloh.com/agent/chargebacks";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var requestData = new
{
organisation = organisation,
skip = skip,
take = take
};
var content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestData), Encoding.UTF8, "application/json");
var httpResponse = await client.PostAsync(apiUrl, content);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

JSON RESPONSE Defined by type parameter being NULL or 'json'

{
"data": [
{
"transaction": {
"id": "fb826843-9a37-45d5-9efd-7afd24a8037b",
"amount": 47900,
"currency": "GBX",
"status": "COMPLETE",
"method": "MOTO_OTHER",
"type": "CARD",
"created_at": "2022-03-25T11:24:10.915Z",
"completed_at": "2022-03-25T11:24:10.915Z",
"organisation": {
"id": "X9876",
"name": "Felloh"
}
},
"received_date": "2022-07-05",
"status": "Unknown",
"reason": "Cardholder Dispute - Defective/Not as described",
"amount": 47900,
"due_date": null,
"posting_date": "2022-07-05",
"created_at": "2022-07-06T11:00:35.919Z"
},
{
"transaction": {
"id": "4d54d5ae-5b78-4d31-8892-55422b27f713",
"amount": 47900,
"currency": "GBX",
"status": "COMPLETE",
"method": "MOTO_OTHER",
"type": "CARD",
"created_at": "2022-03-25T11:24:10.915Z",
"completed_at": "2022-03-25T11:24:10.915Z",
"organisation": {
"id": "X9876",
"name": "Felloh"
}
},
"received_date": "2022-07-05",
"status": "Unknown",
"reason": "Cardholder Dispute - Defective/Not as described",
"amount": 47900,
"currency": "GBX",
"due_date": null,
"posting_date": "2022-07-05",
"created_at": "2022-07-06T11:00:35.919Z"
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 2
}
}

CSV RESPONSE Defined by type parameter being 'csv'

{
"data": {
"url": "https://agent-data-production-reports.s3.eu-west-2.amazonaws.com/02803bec-dddf-4f3e-902d-ef0e42a856af.csv"
},
"errors": [],
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "02803bec-dddf-4f3e-902d-ef0e42a856af",
"count": 184
}
}

This endpoint retrieves all chargebacks raised via an organisations merchant acquirers.

HTTP Method

POST

HTTP Endpoint

PRODhttps://api.felloh.com/agent/chargebacks

SANDBOXhttps://sandbox.felloh.com/agent/chargebacks

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to fetch charges for. You can find the organisation that you have access to by using the List all organisations method.
skipfalseIntegerSee pagination section for details
takefalseIntegerSee pagination section for details
show-child-organisationsfasleBooleanWhether to also show chargebacks for any of the requested organisations child organisations
typefaslestringCan be 'csv' or 'json', defaults to json

Response

Returns an array of Chargeback Objects