Upload proof
Submit evidence to dispute chargebacks.
post
https://api.flutterwave.com/v3/upload_imageBody Params
file
The image(proof) to be used to decline the chargeback.
Headers
string
Pass your secret key as a bearer token in the request header to authorize this call
string
The content type of the request. Expected value is form/multipart-form.
curl --location --request POST 'https://api.flutterwave.com/v3/upload_image' \
--header 'Authorization: Bearer FLWSECK-xxxxxxxxxxxxxxx-X' \
--form 'image=@"/Path/to/my/Image/sample-image.png"'
var axios = require('axios');
var FormData = require('form-data');
var fs = require('fs');
var data = new FormData();
data.append('image', fs.createReadStream('/Path/to/my/Image/sample-image.png'));
var config = {
method: 'post',
url: 'https://api.flutterwave.com/v3/upload_image',
headers: {
'Authorization': 'Bearer FLWSECK-xxxxxxxxxxxxxxx-X',
...data.getHeaders()
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "https://api.flutterwave.com/v3/upload_image"
payload={}
files=[
('image',('dashboard_2.png',open('/Path/to/my/Image/sample-image.png','rb'),'image/png'))
]
headers = {
'Authorization': 'Bearer FLWSECK-xxxxxxxxxxxxxxx-X'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
{
"status": "success",
"message": "Image sucessfully uploaded",
"data": "https://cdn.filestackcontent.com/UQbCwqvSvyf2AsTffV2D"
}
{
"status":"error",
"message":"Image is not in required format",
"data":null
}
Accept/Decline Chargeback
This allows you to perform actions like decline or accept chargebacks on your account
put
https://api.flutterwave.com/v3/chargebacks/idPath Params
string
Unique identifier for the chargeback you want to accept/decline
Body Params
string
This is the action you want to perform on the chargeback. It can be accept or decline
string
Provide a link to the files you would like to use to decline the chargeback with.
Show optional parameters
Headers
string
Pass your secret key as a bearer token in the request header to authorize this call
curl --location --request PUT 'https://api.flutterwave.com//v3/chargebacks/:id' \
--header 'Authorization: Bearer FLWSECK-SANDBOXDEMOKEY-X' \
--header 'Content-Type: application/json' \
--data '{
"action": "decline",
"comment": "testing...",
"prooflink": "https//www.example.com/prooflink"
}'
var request = require("request");
var options = {
method: "PUT",
url: "https://api.flutterwave.com/v3/chargebacks/122",
headers: {
Authorization: "FLWSECK_TEST-SANDBOXDEMOKEY-X",
"Content-Type": "application/json",
},
body: JSON.stringify({
action: "accept",
comment: "Service rendered",
prooflink: "https//www.example.com/prooflink"
}),
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.flutterwave.com/v3/chargebacks/122',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS =>'{
"action":"accept",
"comment":"Service rendered",
"prooflink": "https//www.example.com/prooflink"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: FLWSECK_TEST-SANDBOXDEMOKEY-X',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
import json
url = "https://api.flutterwave.com/v3/chargebacks/155"
payload = json.dumps({
"action": "accept",
"comment": "Service rendered",
"prooflink": "https//www.example.com/prooflink"
})
headers = {
'Authorization': 'FLWSECK_TEST-SANDBOXDEMOKEY-X',
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
{
"status":"success",
"message":"Chargeback declined",
"data":{
"id":2109,
"amount":700,
"flw_ref":"1557524181291683290514710",
"status":"declined",
"stage":"new",
"comment":"testing",
"due_date":"2023-09-30T15:59:59.000Z",
"settlement_id":"N/A",
"created_at":"2023-09-29T08:15:46.000Z",
"meta":{
"uploaded_proof":"https//www.example.com/prooflink",
"history":[
{
"action":"comment",
"stage":"new",
"date":"2023-09-29T08:17:50.000Z",
"description":"A comment has been added to the chargeback log"
},
{
"action":"update",
"stage":"second",
"date":"2023-09-29T08:18:28.000Z",
"description":"Chargeback comment updated from testing... to testing"
},
{
"action":"update",
"stage":"prearbitary",
"date":"2023-09-29T08:19:14.000Z",
"description":"Chargeback comment updated from testing to testing..."
},
{
"action":"update",
"stage":"new",
"date":"2023-09-29T08:20:04.000Z",
"description":"Chargeback comment updated from testing... to testing"
},
{
"action":"initiated",
"stage":"new",
"date":"2023-09-29T08:20:26.000Z",
"description":"Debit and hold chargeback amount"
},
{
"action":"decline",
"stage":"new",
"date":"2023-09-29T08:20:57.000Z",
"description":"Merchant denies claim with a proof"
}
]
}
}
}
{
"status": "error",
"message": "Error: Chargeback due time has passed",
"data": null
}
Get single chargeback
This allows you to fetch a particular chargeback on your account
get
https://api.flutterwave.com/v3/chargebacksQuery Params
string
This is the flutterwave reference associated with a particular charge back. Pass this value when you want to fetch a single chargeback
Headers
string
Pass your secret key as a bearer token in the request header to authorize this call
var request = require("request");
var options = {
method: "GET",
url:
"https://api.flutterwave.com/v3/chargebacks?flw_ref=URF_1600800139900_3999635",
headers: {
Authorization: "FLWSECK_TEST-SANDBOXDEMOKEY-X",
},
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.flutterwave.com/v3/chargebacks?flw_ref=URF_1600800139900_3999635',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: FLWSECK_TEST-SANDBOXDEMOKEY-X'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
require "uri"
require "net/http"
url = URI("https://api.flutterwave.com/v3/chargebacks?flw_ref=URF_1600800139900_3999635")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "FLWSECK_TEST-SANDBOXDEMOKEY-X"
response = https.request(request)
puts response.read_body
import requests
url = "https://api.flutterwave.com/v3/chargebacks?flw_ref=URF_1600800139900_3999635l"
payload={}
headers = {
'Authorization': 'FLWSECK_TEST-SANDBOXDEMOKEY-X'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"status": "success",
"message": "Chargebacks fetched",
"meta": {
"page_info": {
"total": 1,
"current_page": 1,
"total_pages": 1,
"page_size": 20
}
},
"data": [
{
"id": 1933,
"amount": 13,
"flw_ref": "6177259198051667823311011",
"status": "lost",
"stage": "new",
"comment": "testing hooks",
"meta": {
"uploaded_proof": null,
"history": [
{
"action": "initiated",
"stage": "new",
"date": "2022-11-07T12:20:02.000Z",
"description": "Debit and hold chargeback amount",
"source": "ledgerbalance"
},
{
"action": "notification",
"date": "2022-11-07T12:20:22.000Z",
"description": "Email Notification Sent"
},
{
"action": "comment",
"stage": "new",
"date": "2022-11-09T00:20:23.000Z",
"description": "A comment has been added to the chargeback log",
"comment": "Proof is being reviewed"
},
{
"action": "lost",
"stage": "new",
"date": "2022-11-17T05:33:36.000Z",
"description": "No merchant response"
}
]
},
"due_date": "2022-11-17T14:59:59.000Z",
"settlement_id": "900101572",
"created_at": "2022-11-07T12:18:03.000Z",
"transaction_id": 674619333,
"tx_ref": "TEST-1667823310405"
}
]
}
{}
Get all Chargebacks
This allows you to fetch all chargebacks on your account
get
https://api.flutterwave.com/v3/chargebacksQuery Params
Show optional parameters
Headers
string
Pass your secret key as a bearer token in the request header to authorize this call
var request = require("request");
var options = {
method: "GET",
url: "https://api.flutterwave.com/v3/chargebacks",
headers: {
Authorization: "FLWSECK_TEST-SANDBOXDEMOKEY-X",
},
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
<?php
$curl = curl_init();
curl_setopt_array(\$curl, array(
CURLOPT_URL => 'https://api.flutterwave.com/v3/chargebacks',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: FLWSECK_TEST-SANDBOXDEMOKEY-X'
),
));
$response = curl_exec($curl);
curl_close(\$curl);
echo \$response;
require "uri"
require "net/http"
url = URI("https://api.flutterwave.com/v3/chargebacks")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "FLWSECK_TEST-SANDBOXDEMOKEY-X"
response = https.request(request)
puts response.read_body
import requests
url = "https://api.flutterwave.com/v3/chargebacks"
payload={}
headers = {
'Authorization': 'FLWSECK_TEST-SANDBOXDEMOKEY-X'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
{
"status": "success",
"message": "Chargebacks fetched",
"meta": {
"page_info": {
"total": 3,
"current_page": 1,
"total_pages": 1,
"page_size": 20
}
},
"data": [
{
"id": 2221,
"amount": 3000,
"flw_ref": "0550726510071683619721660",
"status": "lost",
"stage": "pre-arbitration",
"comment": "Product/service not received",
"meta": {
"uploaded_proof": null,
"history": [
{
"merchant_type": "RR",
"date": "2024-08-01T04:58:20.000Z"
},
{
"action": "notification",
"date": "2024-08-01T04:58:25.000Z",
"description": "Email Notification Sent"
},
{
"action": "hooknotifier",
"status": "initiated",
"url": "https://webhook.site/6dcb649f-e3b5-47c1-8ce6-aa356dd913c5",
"date": "2024-08-01T04:58:26.000Z",
"description": "Hook Notification Successful"
},
{
"action": "lost",
"stage": "pre-arbitration",
"date": "2024-08-04T06:49:49.000Z",
"description": "No merchant response",
"source": "availablebalance"
},
{
"action": "hooknotifier",
"status": "lost",
"url": "https://webhook.site/6dcb649f-e3b5-47c1-8ce6-aa356dd913c5",
"date": "2024-08-04T06:50:14.000Z",
"description": "Hook Notification Successful"
}
]
},
"due_date": "2024-08-03T15:59:59.000Z",
"settlement_id": "N/A",
"created_at": "2024-08-01T16:58:20.000Z",
"transaction_id": 674630970,
"tx_ref": "TEST-1683619718017"
},
{
"id": 2209,
"amount": 3000,
"flw_ref": "0550726510071683619721660",
"status": "declined",
"stage": "new",
"comment": "Cancelled merchandise/Service",
"meta": {
"uploaded_proof": "https://cdn.filestackcontent.com/k7QmL7JnT2Gir8NAcDLV",
"history": [
{
"merchant_type": "RR",
"date": "2024-06-29T10:18:20.000Z"
},
{
"action": "notification",
"date": "2024-06-29T10:18:24.000Z",
"description": "Email Notification Sent"
},
{
"action": "hooknotifier",
"status": "initiated",
"url": "https://webhook.site/af39071c-990f-4c6e-8519-ce4ce8c7e0dd",
"date": "2024-06-29T10:18:25.000Z",
"description": "Hook Notification Failed"
},
{
"action": "decline",
"stage": "second",
"url": "https://cdn.filestackcontent.com/k7QmL7JnT2Gir8NAcDLV",
"date": "2024-06-29T10:19:16.000Z",
"description": "Merchant denies claim with a proof",
"comment": "Goods or services not provided"
},
{
"action": "hooknotifier",
"status": "declined",
"url": "https://webhook.site/af39071c-990f-4c6e-8519-ce4ce8c7e0dd",
"date": "2024-06-29T10:19:19.000Z",
"description": "Hook Notification Failed"
},
{
"action": "update",
"stage": "new",
"date": "2024-08-01T04:57:10.000Z",
"description": "Chargeback stage moved from second to new"
}
]
},
"due_date": "2024-07-02T15:59:59.000Z",
"settlement_id": null,
"created_at": "2024-06-29T22:18:20.000Z",
"transaction_id": 674630970,
"tx_ref": "TEST-1683619718017"
},
{
"id": 2208,
"amount": 12,
"flw_ref": "1678612858171667820797946",
"status": "declined",
"stage": "second",
"comment": "Cancelled merchandise/Service",
"meta": {
"uploaded_proof": "https://cdn.filestackcontent.com/k7QmL7JnT2Gir8NAcDLV",
"history": [
{
"merchant_type": "RR",
"date": "2024-06-27T02:52:42.000Z"
},
{
"action": "notification",
"date": "2024-06-27T02:52:47.000Z",
"description": "Email Notification Sent"
},
{
"action": "hooknotifier",
"status": "initiated",
"url": "https://webhook.site/af39071c-990f-4c6e-8519-ce4ce8c7e0dd",
"date": "2024-06-27T02:52:47.000Z",
"description": "Hook Notification Failed"
},
{
"action": "decline",
"stage": "second",
"url": "https://cdn.filestackcontent.com/6afXmGsURPmsW04L3jbj",
"date": "2024-06-27T02:54:54.000Z",
"description": "Merchant denies claim with a proof",
"comment": "Dispute not remedied"
},
{
"action": "hooknotifier",
"status": "declined",
"url": "https://webhook.site/af39071c-990f-4c6e-8519-ce4ce8c7e0dd",
"date": "2024-06-27T02:54:58.000Z",
"description": "Hook Notification Failed"
}
]
},
"due_date": "2024-07-01T15:59:59.000Z",
"settlement_id": null,
"created_at": "2024-06-27T14:52:42.000Z",
"transaction_id": 674619323,
"tx_ref": "TEST-1667820797124"
}
]
}
{}