Upload proof

Submit evidence to dispute chargebacks.

post https://api.flutterwave.com/v3/upload_image

Body Params

image file

The image(proof) to be used to decline the chargeback.

Headers

Authorization string

Pass your secret key as a bearer token in the request header to authorize this call

Content-Type 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/id

Path Params

id string

Unique identifier for the chargeback you want to accept/decline

Body Params

action string

This is the action you want to perform on the chargeback. It can be accept or decline

prooflink string

Provide a link to the files you would like to use to decline the chargeback with.

Show optional parameters

Headers

Authorization 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/chargebacks

Query Params

flw_ref string

This is the flutterwave reference associated with a particular charge back. Pass this value when you want to fetch a single chargeback

Headers

Authorization 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": 1390,
      "amount": 100,
      "flw_ref": "URF_1600800139900_3999635",
      "status": "lost",
      "stage": "new",
      "comment": "This is the payment",
      "meta": {
        "uploaded_proof": null,
        "history": [
          {
            "initiator": "dispute",
            "date": "2020-09-22T07:01:28.000Z",
            "description": "Dispute transaction"
          },
          {
            "action": "initiated",
            "stage": "new",
            "date": "2020-09-22T07:05:02.000Z",
            "description": "Debit and hold chargeback amount",
            "source": "availablebalance"
          },
          {
            "action": "lost",
            "stage": "new",
            "date": "2020-09-23T04:03:05.000Z",
            "description": "No merchant response"
          }
        ]
      },
      "due_date": "2020-09-23T15:59:59.000Z",
      "settlement_id": "N/A",
      "created_at": "2020-09-22T19:01:28.000Z",
      "transaction_id": 1554166,
      "tx_ref": "10"
    }
  ]
}
{}

Get all Chargebacks

This allows you to fetch all chargebacks on your account

get https://api.flutterwave.com/v3/chargebacks

Query Params

Show optional parameters

Headers

Authorization 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": 1,
      "current_page": 1,
      "total_pages": 1,
      "page_size": 20
    }
  },
  "data": [
    {
      "id": 1390,
      "amount": 100,
      "flw_ref": "URF_1600800139900_3999635",
      "status": "lost",
      "stage": "new",
      "comment": "This is the payment",
      "meta": {
        "uploaded_proof": null,
        "history": [
          {
            "initiator": "dispute",
            "date": "2020-09-22T07:01:28.000Z",
            "description": "Dispute transaction"
          },
          {
            "action": "initiated",
            "stage": "new",
            "date": "2020-09-22T07:05:02.000Z",
            "description": "Debit and hold chargeback amount",
            "source": "availablebalance"
          },
          {
            "action": "lost",
            "stage": "new",
            "date": "2020-09-23T04:03:05.000Z",
            "description": "No merchant response"
          }
        ]
      },
      "due_date": "2020-09-23T15:59:59.000Z",
      "settlement_id": "N/A",
      "created_at": "2020-09-22T19:01:28.000Z",
      "transaction_id": 1554166,
      "tx_ref": "10"
    }
  ]
}
{}
Loading...