Get all Chargebacks

This allows you to fetch all chargebacks on your account

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

Query Params

page string

This specifies which page you want to fetch

status string

This specifies the status of the chargebacks you want to fetch. It can be lost, won, initiated, accepted, declined

from string

This is the start date for the record you want to fetch. Date format is YYYY-MM-DD

to string

This is the end date for the record you want to fetch. Date format is YYYY-MM-DD

currency string

This currency of the transaction

flw_ref string

his is the unique reference for the transaction. It can be retrieved from the initial chargeback response as flw_ref

id string

The id of the transaction

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"
    }
  ]
}
{}

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

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: "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",
  }),
};
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"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: FLWSECK_TEST-SANDBOXDEMOKEY-X',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

require "uri"
require "json"
require "net/http"

url = URI("https://api.flutterwave.com/v3/chargebacks/122")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = "FLWSECK_TEST-SANDBOXDEMOKEY-X"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"action": "accept",
"comment": "Service not rendered"
})

response = https.request(request)
puts response.read_body

import requests
import json

url = "https://api.flutterwave.com/v3/chargebacks/155"

payload = json.dumps({
  "action": "accept",
  "comment": "Service rendered"
})
headers = {
  'Authorization': 'FLWSECK_TEST-SANDBOXDEMOKEY-X',
  'Content-Type': 'application/json'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)
{
  "status": "error",
  "message": "Error: Chargeback due time has passed",
  "data": null
}

Fetch A 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"
    }
  ]
}
{}
Loading...