curl --request POST \
--url https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>' \
--form 'file=<string>' \
--form 'doc_type=<string>' \
--form 'note=<string>'import requests
url = "https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"x-api-version": "<x-api-version>",
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('doc_type', '<string>');
form.append('note', '<string>');
const options = {
method: 'POST',
headers: {
'x-api-version': '<x-api-version>',
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>'
}
};
options.body = form;
fetch('https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-version: <x-api-version>",
"x-client-id: <api-key>",
"x-client-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-version", "<x-api-version>")
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents")
.header("x-api-version", "<x-api-version>")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-version"] = '<x-api-version>'
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body[
{
"dispute_id": 433447817,
"dispute_type": "DISPUTE",
"reason_code": 1401,
"reason_description": "Fraud Transaction",
"dispute_amount": 10,
"dispute_amount_currency": "INR",
"created_at": "2023-01-18T11:26:58",
"respond_by": "2023-01-19T00:00:00",
"updated_at": "2023-01-18T11:26:58",
"resolved_at": "9999-09-09T00:00:00",
"dispute_status": "DISPUTE_DOCS_RECEIVED",
"cf_dispute_remarks": "Load Testing",
"preferred_evidence": [
{
"document_type": "Delivery/Service Proof",
"document_description": "Proof that the cardholder/customer received the goods or services."
}
],
"dispute_evidence": [
{
"document_id": 18150,
"document_name": "disputeSampleFile.pdf",
"document_type": "DeliveryProof"
}
],
"order_details": {
"order_id": "Load_test_0103_FGA4HF12AC",
"order_currency": "INR",
"order_amount": 10,
"cf_payment_id": 1489901523,
"payment_currency": "INR",
"payment_amount": 10
},
"customer_details": {
"customer_name": "John Ellur",
"customer_phone": 9876543210,
"customer_email": "john@cashfree.com"
}
}
]{
"message": "bad URL, please check API documentation",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "request_failed",
"type": "invalid_request_error"
}{
"message": "authentication Failed",
"code": "request_failed",
"type": "authentication_error"
}{
"message": "something is not found",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "something_not_found",
"type": "invalid_request_error"
}{
"message": "order with same id is already present",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "order_already_exists",
"type": "invalid_request_error"
}{
"message": "something is not found",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "request_invalid",
"type": "idempotency_error"
}{
"message": "Too many requests from IP. Check headers",
"code": "request_failed",
"type": "rate_limit_error"
}{
"message": "internal Server Error",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "internal_error",
"type": "api_error"
}Submit Evidence to contest the Dispute by Dispute ID
Use this API to Submit the Evidences to contest the Dispute by specifying the Dispute ID.
curl --request POST \
--url https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <api-key>' \
--header 'x-client-secret: <api-key>' \
--form 'file=<string>' \
--form 'doc_type=<string>' \
--form 'note=<string>'import requests
url = "https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"x-api-version": "<x-api-version>",
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('doc_type', '<string>');
form.append('note', '<string>');
const options = {
method: 'POST',
headers: {
'x-api-version': '<x-api-version>',
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>'
}
};
options.body = form;
fetch('https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-version: <x-api-version>",
"x-client-id: <api-key>",
"x-client-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-version", "<x-api-version>")
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents")
.header("x-api-version", "<x-api-version>")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.cashfree.com/pg/disputes/{dispute_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-version"] = '<x-api-version>'
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"doc_type\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"note\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body[
{
"dispute_id": 433447817,
"dispute_type": "DISPUTE",
"reason_code": 1401,
"reason_description": "Fraud Transaction",
"dispute_amount": 10,
"dispute_amount_currency": "INR",
"created_at": "2023-01-18T11:26:58",
"respond_by": "2023-01-19T00:00:00",
"updated_at": "2023-01-18T11:26:58",
"resolved_at": "9999-09-09T00:00:00",
"dispute_status": "DISPUTE_DOCS_RECEIVED",
"cf_dispute_remarks": "Load Testing",
"preferred_evidence": [
{
"document_type": "Delivery/Service Proof",
"document_description": "Proof that the cardholder/customer received the goods or services."
}
],
"dispute_evidence": [
{
"document_id": 18150,
"document_name": "disputeSampleFile.pdf",
"document_type": "DeliveryProof"
}
],
"order_details": {
"order_id": "Load_test_0103_FGA4HF12AC",
"order_currency": "INR",
"order_amount": 10,
"cf_payment_id": 1489901523,
"payment_currency": "INR",
"payment_amount": 10
},
"customer_details": {
"customer_name": "John Ellur",
"customer_phone": 9876543210,
"customer_email": "john@cashfree.com"
}
}
]{
"message": "bad URL, please check API documentation",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "request_failed",
"type": "invalid_request_error"
}{
"message": "authentication Failed",
"code": "request_failed",
"type": "authentication_error"
}{
"message": "something is not found",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "something_not_found",
"type": "invalid_request_error"
}{
"message": "order with same id is already present",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "order_already_exists",
"type": "invalid_request_error"
}{
"message": "something is not found",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "request_invalid",
"type": "idempotency_error"
}{
"message": "Too many requests from IP. Check headers",
"code": "request_failed",
"type": "rate_limit_error"
}{
"message": "internal Server Error",
"help": "Check latest errors and resolution from Merchant Dashboard API logs: https://bit.ly/4glEd0W Help Document: https://bit.ly/4eeZYO9",
"code": "internal_error",
"type": "api_error"
}Authorizations
Client app ID. You can find your app id in the Merchant Dashboard.
Client secret key. You can find your secret key in the Merchant Dashboard.
Headers
API version to be used.
Request ID for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to Cashfree.
An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.
Path Parameters
Cashfree dispute ID to get Evidences to submit to contest the Dispute.
Body
Request parameters to submit evidence to contest a dispute by specifying the dispute ID.
File types supported are jpeg, jpg, png, pdf and maximum file size allowed is 20 MB.
Mention the type of the document you are uploading. Possible values :- Delivery/Service Proof, Shipping Proof, Statement of Service, Proof of Service Used, Cancellation of Service Proof, Refund Proof, Business model explanation, Extra Charges Declaration, Terms & Conditions, Customer Withdrawal Letter, Certificate of Authenticity, Reseller Agreement. You can use get evidences to contest dispute API to fetch set of documents required to contest particular dispute.
Response
Success response for submitting evidence to contest a dispute by specifying the dispute ID.
DISPUTE, CHARGEBACK, RETRIEVAL, PRE_ARBITRATION, ARBITRATION Dispute amount may differ from transaction amount for partial cases.
Dispute amount currency for a dispute.
This is the time when the dispute was created.
This is the time by which evidence should be submitted to contest the dispute.
This is the time when the dispute case was updated.
This is the time when the dispute case was closed.
DISPUTE_CREATED, DISPUTE_DOCS_RECEIVED, DISPUTE_UNDER_REVIEW, DISPUTE_MERCHANT_WON, DISPUTE_MERCHANT_LOST, DISPUTE_MERCHANT_ACCEPTED, DISPUTE_INSUFFICIENT_EVIDENCE, CHARGEBACK_CREATED, CHARGEBACK_DOCS_RECEIVED, CHARGEBACK_UNDER_REVIEW, CHARGEBACK_MERCHANT_WON, CHARGEBACK_MERCHANT_LOST, CHARGEBACK_MERCHANT_ACCEPTED, CHARGEBACK_INSUFFICIENT_EVIDENCE, RETRIEVAL_CREATED, RETRIEVAL_DOCS_RECEIVED, RETRIEVAL_UNDER_REVIEW, RETRIEVAL_MERCHANT_WON, RETRIEVAL_MERCHANT_LOST, RETRIEVAL_MERCHANT_ACCEPTED, RETRIEVAL_INSUFFICIENT_EVIDENCE, PRE_ARBITRATION_CREATED, PRE_ARBITRATION_DOCS_RECEIVED, PRE_ARBITRATION_UNDER_REVIEW, PRE_ARBITRATION_MERCHANT_WON, PRE_ARBITRATION_MERCHANT_LOST, PRE_ARBITRATION_MERCHANT_ACCEPTED, PRE_ARBITRATION_INSUFFICIENT_EVIDENCE, ARBITRATION_CREATED, ARBITRATION_DOCS_RECEIVED, ARBITRATION_UNDER_REVIEW, ARBITRATION_MERCHANT_WON, ARBITRATION_MERCHANT_LOST, ARBITRATION_MERCHANT_ACCEPTED, ARBITRATION_INSUFFICIENT_EVIDENCE Show child attributes
Show child attributes
{
"preferred_evidence": [
{
"document_type": "Delivery/Service Proof",
"document_description": "Proof that the cardholder/customer received the goods or services."
},
{
"document_type": "Statement of Service",
"document_description": "Account Statement of wallet where funds were loaded by customer."
}
]
}
Show child attributes
Show child attributes
[
{
"document_id": 18150,
"document_name": "disputeSampleFile.pdf",
"document_type": "DeliveryProof"
}
]
Show child attributes
Show child attributes
{
"order_id": "Load_test_0103_FGA4HF12AC",
"order_currency": "INR",
"order_amount": 10,
"cf_payment_id": 1489901523,
"payment_currency": "INR",
"payment_amount": 10
}
Show child attributes
Show child attributes
{
"customer_name": "Manideep Ellur",
"customer_phone": 8281554863,
"customer_email": "manideep.ellur@cashfree.com"
}
Was this page helpful?