Challenge disputes
curl --request POST \
--url https://api.tabby.ai/api/v1/disputes/challenge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dispute_id": "uuid",
"description": "Comment for Tabby support",
"reason": "merchant_reason_other",
"amount": "100",
"attachment_ids": [
"attachment id, uuid format"
]
}
'import requests
url = "https://api.tabby.ai/api/v1/disputes/challenge"
payload = {
"dispute_id": "uuid",
"description": "Comment for Tabby support",
"reason": "merchant_reason_other",
"amount": "100",
"attachment_ids": ["attachment id, uuid format"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dispute_id: 'uuid',
description: 'Comment for Tabby support',
reason: 'merchant_reason_other',
amount: '100',
attachment_ids: ['attachment id, uuid format']
})
};
fetch('https://api.tabby.ai/api/v1/disputes/challenge', 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://api.tabby.ai/api/v1/disputes/challenge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dispute_id' => 'uuid',
'description' => 'Comment for Tabby support',
'reason' => 'merchant_reason_other',
'amount' => '100',
'attachment_ids' => [
'attachment id, uuid format'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.tabby.ai/api/v1/disputes/challenge"
payload := strings.NewReader("{\n \"dispute_id\": \"uuid\",\n \"description\": \"Comment for Tabby support\",\n \"reason\": \"merchant_reason_other\",\n \"amount\": \"100\",\n \"attachment_ids\": [\n \"attachment id, uuid format\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tabby.ai/api/v1/disputes/challenge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dispute_id\": \"uuid\",\n \"description\": \"Comment for Tabby support\",\n \"reason\": \"merchant_reason_other\",\n \"amount\": \"100\",\n \"attachment_ids\": [\n \"attachment id, uuid format\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v1/disputes/challenge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dispute_id\": \"uuid\",\n \"description\": \"Comment for Tabby support\",\n \"reason\": \"merchant_reason_other\",\n \"amount\": \"100\",\n \"attachment_ids\": [\n \"attachment id, uuid format\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"disputes": [
{
"id": "dispute id, uuid format",
"attachments": [
"attachment_1"
],
"payment_id": "payment id, uuid format",
"amount": "100.00",
"currency": "AED",
"created_at": "2018-10-17T00:00:00.000Z",
"expired_at": "2018-10-17T00:00:00.000Z",
"status": "new",
"reason": "unreceived_refund",
"days_left": 123,
"items": [
{
"reference_id": "payment id",
"title": "Order item title",
"unit_price": "100.00"
}
],
"order_number": "#1234",
"comment": "additional comments"
}
]
}{
"status": "error",
"errorType": "bad_data",
"error": "bad_request"
}{
"status": "error",
"errorType": "not_authorized",
"error": "invalid secret key"
}"404 page not found"{
"status": "error",
"errorType": "internal",
"error": "Internal Server Error"
}Disputes
Challenge disputes
Challenge disputes (request Tabby support to take a look at the case). Only 20 disputes can be challenged within a single request. Only disputes with status ‘new’ might be challenged.
POST
/
api
/
v1
/
disputes
/
challenge
Challenge disputes
curl --request POST \
--url https://api.tabby.ai/api/v1/disputes/challenge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dispute_id": "uuid",
"description": "Comment for Tabby support",
"reason": "merchant_reason_other",
"amount": "100",
"attachment_ids": [
"attachment id, uuid format"
]
}
'import requests
url = "https://api.tabby.ai/api/v1/disputes/challenge"
payload = {
"dispute_id": "uuid",
"description": "Comment for Tabby support",
"reason": "merchant_reason_other",
"amount": "100",
"attachment_ids": ["attachment id, uuid format"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dispute_id: 'uuid',
description: 'Comment for Tabby support',
reason: 'merchant_reason_other',
amount: '100',
attachment_ids: ['attachment id, uuid format']
})
};
fetch('https://api.tabby.ai/api/v1/disputes/challenge', 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://api.tabby.ai/api/v1/disputes/challenge",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dispute_id' => 'uuid',
'description' => 'Comment for Tabby support',
'reason' => 'merchant_reason_other',
'amount' => '100',
'attachment_ids' => [
'attachment id, uuid format'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.tabby.ai/api/v1/disputes/challenge"
payload := strings.NewReader("{\n \"dispute_id\": \"uuid\",\n \"description\": \"Comment for Tabby support\",\n \"reason\": \"merchant_reason_other\",\n \"amount\": \"100\",\n \"attachment_ids\": [\n \"attachment id, uuid format\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tabby.ai/api/v1/disputes/challenge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dispute_id\": \"uuid\",\n \"description\": \"Comment for Tabby support\",\n \"reason\": \"merchant_reason_other\",\n \"amount\": \"100\",\n \"attachment_ids\": [\n \"attachment id, uuid format\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v1/disputes/challenge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dispute_id\": \"uuid\",\n \"description\": \"Comment for Tabby support\",\n \"reason\": \"merchant_reason_other\",\n \"amount\": \"100\",\n \"attachment_ids\": [\n \"attachment id, uuid format\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"disputes": [
{
"id": "dispute id, uuid format",
"attachments": [
"attachment_1"
],
"payment_id": "payment id, uuid format",
"amount": "100.00",
"currency": "AED",
"created_at": "2018-10-17T00:00:00.000Z",
"expired_at": "2018-10-17T00:00:00.000Z",
"status": "new",
"reason": "unreceived_refund",
"days_left": 123,
"items": [
{
"reference_id": "payment id",
"title": "Order item title",
"unit_price": "100.00"
}
],
"order_number": "#1234",
"comment": "additional comments"
}
]
}{
"status": "error",
"errorType": "bad_data",
"error": "bad_request"
}{
"status": "error",
"errorType": "not_authorized",
"error": "invalid secret key"
}"404 page not found"{
"status": "error",
"errorType": "internal",
"error": "Internal Server Error"
}Authorizations
Bearer authentication header of the form Bearer <secret_key>, where <secret_key> is your secret_key.
Body
application/json
ID of the dispute
Example:
"uuid"
Comment for Tabby support.
Example:
"Comment for Tabby support"
Reason for requesting dispute challenge:
merchant_reason_other- there were other problems with the order that required further clarification;merchant_reason_order_on_its_way- the order has been confirmed and is in the process of being delivered;merchant_reason_order_has_been_already_delivered- the order has already been delivered and is complete;merchant_reason_order_amount_should_be_different- there was a problem with the amount of the order and it needed to be changed;merchant_reason_problem_with_delivery- there was a problem with the order during delivery that needed to be adjusted and resolved.
Available options:
merchant_reason_other, merchant_reason_order_on_its_way, merchant_reason_order_has_been_already_delivered, merchant_reason_order_amount_should_be_different, merchant_reason_problem_with_delivery Example:
"merchant_reason_other"
If the dispute challenged with reason merchant_reason_order_amount_should_be_different - a new disputed amount is required.
Example:
"100"
Attachment ID that will be attached. ID can be received via upload attachment endpoint.
Response
Success. Disputes were challenged.
Show child attributes
Show child attributes
Was this page helpful?