curl --request PUT \
--url https://api.tabby.ai/api/v1/dispute-webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Merchant-Code: <x-merchant-code>' \
--data '
{
"url": "https://example.com/tabby/dispute-webhook"
}
'import requests
url = "https://api.tabby.ai/api/v1/dispute-webhooks/{id}"
payload = { "url": "https://example.com/tabby/dispute-webhook" }
headers = {
"X-Merchant-Code": "<x-merchant-code>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Merchant-Code': '<x-merchant-code>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://example.com/tabby/dispute-webhook'})
};
fetch('https://api.tabby.ai/api/v1/dispute-webhooks/{id}', 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/dispute-webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/tabby/dispute-webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Merchant-Code: <x-merchant-code>"
],
]);
$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/dispute-webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"https://example.com/tabby/dispute-webhook\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Merchant-Code", "<x-merchant-code>")
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.put("https://api.tabby.ai/api/v1/dispute-webhooks/{id}")
.header("X-Merchant-Code", "<x-merchant-code>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/tabby/dispute-webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v1/dispute-webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Merchant-Code"] = '<x-merchant-code>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/tabby/dispute-webhook\"\n}"
response = http.request(request)
puts response.read_body{
"id": "f5eb7c26-b163-4fad-b75f-66024824116e",
"url": "https://example.com/tabby/dispute-webhook",
"header": {
"title": "X-Auth-Key",
"value": "****cret"
}
}{
"status": "error",
"errorType": "bad_data",
"error": "bad_request"
}{
"status": "error",
"errorType": "not_authorized",
"error": "invalid secret key"
}{
"status": "error",
"errorType": "no_permission",
"error": "disputes have no test mode"
}{
"status": "error",
"errorType": "not_found",
"error": "webhook not found"
}{
"status": "error",
"errorType": "internal",
"error": "internal"
}Update a dispute webhook
Updates the specified dispute webhook. The request replaces the whole object:
send both url and header; omitting header removes it. The same URL rules
as on registration apply (normalised, unique per merchant).
curl --request PUT \
--url https://api.tabby.ai/api/v1/dispute-webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Merchant-Code: <x-merchant-code>' \
--data '
{
"url": "https://example.com/tabby/dispute-webhook"
}
'import requests
url = "https://api.tabby.ai/api/v1/dispute-webhooks/{id}"
payload = { "url": "https://example.com/tabby/dispute-webhook" }
headers = {
"X-Merchant-Code": "<x-merchant-code>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Merchant-Code': '<x-merchant-code>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://example.com/tabby/dispute-webhook'})
};
fetch('https://api.tabby.ai/api/v1/dispute-webhooks/{id}', 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/dispute-webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/tabby/dispute-webhook'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Merchant-Code: <x-merchant-code>"
],
]);
$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/dispute-webhooks/{id}"
payload := strings.NewReader("{\n \"url\": \"https://example.com/tabby/dispute-webhook\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Merchant-Code", "<x-merchant-code>")
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.put("https://api.tabby.ai/api/v1/dispute-webhooks/{id}")
.header("X-Merchant-Code", "<x-merchant-code>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/tabby/dispute-webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tabby.ai/api/v1/dispute-webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Merchant-Code"] = '<x-merchant-code>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/tabby/dispute-webhook\"\n}"
response = http.request(request)
puts response.read_body{
"id": "f5eb7c26-b163-4fad-b75f-66024824116e",
"url": "https://example.com/tabby/dispute-webhook",
"header": {
"title": "X-Auth-Key",
"value": "****cret"
}
}{
"status": "error",
"errorType": "bad_data",
"error": "bad_request"
}{
"status": "error",
"errorType": "not_authorized",
"error": "invalid secret key"
}{
"status": "error",
"errorType": "no_permission",
"error": "disputes have no test mode"
}{
"status": "error",
"errorType": "not_found",
"error": "webhook not found"
}{
"status": "error",
"errorType": "internal",
"error": "internal"
}Authorizations
Bearer authentication header of the form Bearer <secret_key>, where <secret_key> is your secret_key.
Headers
Merchant code the request is scoped to. Required on every dispute-webhook request, even when your secret key maps to a single merchant; case-insensitive.
"code provided to you from Tabby side"
Path Parameters
ID of the webhook.
"webhook id, uuid format"
Body
Endpoint for dispute notifications (HTTPS recommended). Must be an absolute URL with a publicly resolvable host name — localhost, raw IP addresses and hosts that do not resolve are rejected. Normalised before it is stored (lower-case scheme and host, default port and trailing slash removed) and unique per merchant.
"https://example.com/tabby/dispute-webhook"
Optional static header Tabby adds to every notification so you can verify its origin. Omit it on PUT to remove the header.
Show child attributes
Show child attributes
Response
Success. Dispute webhook object is returned; header.value is masked.
Unique dispute webhook ID, assigned by Tabby.
"f5eb7c26-b163-4fad-b75f-66024824116e"
Endpoint for dispute notifications, as stored (normalised).
"https://example.com/tabby/dispute-webhook"
The signing header, if one was registered. value is masked.
Show child attributes
Show child attributes
Was this page helpful?