Copy link List Disputes

List transaction disputes filed by customers

Query Parameters

perPageinteger
Number of records to fetch per page
pageinteger
The section to retrieve
statusstring
Dispute status
Enumawaiting-merchant-feedbackawaiting-bank-feedbackpendingresolved
transactionstring
Transaction ID
fromstring
The start date
tostring
The end date

Response

200Dispute List response
statusrequiredboolean
messagerequiredstring
datarequiredarray[object]
metarequiredobject
5 object properties
totalrequiredinteger
skippedrequiredinteger
perPagerequiredinteger
pagerequiredinteger
pageCountrequiredinteger
GET/dispute
curl https://api.paystack.co/dispute \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.dispute.list({
  perPage: 100,
  page: 100
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.dispute.list({
  per_page: 100,
  page: 100
})
puts response.data
Response
{
  "status": true,
  "message": "Disputes retrieved",
  "data": [
    {
      "id": 2867,
      "refund_amount": null,
      "currency": null,
      "status": "archived",
      "resolution": null,
      "domain": "test",
      "transaction": {
        "id": 5991760,
        "domain": "test",
        "status": "success",
        "reference": "asjck8gf76zd1dr",
        "amount": 39100,
        "message": null,
        "gateway_response": "Successful",
        "paid_at": "2017-11-09T00:01:56.000Z",
        "created_at": "2017-11-09T00:01:36.000Z",
        "channel": "card",
        "currency": "NGN",
        "ip_address": null,
        "metadata": "",
        "log": null,
        "fees": 587,
        "fees_split": null,
        "authorization": {},
        "customer": null,
        "plan": {},
        "subaccount": {},
        "split": {},
        "order_id": null,
        "paidAt": "2017-11-09T00:01:56.000Z",
        "createdAt": "2017-11-09T00:01:36.000Z",
        "pos_transaction_data": null
      },
      "transaction_reference": null,
      "category": null,
      "customer": {
        "id": 10207,
        "first_name": null,
        "last_name": null,
        "email": "[email protected]",
        "customer_code": "CUS_unz4q52yjsd6064",
        "phone": null,
        "metadata": null,
        "risk_action": "default",
        "international_format_phone": null
      },
      "bin": null,
      "last4": null,
      "dueAt": null,
      "resolvedAt": null,
      "evidence": null,
      "attachments": "[]",
      "note": null,
      "history": [
        {
          "status": "pending",
          "by": "[email protected]",
          "createdAt": "2017-11-16T16:12:24.000Z"
        }
      ],
      "messages": [
        {
          "sender": "[email protected]",
          "body": "test this",
          "createdAt": "2017-11-16T16:12:24.000Z"
        }
      ],
      "createdAt": "2017-11-16T16:12:24.000Z",
      "updatedAt": "2019-08-16T08:05:25.000Z"
    }
  ],
  "meta": {
    "total": 1,
    "skipped": 0,
    "perPage": 50,
    "page": 1,
    "pageCount": 1
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Fetch Dispute

Fetch a transaction dispute

Path Parameters

idrequiredinteger
The unique identifier of the dispute

Response

200Dispute Fetch response
statusrequiredboolean
messagerequiredstring
datarequiredobject
21 object properties
idrequiredinteger
refund_amountrequiredinteger
currencyrequiredstring
statusrequiredstring
resolutionrequiredstring
domainrequiredstring
transactionrequiredobject
30 object properties
idrequiredinteger
domainrequiredstring
statusrequiredstring
referencerequiredstring
receipt_numberinteger
amountrequiredinteger
messagerequiredstring
gateway_responserequiredstring
paid_atrequiredstring
created_atrequiredstring
channelrequiredstring
currencyrequiredstring
ip_addressrequiredstring
metadatarequiredobject
1 object property
custom_fieldsrequiredarray[object]
logrequiredobject
8 object properties
start_timerequiredinteger
time_spentrequiredinteger
attemptsrequiredinteger
errorsrequiredinteger
successrequiredboolean
mobilerequiredboolean
inputrequiredarray[object]
historyrequiredarray[object]
feesrequiredinteger
fees_splitrequiredinteger
authorizationrequiredobject
2 object properties
receiver_bank_account_numberrequiredstring
receiver_bankrequiredstring
customerrequiredobject
1 object property
international_format_phonerequiredstring
planrequiredobject
subaccountrequiredobject
splitrequiredobject
order_idrequiredstring
paidAtrequiredstring
createdAtrequiredstring
requested_amountrequiredinteger
pos_transaction_datarequiredstring
sourcerequiredstring
fees_breakdownrequiredstring
connectrequiredstring
transaction_referencerequiredstring
categoryrequiredstring
customerrequiredobject
9 object properties
idrequiredinteger
first_namerequiredstring
last_namerequiredstring
emailrequiredstring
customer_coderequiredstring
phonerequiredstring
metadatarequiredobject
risk_actionrequiredstring
international_format_phonerequiredstring
binrequiredstring
last4requiredstring
dueAtrequiredstring
resolvedAtrequiredstring
evidencerequiredstring
attachmentsrequiredstring
noterequiredstring
historyrequiredarray[object]
messagesrequiredarray[object]
createdAtrequiredstring
updatedAtrequiredstring
GET/dispute/{id}
curl https://api.paystack.co/dispute/1801929 \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.dispute.fetch("1801929");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.dispute.fetch("1801929")
puts response.data
Response
{
  "status": true,
  "message": "Dispute retrieved",
  "data": {
    "id": 2867,
    "refund_amount": null,
    "currency": null,
    "status": "archived",
    "resolution": null,
    "domain": "test",
    "transaction": {
      "id": 5991760,
      "domain": "test",
      "status": "success",
      "reference": "asjck8gf76zd1dr",
      "amount": 39100,
      "message": null,
      "gateway_response": "Successful",
      "paid_at": "2017-11-09T00:01:56.000Z",
      "created_at": "2017-11-09T00:01:36.000Z",
      "channel": "card",
      "currency": "NGN",
      "ip_address": null,
      "metadata": "",
      "log": null,
      "fees": 587,
      "fees_split": null,
      "authorization": {},
      "customer": {
        "international_format_phone": null
      },
      "plan": {},
      "subaccount": {},
      "split": {},
      "order_id": null,
      "paidAt": "2017-11-09T00:01:56.000Z",
      "createdAt": "2017-11-09T00:01:36.000Z",
      "requested_amount": null
    },
    "transaction_reference": null,
    "category": null,
    "customer": {
      "id": 10207,
      "first_name": null,
      "last_name": null,
      "email": "[email protected]",
      "customer_code": "CUS_unz4q52yjsd6064",
      "phone": null,
      "metadata": null,
      "risk_action": "default",
      "international_format_phone": null
    },
    "bin": null,
    "last4": null,
    "dueAt": null,
    "resolvedAt": null,
    "evidence": null,
    "attachments": "[]",
    "note": null,
    "history": [
      {
        "status": "pending",
        "by": "[email protected]",
        "createdAt": "2017-11-16T16:12:24.000Z"
      }
    ],
    "messages": [
      {
        "sender": "[email protected]",
        "body": "test this",
        "createdAt": "2017-11-16T16:12:24.000Z"
      }
    ],
    "createdAt": "2017-11-16T16:12:24.000Z",
    "updatedAt": "2019-08-16T08:05:25.000Z"
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Update Dispute

Update a transaction dispute

Path Parameters

idrequiredinteger
The unique identifier of the dispute

Request Body

refund_amountrequiredinteger
The amount to refund, in the subunit of your currency
uploaded_filenamestring
Filename of attachment returned via response from the Dispute upload URL

Response

200Dispute Update response
statusrequiredboolean
messagerequiredstring
datarequiredobject
21 object properties
idrequiredinteger
refund_amountrequiredinteger
currencyrequiredstring
statusrequiredstring
resolutionrequiredstring
domainrequiredstring
transactionrequiredobject
30 object properties
idrequiredinteger
domainrequiredstring
statusrequiredstring
referencerequiredstring
receipt_numberinteger
amountrequiredinteger
messagerequiredstring
gateway_responserequiredstring
paid_atrequiredstring
created_atrequiredstring
channelrequiredstring
currencyrequiredstring
ip_addressrequiredstring
metadatarequiredobject
1 object property
custom_fieldsrequiredarray[object]
logrequiredobject
8 object properties
start_timerequiredinteger
time_spentrequiredinteger
attemptsrequiredinteger
errorsrequiredinteger
successrequiredboolean
mobilerequiredboolean
inputrequiredarray[object]
historyrequiredarray[object]
feesrequiredinteger
fees_splitrequiredinteger
authorizationrequiredobject
2 object properties
receiver_bank_account_numberrequiredstring
receiver_bankrequiredstring
customerrequiredobject
1 object property
international_format_phonerequiredstring
planrequiredobject
subaccountrequiredobject
splitrequiredobject
order_idrequiredstring
paidAtrequiredstring
createdAtrequiredstring
requested_amountrequiredinteger
pos_transaction_datarequiredstring
sourcerequiredstring
fees_breakdownrequiredstring
connectrequiredstring
transaction_referencerequiredstring
categoryrequiredstring
customerrequiredobject
9 object properties
idrequiredinteger
first_namerequiredstring
last_namerequiredstring
emailrequiredstring
customer_coderequiredstring
phonerequiredstring
metadatarequiredobject
risk_actionrequiredstring
international_format_phonerequiredstring
binrequiredstring
last4requiredstring
dueAtrequiredstring
resolvedAtrequiredstring
evidencerequiredstring
attachmentsrequiredstring
noterequiredstring
historyrequiredarray[object]
messagesrequiredarray[object]
createdAtrequiredstring
updatedAtrequiredstring
PUT/dispute/{id}
curl https://api.paystack.co/dispute/1801929 \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "refund_amount": 50000
  }' \
  -X PUT
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.dispute.update("1801929", {
  refund_amount: 50000
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.dispute.update("1801929", {
  refund_amount: 50000
})
puts response.data
Response
{
  "status": true,
  "message": "Dispute updated successfully",
  "data": [
    {
      "currency": "NGN",
      "last4": null,
      "bin": null,
      "transaction_reference": null,
      "merchant_transaction_reference": null,
      "refund_amount": 1002,
      "status": "resolved",
      "domain": "test",
      "resolution": "merchant-accepted",
      "source": "bank",
      "category": "general",
      "note": null,
      "attachments": "attachement",
      "id": 624,
      "transaction": {
        "id": 5991760,
        "domain": "test",
        "status": "success",
        "reference": "asjck8gf76zd1dr",
        "amount": 39100,
        "message": null,
        "gateway_response": "Successful",
        "paid_at": "2017-11-09T00:01:56.000Z",
        "created_at": "2017-11-09T00:01:36.000Z",
        "channel": "card",
        "currency": "NGN",
        "ip_address": null,
        "metadata": "",
        "log": null,
        "fees": 587,
        "fees_split": null,
        "authorization": {},
        "customer": {
          "international_format_phone": null
        },
        "plan": {},
        "subaccount": {},
        "split": {},
        "order_id": null,
        "paidAt": "2017-11-09T00:01:56.000Z",
        "createdAt": "2017-11-09T00:01:36.000Z",
        "requested_amount": null
      },
      "customer": {
        "id": 10207,
        "first_name": null,
        "last_name": null,
        "email": "[email protected]",
        "customer_code": "CUS_unz4q52yjsd6064",
        "phone": null,
        "metadata": null,
        "risk_action": "default",
        "international_format_phone": null
      },
      "organization": 1,
      "evidence": null,
      "resolvedAt": "2019-08-28T14:14:41.000Z",
      "createdAt": "2019-08-28T14:14:41.000Z",
      "updatedAt": "2019-08-28T14:29:07.000Z",
      "dueAt": null
    }
  ]
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Fetch Upload URL

Get the URL to upload a dispute evidence

Path Parameters

idrequiredinteger
The unique identifier of the dispute

Response

200Dispute Upload URL response
statusrequiredboolean
messagerequiredstring
datarequiredobject
2 object properties
signedUrlrequiredstring
fileNamerequiredstring
GET/dispute/{id}/upload_url
curl https://api.paystack.co/dispute/4734583785/upload_url \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.dispute.uploadUrl("4734583785");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.dispute.upload_url("4734583785")
puts response.data
Response
{
  "status": true,
  "message": "Upload url generated",
  "data": {
    "signedUrl": "https://s3.eu-west-1.amazonaws.com/files.paystack.co/qesp8a4df1xejihd9x5q?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAI7CL5IZL2DJHOPPA%2F20191009%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20191009T220931Z&X-Amz-Expires=1800&X-Amz-Signature=f5cc387949f3520982886e70ab2e08721a82a9fa9e26b696b91471f36453867a&X-Amz-SignedHeaders=host",
    "fileName": "qesp8a4df1xejihd9x5q"
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Export Disputes

Export the disputes available on your integration

Query Parameters

perPageinteger
Number of records to fetch per page
pageinteger
The section to retrieve
statusstring
Enumawaiting-merchant-feedbackawaiting-bank-feedbackpendingresolved
fromstring
The start date
tostring
The end date

Response

200Dispute Export response
statusrequiredboolean
messagerequiredstring
datarequiredobject
2 object properties
pathrequiredstring
expiresAtrequiredstring
GET/dispute/export
curl https://api.paystack.co/dispute/export \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.dispute.download({
  perPage: 100,
  page: 100
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.dispute.download({
  per_page: 100,
  page: 100
})
puts response.data
Response
{
  "status": true,
  "message": "Export successful",
  "data": {
    "path": "https://s3.eu-west-1.amazonaws.com/files.paystack.co/exports/100043/disputes/161834548008.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIFGL5IZL2DJHOPPA%2F20210419%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20210419T115718Z&X-Amz-Expires=60&X-Amz-Signature=8fc02bdf7f12411a6505559b4c35b069a8a478295b98c0587907777ef5e31bda&X-Amz-SignedHeaders=host",
    "expiresAt": "2021-04-19 11:58:18"
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link List Transaction Disputes

List all disputes filed for a transaction

Path Parameters

idrequiredinteger
The unique identifier of the transaction

Response

200Dispute List Transaction response
statusrequiredboolean
messagerequiredstring
datarequiredobject
23 object properties
historyrequiredarray[object]
messagesrequiredarray[object]
currencyrequiredstring
last4requiredstring
binrequiredstring
transaction_referencerequiredstring
merchant_transaction_referencerequiredstring
refund_amountrequiredinteger
statusrequiredstring
domainrequiredstring
resolutionrequiredstring
categoryrequiredstring
noterequiredstring
attachmentsrequiredstring
idrequiredinteger
integrationrequiredinteger
transactionrequiredobject
30 object properties
idrequiredinteger
domainrequiredstring
statusrequiredstring
referencerequiredstring
receipt_numberinteger
amountrequiredinteger
messagerequiredstring
gateway_responserequiredstring
paid_atrequiredstring
created_atrequiredstring
channelrequiredstring
currencyrequiredstring
ip_addressrequiredstring
metadatarequiredobject
1 object property
custom_fieldsrequiredarray[object]
logrequiredobject
8 object properties
start_timerequiredinteger
time_spentrequiredinteger
attemptsrequiredinteger
errorsrequiredinteger
successrequiredboolean
mobilerequiredboolean
inputrequiredarray[object]
historyrequiredarray[object]
feesrequiredinteger
fees_splitrequiredinteger
authorizationrequiredobject
2 object properties
receiver_bank_account_numberrequiredstring
receiver_bankrequiredstring
customerrequiredobject
1 object property
international_format_phonerequiredstring
planrequiredobject
subaccountrequiredobject
splitrequiredobject
order_idrequiredstring
paidAtrequiredstring
createdAtrequiredstring
requested_amountrequiredinteger
pos_transaction_datarequiredstring
sourcerequiredstring
fees_breakdownrequiredstring
connectrequiredobject
created_byrequiredinteger
evidencerequiredstring
resolvedAtrequiredstring
createdAtrequiredstring
updatedAtrequiredstring
dueAtrequiredstring
GET/dispute/transaction/{id}
curl https://api.paystack.co/dispute/transaction/4734583785 \
  -H "Authorization: Bearer YOUR_SECRET_KEY"
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.dispute.transaction("4734583785");
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.dispute.transaction("4734583785")
puts response.data
Response
{
  "status": true,
  "message": "Dispute retrieved successfully",
  "data": {
    "history": [
      {
        "id": 6094,
        "dispute": 2867,
        "status": "pending",
        "by": "[email protected]",
        "createdAt": "2017-11-16T16:12:24.000Z",
        "updatedAt": "2017-11-16T16:12:24.000Z"
      }
    ],
    "messages": [
      {
        "sender": "[email protected]",
        "body": "test this",
        "dispute": 2867,
        "id": 148,
        "is_deleted": 0,
        "createdAt": "2017-11-16T16:12:24.000Z",
        "updatedAt": "2017-11-16T16:12:24.000Z"
      }
    ],
    "currency": null,
    "last4": null,
    "bin": null,
    "transaction_reference": null,
    "merchant_transaction_reference": null,
    "refund_amount": null,
    "status": "archived",
    "domain": "test",
    "resolution": null,
    "category": null,
    "note": null,
    "attachments": "[]",
    "id": 2867,
    "integration": 100043,
    "transaction": {
      "id": 5991760,
      "domain": "test",
      "status": "success",
      "reference": "asjck8gf76zd1dr",
      "amount": 39100,
      "message": null,
      "gateway_response": "Successful",
      "paid_at": "2017-11-09T00:01:56.000Z",
      "created_at": "2017-11-09T00:01:36.000Z",
      "channel": "card",
      "currency": "NGN",
      "ip_address": null,
      "metadata": "",
      "log": null,
      "fees": 587,
      "fees_split": null,
      "authorization": {},
      "customer": {
        "international_format_phone": null
      },
      "plan": {},
      "subaccount": {},
      "split": {},
      "order_id": null,
      "paidAt": "2017-11-09T00:01:56.000Z",
      "createdAt": "2017-11-09T00:01:36.000Z",
      "requested_amount": null
    },
    "created_by": null,
    "evidence": null,
    "resolvedAt": null,
    "createdAt": "2017-11-16T16:12:24.000Z",
    "updatedAt": "2019-08-16T08:05:25.000Z",
    "dueAt": null
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Resolve Dispute

Resolve a transaction dispute

Path Parameters

idrequiredinteger
The unique identifier of the dispute

Request Body

resolutionrequiredstring
Dispute resolution. Accepted values, merchant-accepted, declined
messagerequiredstring
Reason for resolving
refund_amountrequiredinteger
The amount to refund, in the subunit of your integration currency
uploaded_filenamerequiredstring
Filename of attachment returned via response from the Dispute upload URL
evidenceinteger
Evidence Id for fraud claims

Response

200Dispute Resolve response
statusrequiredboolean
messagerequiredstring
datarequiredobject
22 object properties
currencyrequiredstring
last4requiredstring
binrequiredstring
transaction_referencerequiredstring
merchant_transaction_referencerequiredstring
refund_amountrequiredinteger
statusrequiredstring
domainrequiredstring
resolutionrequiredstring
categoryrequiredstring
noterequiredstring
attachmentsrequiredstring
idrequiredinteger
integrationrequiredinteger
transactionrequiredinteger
created_byrequiredinteger
evidencerequiredinteger
resolvedAtrequiredstring
createdAtrequiredstring
updatedAtrequiredstring
dueAtrequiredstring
messagerequiredobject
6 object properties
disputerequiredinteger
senderrequiredstring
bodyrequiredstring
idrequiredinteger
createdAtrequiredstring
updatedAtrequiredstring
PUT/dispute/{id}/resolve
curl https://api.paystack.co/dispute/4734583785/resolve \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "resolution": "merchant-accepted",
    "message": "Merchant accepted",
    "refund_amount": 50000,
    "uploaded_filename": "qesp8a4df1xejihd9x5q"
  }' \
  -X PUT
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.dispute.resolve("4734583785", {
  resolution: "merchant-accepted",
  message: "Merchant accepted",
  refund_amount: 50000,
  uploaded_filename: "qesp8a4df1xejihd9x5q"
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.dispute.resolve("4734583785", {
  resolution: "merchant-accepted",
  message: "Merchant accepted",
  refund_amount: 50000,
  uploaded_filename: "qesp8a4df1xejihd9x5q"
})
puts response.data
Response
{
  "status": true,
  "message": "Dispute successfully resolved",
  "data": {
    "currency": "NGN",
    "last4": null,
    "bin": null,
    "transaction_reference": null,
    "merchant_transaction_reference": null,
    "refund_amount": 1002,
    "status": "resolved",
    "domain": "test",
    "resolution": "merchant-accepted",
    "category": "general",
    "note": null,
    "attachments": "attachment",
    "id": 624,
    "transaction": {
      "id": 5991760,
      "domain": "test",
      "status": "success",
      "reference": "asjck8gf76zd1dr",
      "amount": 39100,
      "message": null,
      "gateway_response": "Successful",
      "paid_at": "2017-11-09T00:01:56.000Z",
      "created_at": "2017-11-09T00:01:36.000Z",
      "channel": "card",
      "currency": "NGN",
      "ip_address": null,
      "metadata": "",
      "log": null,
      "fees": 587,
      "fees_split": null,
      "authorization": {},
      "customer": {
        "international_format_phone": null
      },
      "plan": {},
      "subaccount": {},
      "split": {},
      "order_id": null,
      "paidAt": "2017-11-09T00:01:56.000Z",
      "createdAt": "2017-11-09T00:01:36.000Z",
      "requested_amount": null
    },
    "created_by": 30,
    "evidence": null,
    "resolvedAt": "2019-08-28T15:23:31.000Z",
    "createdAt": "2019-08-28T14:14:41.000Z",
    "updatedAt": "2019-08-28T15:23:31.000Z",
    "dueAt": null,
    "message": {
      "dispute": 624,
      "sender": "[email protected]",
      "body": "Merchant accepted",
      "id": 718,
      "createdAt": "2019-08-28T15:23:31.418Z",
      "updatedAt": "2019-08-28T15:23:31.418Z"
    }
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}

Copy link Add Evidence

Provide evidence for a dispute

Path Parameters

idrequiredinteger
The unique identifier of the dispute

Request Body

customer_emailrequiredstring
Customer email
customer_namerequiredstring
Customer name
customer_phonerequiredstring
Customer mobile number
service_detailsrequiredstring
Details of service offered
delivery_addressstring
Delivery address
delivery_datestringdate-time
ISO 8601 representation of delivery date (YYYY-MM-DD)

Response

200Dispute Add Evidence response
statusrequiredboolean
messagerequiredstring
datarequiredobject
10 object properties
customer_emailrequiredstring
customer_namerequiredstring
customer_phonerequiredstring
service_detailsrequiredstring
delivery_addressrequiredstring
delivery_daterequiredstring
disputerequiredinteger
idrequiredinteger
createdAtrequiredstring
updatedAtrequiredstring
POST/dispute/{id}/evidence
curl https://api.paystack.co/dispute/4734583785/evidence \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_email": "[email protected]",
    "customer_name": "Mensah King",
    "customer_phone": "+2348123456789",
    "service_details": "claim for buying cups"
  }' \
  -X POST
import { Paystack } from "@paystack/paystack-sdk";

const paystack = new Paystack({ secretKey: process.env.PAYSTACK_SECRET_KEY! });

const response = await paystack.dispute.evidence("4734583785", {
  customer_email: "[email protected]",
  customer_name: "Mensah King",
  customer_phone: "+2348123456789",
  service_details: "claim for buying cups"
});
console.log(response.data);
require "paystack"

paystack = Paystack::Client.new(ENV.fetch("PAYSTACK_SECRET_KEY"))

response = paystack.dispute.evidence("4734583785", {
  customer_email: "[email protected]",
  customer_name: "Mensah King",
  customer_phone: "+2348123456789",
  service_details: "claim for buying cups"
})
puts response.data
Response
{
  "status": true,
  "message": "Evidence created",
  "data": {
    "customer_email": "[email protected]",
    "customer_name": "Mensah King",
    "customer_phone": "+2348123456789",
    "service_details": "claim for buying product",
    "delivery_address": "3a ladoke street ogbomoso",
    "dispute": 624,
    "id": 21,
    "createdAt": "2019-08-28T15:36:13.783Z",
    "updatedAt": "2019-08-28T15:39:39.153Z"
  }
}
{
  "status": false,
  "message": "An error occurred",
  "meta": {
    "nextStep": "string"
  },
  "type": "string",
  "code": "validation_error",
  "errorCodeMappingNotFound": true
}