Creating a dispute

How to create a dispute of a transaction.

To create a dispute, use the POST /disputes operation and provide the parameters as shown in the table below.

Parameter

Type

Description

customer_id
required

string

The unique ID used to reference the customer resource.

transaction_id
required

string

Unique ID for the disputed transaction.

email
required

string

Customer's email address.

phone
required

string

Customer's phone number.

dispute_reason
required

string

The reason for this dispute. Either MERCHANT_DISPUTE or FRAUD.

dispute_details
required

string

Details of the dispute, freeform text.

file_attachments
required

array of objects

Details of the file-attachments submitted, as shown in the file_attachments object table below.

The file_attachments object has the structure shown in the table below. You can submit multiple file attachments.

file_attachments object

Type

Description

file_name
required

string

Name of the file being submitted to support the claim, for example dispute_attachment.pdf

file
required

string

The file as a base64 encoded string, for example 2c61460f-e4af-48d9-b027-e2612f09e376.

An example of a request to create a dispute is shown below.

curl --request POST \
     --url https://sandbox.bond.tech/api/v0.1/disputes \
     --header 'Accept: application/json' \
     --header 'Authorization: YOUR-AUTHENTICATION' \
     --header 'Content-Type: application/json' \
     --header 'Identity: YOUR-IDENTITY' \
     --data '
{
     "file_attachments": [
          {
               "filename": "dispute_attachment.pdf",
               "file": "06c33e31-0811-46ad-9588-9c5d09537372"
          }
     ],
     "customer_id": "2c61460f-e4af-48d9-b027-e2612f09e376",
     "transaction_id": "06c33e31-0811-46ad-9588-9c5d09537372",
     "email": "[email protected]",
     "phone": "001 (728) 4355896",
     "dispute_reason": "FRAUD",
     "dispute_details": "Customer not present."
}
'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.bond.tech/api/v0.1/disputes")

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

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHENTICATION'
request.body = "{\"file_attachments\":[{\"filename\":\"dispute_attachment.pdf\",\"file\":\"06c33e31-0811-46ad-9588-9c5d09537372\"}],\"customer_id\":\"2c61460f-e4af-48d9-b027-e2612f09e376\",\"transaction_id\":\"06c33e31-0811-46ad-9588-9c5d09537372\",\"email\":\"[email protected]\",\"phone\":\"001 (728) 4355896\",\"dispute_reason\":\"FRAUD\",\"dispute_details\":\"Customer not present.\"}"

response = http.request(request)
puts response.read_body
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Identity: 'YOUR-IDENTITY',
    Authorization: 'YOUR-AUTHENTICATION'
  },
  body: JSON.stringify({
    file_attachments: [
      {
        filename: 'dispute_attachment.pdf',
        file: '06c33e31-0811-46ad-9588-9c5d09537372'
      }
    ],
    customer_id: '2c61460f-e4af-48d9-b027-e2612f09e376',
    transaction_id: '06c33e31-0811-46ad-9588-9c5d09537372',
    email: '[email protected]',
    phone: '001 (728) 4355896',
    dispute_reason: 'FRAUD',
    dispute_details: 'Customer not present.'
  })
};

fetch('https://sandbox.bond.tech/api/v0.1/disputes', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://sandbox.bond.tech/api/v0.1/disputes"

payload = {
    "file_attachments": [
        {
            "filename": "dispute_attachment.pdf",
            "file": "06c33e31-0811-46ad-9588-9c5d09537372"
        }
    ],
    "customer_id": "2c61460f-e4af-48d9-b027-e2612f09e376",
    "transaction_id": "06c33e31-0811-46ad-9588-9c5d09537372",
    "email": "[email protected]",
    "phone": "001 (728) 4355896",
    "dispute_reason": "FRAUD",
    "dispute_details": "Customer not present."
}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Identity": "YOUR-IDENTITY",
    "Authorization": "YOUR-AUTHENTICATION"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/disputes");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHENTICATION");
request.AddParameter("application/json", "{\"file_attachments\":[{\"filename\":\"dispute_attachment.pdf\",\"file\":\"06c33e31-0811-46ad-9588-9c5d09537372\"}],\"customer_id\":\"2c61460f-e4af-48d9-b027-e2612f09e376\",\"transaction_id\":\"06c33e31-0811-46ad-9588-9c5d09537372\",\"email\":\"[email protected]\",\"phone\":\"001 (728) 4355896\",\"dispute_reason\":\"FRAUD\",\"dispute_details\":\"Customer not present.\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"file_attachments\":[{\"filename\":\"dispute_attachment.pdf\",\"file\":\"06c33e31-0811-46ad-9588-9c5d09537372\"}],\"customer_id\":\"2c61460f-e4af-48d9-b027-e2612f09e376\",\"transaction_id\":\"06c33e31-0811-46ad-9588-9c5d09537372\",\"email\":\"[email protected]\",\"phone\":\"001 (728) 4355896\",\"dispute_reason\":\"FRAUD\",\"dispute_details\":\"Customer not present.\"}");
Request request = new Request.Builder()
  .url("https://sandbox.bond.tech/api/v0.1/disputes")
  .post(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Identity", "YOUR-IDENTITY")
  .addHeader("Authorization", "YOUR-AUTHENTICATION")
  .build();

Response response = client.newCall(request).execute();

An example of a response to a successful request to create a dispute is shown below.

{
  "dispute_id": "06c33e31-0811-46ad-9588-9c5d09537372",
  "dispute_status": "submitted"
}

For a complete specification and interactive examples, see Creating a dispute in the Bond API Reference.


Did this page help you?