Update webhook configuration
curl --request PATCH \
--url https://sandbox-api.kotanipay.com/api/v3/integrator/webhook \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_secret": "whsec_1234567890abcdef",
"webhook_events": [
"transaction.deposit.status.updated"
]
}
'import requests
url = "https://sandbox-api.kotanipay.com/api/v3/integrator/webhook"
payload = {
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_secret": "whsec_1234567890abcdef",
"webhook_events": ["transaction.deposit.status.updated"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_url: 'https://example.com/kotani/webhooks',
webhook_secret: 'whsec_1234567890abcdef',
webhook_events: ['transaction.deposit.status.updated']
})
};
fetch('https://sandbox-api.kotanipay.com/api/v3/integrator/webhook', 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-api.kotanipay.com/api/v3/integrator/webhook",
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([
'webhook_url' => 'https://example.com/kotani/webhooks',
'webhook_secret' => 'whsec_1234567890abcdef',
'webhook_events' => [
'transaction.deposit.status.updated'
]
]),
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://sandbox-api.kotanipay.com/api/v3/integrator/webhook"
payload := strings.NewReader("{\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_1234567890abcdef\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sandbox-api.kotanipay.com/api/v3/integrator/webhook")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_1234567890abcdef\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.kotanipay.com/api/v3/integrator/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_1234567890abcdef\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Integrator webhook settings updated successfully.",
"data": {
"organization": "A&B Company",
"first_name": "John",
"last_name": "Doe",
"email": "ab@gmail.com",
"phone": "+xxx xxx xxx xxx",
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_events": [
"transaction.deposit.status.updated",
"payment.confirmed"
]
}
}{
"success": false,
"message": "Bad Request",
"data": {}
}{
"success": false,
"message": "Unauthorized",
"data": {}
}{
"success": false,
"message": "Not Found",
"data": {}
}Authentication & Setup
Update Webhook Configuration
Allows an integrator to update their default webhook URL, secret, and event subscriptions.
PATCH
/
api
/
v3
/
integrator
/
webhook
Update webhook configuration
curl --request PATCH \
--url https://sandbox-api.kotanipay.com/api/v3/integrator/webhook \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_secret": "whsec_1234567890abcdef",
"webhook_events": [
"transaction.deposit.status.updated"
]
}
'import requests
url = "https://sandbox-api.kotanipay.com/api/v3/integrator/webhook"
payload = {
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_secret": "whsec_1234567890abcdef",
"webhook_events": ["transaction.deposit.status.updated"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhook_url: 'https://example.com/kotani/webhooks',
webhook_secret: 'whsec_1234567890abcdef',
webhook_events: ['transaction.deposit.status.updated']
})
};
fetch('https://sandbox-api.kotanipay.com/api/v3/integrator/webhook', 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-api.kotanipay.com/api/v3/integrator/webhook",
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([
'webhook_url' => 'https://example.com/kotani/webhooks',
'webhook_secret' => 'whsec_1234567890abcdef',
'webhook_events' => [
'transaction.deposit.status.updated'
]
]),
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://sandbox-api.kotanipay.com/api/v3/integrator/webhook"
payload := strings.NewReader("{\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_1234567890abcdef\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sandbox-api.kotanipay.com/api/v3/integrator/webhook")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_1234567890abcdef\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.kotanipay.com/api/v3/integrator/webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_1234567890abcdef\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Integrator webhook settings updated successfully.",
"data": {
"organization": "A&B Company",
"first_name": "John",
"last_name": "Doe",
"email": "ab@gmail.com",
"phone": "+xxx xxx xxx xxx",
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_events": [
"transaction.deposit.status.updated",
"payment.confirmed"
]
}
}{
"success": false,
"message": "Bad Request",
"data": {}
}{
"success": false,
"message": "Unauthorized",
"data": {}
}{
"success": false,
"message": "Not Found",
"data": {}
}Update your integrator’s webhook URL, secret, and event subscriptions for receiving real-time notifications.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Default webhook callback URL
Example:
"https://example.com/kotani/webhooks"
Shared secret used to sign webhook payloads
Example:
"whsec_1234567890abcdef"
Webhook events this integrator should receive
Available options:
transaction.status.updated, transaction.deposit.status.updated, transaction.withdrawal.status.updated, transaction.onramp.status.updated, transaction.offramp.status.updated, payment.confirmed, kyc.status.changed, refund.lightning.invoice_needed, refund.completed, refund.failed, settlement.approved, settlement.rejected, settlement.processed, settlement.cancelled, settlement.paused, settlement.batch.approved, settlement.batch.rejected, settlement.batch.processed, settlement.batch.partial, settlement.batch.cancelled, settlement.batch.consolidated, system.event Example:
["transaction.deposit.status.updated"]
⌘I