Fetch Disputes
To make this request, send an authenticated request to the disputes endpoint.
get
https://api.1app.online/v1/business/disputes
Fetch disputes
Take a look at how you might do this:
cURL
NodeJs
PHP - cURL
Python
1
curl --location --request GET 'https://api.1app.online/v1/business/disputes' \
2
--header 'Authorization: Bearer YOUR_SECRET_KEY'
Copied!
1
var https = require('follow-redirects').https;
2
var fs = require('fs');
3
4
var options = {
5
'method': 'GET',
6
'hostname': 'api.1app.online',
7
'path': '/v1/business/disputes',
8
'headers': {
9
'Authorization': 'Bearer YOUR_SECRET_KEY'
10
},
11
'maxRedirects': 20
12
};
13
14
var req = https.request(options, function (res) {
15
var chunks = [];
16
17
res.on("data", function (chunk) {
18
chunks.push(chunk);
19
});
20
21
res.on("end", function (chunk) {
22
var body = Buffer.concat(chunks);
23
console.log(body.toString());
24
});
25
26
res.on("error", function (error) {
27
console.error(error);
28
});
29
});
30
31
req.end();
Copied!
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.1app.online/v1/business/disputes',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer YOUR_SECRET_KEY'
16
),
17
));
18
19
$response = curl_exec($curl);
20
21
curl_close($curl);
22
echo $response;
23
Copied!
1
import requests
2
3
url = "https://api.1app.online/v1/business/disputes"
4
5
payload={}
6
headers = {
7
'Authorization': 'Bearer YOUR_SECRET_KEY'
8
}
9
10
response = requests.request("GET", url, headers=headers, data=payload)
11
12
print(response.text)
13
Copied!

Sample response

1
{
2
"status": true,
3
"message": "Dispute retrieved",
4
"disputecount": 3,
5
"data": [
6
{
7
"disputeid": "5",
8
"busid": "7",
9
"transref": "83810B1637657021448",
10
"amount": "100.00",
11
"customer": "[email protected]",
12
"gateway": "transfer",
13
"type": "chargeback",
14
"logged_date": "1639999861",
15
"duedate": "25 Dec 2021 12:00 am",
16
"statuscode": "0",
17
"statustext": "Declined"
18
},
19
{
20
"disputeid": "4",
21
"busid": "7",
22
"transref": "83810B1637750693902",
23
"amount": "100.00",
24
"customer": "[email protected]",
25
"gateway": "transfer",
26
"type": "fraud",
27
"logged_date": "1639999843",
28
"duedate": "22 Dec 2021 12:00 am",
29
"statuscode": "1",
30
"statustext": "Awaiting Response"
31
},
32
{
33
"disputeid": "3",
34
"busid": "7",
35
"transref": "83810B1637749504184",
36
"amount": "900.00",
37
"customer": "[email protected]",
38
"gateway": "transfer",
39
"type": "chargeback",
40
"logged_date": "1639999825",
41
"duedate": "23 Dec 2021 12:00 am",
42
"statuscode": "0",
43
"statustext": "Declined"
44
}
45
]
46
}
Copied!