Update Webhook Subscription
curl --request PATCH \
--url https://api.example.com/customer/webhooks/subscriptions/{subscription_id} \
--header 'Content-Type: application/json' \
--header 'X-API-NONCE: <x-api-nonce>' \
--header 'X-API-SIGNATURE: <x-api-signature>' \
--header 'X-API-SUBSCRIPTION-KEY: <x-api-subscription-key>' \
--header 'X-API-TIMESTAMP: <x-api-timestamp>' \
--data '
{
"callback_url": "https://example.com/webhooks/indx-v2",
"description": "<string>"
}
'import requests
url = "https://api.example.com/customer/webhooks/subscriptions/{subscription_id}"
payload = {
"callback_url": "https://example.com/webhooks/indx-v2",
"description": "<string>"
}
headers = {
"X-API-SIGNATURE": "<x-api-signature>",
"X-API-TIMESTAMP": "<x-api-timestamp>",
"X-API-NONCE": "<x-api-nonce>",
"X-API-SUBSCRIPTION-KEY": "<x-api-subscription-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-API-SIGNATURE': '<x-api-signature>',
'X-API-TIMESTAMP': '<x-api-timestamp>',
'X-API-NONCE': '<x-api-nonce>',
'X-API-SUBSCRIPTION-KEY': '<x-api-subscription-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({callback_url: 'https://example.com/webhooks/indx-v2', description: '<string>'})
};
fetch('https://api.example.com/customer/webhooks/subscriptions/{subscription_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.example.com/customer/webhooks/subscriptions/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'callback_url' => 'https://example.com/webhooks/indx-v2',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-NONCE: <x-api-nonce>",
"X-API-SIGNATURE: <x-api-signature>",
"X-API-SUBSCRIPTION-KEY: <x-api-subscription-key>",
"X-API-TIMESTAMP: <x-api-timestamp>"
],
]);
$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.example.com/customer/webhooks/subscriptions/{subscription_id}"
payload := strings.NewReader("{\n \"callback_url\": \"https://example.com/webhooks/indx-v2\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-SIGNATURE", "<x-api-signature>")
req.Header.Add("X-API-TIMESTAMP", "<x-api-timestamp>")
req.Header.Add("X-API-NONCE", "<x-api-nonce>")
req.Header.Add("X-API-SUBSCRIPTION-KEY", "<x-api-subscription-key>")
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.patch("https://api.example.com/customer/webhooks/subscriptions/{subscription_id}")
.header("X-API-SIGNATURE", "<x-api-signature>")
.header("X-API-TIMESTAMP", "<x-api-timestamp>")
.header("X-API-NONCE", "<x-api-nonce>")
.header("X-API-SUBSCRIPTION-KEY", "<x-api-subscription-key>")
.header("Content-Type", "application/json")
.body("{\n \"callback_url\": \"https://example.com/webhooks/indx-v2\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/customer/webhooks/subscriptions/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-SIGNATURE"] = '<x-api-signature>'
request["X-API-TIMESTAMP"] = '<x-api-timestamp>'
request["X-API-NONCE"] = '<x-api-nonce>'
request["X-API-SUBSCRIPTION-KEY"] = '<x-api-subscription-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callback_url\": \"https://example.com/webhooks/indx-v2\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_type": "1234",
"callback_url": "https://example.com/webhook",
"created_at": "1234",
"description": "Transaction events",
"status": "1234",
"updated_at": "1234"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Webhook Endpoints
Update Webhook
Update an existing webhook subscription.
PATCH
/
customer
/
webhooks
/
subscriptions
/
{subscription_id}
Update Webhook Subscription
curl --request PATCH \
--url https://api.example.com/customer/webhooks/subscriptions/{subscription_id} \
--header 'Content-Type: application/json' \
--header 'X-API-NONCE: <x-api-nonce>' \
--header 'X-API-SIGNATURE: <x-api-signature>' \
--header 'X-API-SUBSCRIPTION-KEY: <x-api-subscription-key>' \
--header 'X-API-TIMESTAMP: <x-api-timestamp>' \
--data '
{
"callback_url": "https://example.com/webhooks/indx-v2",
"description": "<string>"
}
'import requests
url = "https://api.example.com/customer/webhooks/subscriptions/{subscription_id}"
payload = {
"callback_url": "https://example.com/webhooks/indx-v2",
"description": "<string>"
}
headers = {
"X-API-SIGNATURE": "<x-api-signature>",
"X-API-TIMESTAMP": "<x-api-timestamp>",
"X-API-NONCE": "<x-api-nonce>",
"X-API-SUBSCRIPTION-KEY": "<x-api-subscription-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-API-SIGNATURE': '<x-api-signature>',
'X-API-TIMESTAMP': '<x-api-timestamp>',
'X-API-NONCE': '<x-api-nonce>',
'X-API-SUBSCRIPTION-KEY': '<x-api-subscription-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({callback_url: 'https://example.com/webhooks/indx-v2', description: '<string>'})
};
fetch('https://api.example.com/customer/webhooks/subscriptions/{subscription_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.example.com/customer/webhooks/subscriptions/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'callback_url' => 'https://example.com/webhooks/indx-v2',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-NONCE: <x-api-nonce>",
"X-API-SIGNATURE: <x-api-signature>",
"X-API-SUBSCRIPTION-KEY: <x-api-subscription-key>",
"X-API-TIMESTAMP: <x-api-timestamp>"
],
]);
$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.example.com/customer/webhooks/subscriptions/{subscription_id}"
payload := strings.NewReader("{\n \"callback_url\": \"https://example.com/webhooks/indx-v2\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-SIGNATURE", "<x-api-signature>")
req.Header.Add("X-API-TIMESTAMP", "<x-api-timestamp>")
req.Header.Add("X-API-NONCE", "<x-api-nonce>")
req.Header.Add("X-API-SUBSCRIPTION-KEY", "<x-api-subscription-key>")
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.patch("https://api.example.com/customer/webhooks/subscriptions/{subscription_id}")
.header("X-API-SIGNATURE", "<x-api-signature>")
.header("X-API-TIMESTAMP", "<x-api-timestamp>")
.header("X-API-NONCE", "<x-api-nonce>")
.header("X-API-SUBSCRIPTION-KEY", "<x-api-subscription-key>")
.header("Content-Type", "application/json")
.body("{\n \"callback_url\": \"https://example.com/webhooks/indx-v2\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/customer/webhooks/subscriptions/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-SIGNATURE"] = '<x-api-signature>'
request["X-API-TIMESTAMP"] = '<x-api-timestamp>'
request["X-API-NONCE"] = '<x-api-nonce>'
request["X-API-SUBSCRIPTION-KEY"] = '<x-api-subscription-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callback_url\": \"https://example.com/webhooks/indx-v2\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"data": {
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_type": "1234",
"callback_url": "https://example.com/webhook",
"created_at": "1234",
"description": "Transaction events",
"status": "1234",
"updated_at": "1234"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Signature header
Timestamp header
Nonce header
Account ID header
Path Parameters
Body
application/json
Schema to deserialize the webhook subscription update request.
New HTTPS endpoint to deliver events to
Required string length:
1 - 2083Example:
"https://example.com/webhooks/indx-v2"
Updated friendly label for this subscription
Example:
"<string>"
Enable or pause delivery without deleting the subscription
Available options:
active, disabled ⌘I