Update webhook config
curl --request PATCH \
--url https://api.contro.me/v1/partner/webhooks/config \
--header 'Content-Type: application/json' \
--header 'x-contro-api-key: <api-key>' \
--data '
{
"webhookUrl": "https://your-app.com/webhooks/contro",
"webhookSecret": "whsec_your_secret_min_16_chars",
"subscribedEvents": [
"card.transaction",
"cardholder.kyc.updated",
"balance.low"
]
}
'import requests
url = "https://api.contro.me/v1/partner/webhooks/config"
payload = {
"webhookUrl": "https://your-app.com/webhooks/contro",
"webhookSecret": "whsec_your_secret_min_16_chars",
"subscribedEvents": ["card.transaction", "cardholder.kyc.updated", "balance.low"]
}
headers = {
"x-contro-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-contro-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhookUrl: 'https://your-app.com/webhooks/contro',
webhookSecret: 'whsec_your_secret_min_16_chars',
subscribedEvents: ['card.transaction', 'cardholder.kyc.updated', 'balance.low']
})
};
fetch('https://api.contro.me/v1/partner/webhooks/config', 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.contro.me/v1/partner/webhooks/config",
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([
'webhookUrl' => 'https://your-app.com/webhooks/contro',
'webhookSecret' => 'whsec_your_secret_min_16_chars',
'subscribedEvents' => [
'card.transaction',
'cardholder.kyc.updated',
'balance.low'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-contro-api-key: <api-key>"
],
]);
$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.contro.me/v1/partner/webhooks/config"
payload := strings.NewReader("{\n \"webhookUrl\": \"https://your-app.com/webhooks/contro\",\n \"webhookSecret\": \"whsec_your_secret_min_16_chars\",\n \"subscribedEvents\": [\n \"card.transaction\",\n \"cardholder.kyc.updated\",\n \"balance.low\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-contro-api-key", "<api-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.contro.me/v1/partner/webhooks/config")
.header("x-contro-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhookUrl\": \"https://your-app.com/webhooks/contro\",\n \"webhookSecret\": \"whsec_your_secret_min_16_chars\",\n \"subscribedEvents\": [\n \"card.transaction\",\n \"cardholder.kyc.updated\",\n \"balance.low\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contro.me/v1/partner/webhooks/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-contro-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhookUrl\": \"https://your-app.com/webhooks/contro\",\n \"webhookSecret\": \"whsec_your_secret_min_16_chars\",\n \"subscribedEvents\": [\n \"card.transaction\",\n \"cardholder.kyc.updated\",\n \"balance.low\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Webhooks
Update webhook config
Update the partner’s webhook configuration
PATCH
/
partner
/
webhooks
/
config
Update webhook config
curl --request PATCH \
--url https://api.contro.me/v1/partner/webhooks/config \
--header 'Content-Type: application/json' \
--header 'x-contro-api-key: <api-key>' \
--data '
{
"webhookUrl": "https://your-app.com/webhooks/contro",
"webhookSecret": "whsec_your_secret_min_16_chars",
"subscribedEvents": [
"card.transaction",
"cardholder.kyc.updated",
"balance.low"
]
}
'import requests
url = "https://api.contro.me/v1/partner/webhooks/config"
payload = {
"webhookUrl": "https://your-app.com/webhooks/contro",
"webhookSecret": "whsec_your_secret_min_16_chars",
"subscribedEvents": ["card.transaction", "cardholder.kyc.updated", "balance.low"]
}
headers = {
"x-contro-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-contro-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
webhookUrl: 'https://your-app.com/webhooks/contro',
webhookSecret: 'whsec_your_secret_min_16_chars',
subscribedEvents: ['card.transaction', 'cardholder.kyc.updated', 'balance.low']
})
};
fetch('https://api.contro.me/v1/partner/webhooks/config', 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.contro.me/v1/partner/webhooks/config",
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([
'webhookUrl' => 'https://your-app.com/webhooks/contro',
'webhookSecret' => 'whsec_your_secret_min_16_chars',
'subscribedEvents' => [
'card.transaction',
'cardholder.kyc.updated',
'balance.low'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-contro-api-key: <api-key>"
],
]);
$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.contro.me/v1/partner/webhooks/config"
payload := strings.NewReader("{\n \"webhookUrl\": \"https://your-app.com/webhooks/contro\",\n \"webhookSecret\": \"whsec_your_secret_min_16_chars\",\n \"subscribedEvents\": [\n \"card.transaction\",\n \"cardholder.kyc.updated\",\n \"balance.low\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-contro-api-key", "<api-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.contro.me/v1/partner/webhooks/config")
.header("x-contro-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"webhookUrl\": \"https://your-app.com/webhooks/contro\",\n \"webhookSecret\": \"whsec_your_secret_min_16_chars\",\n \"subscribedEvents\": [\n \"card.transaction\",\n \"cardholder.kyc.updated\",\n \"balance.low\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contro.me/v1/partner/webhooks/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-contro-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"webhookUrl\": \"https://your-app.com/webhooks/contro\",\n \"webhookSecret\": \"whsec_your_secret_min_16_chars\",\n \"subscribedEvents\": [\n \"card.transaction\",\n \"cardholder.kyc.updated\",\n \"balance.low\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
Partner API key (sk_live_* for production, sk_test_* for sandbox)
Body
application/json
HTTPS URL to receive events. Must use https://
Example:
"https://your-app.com/webhooks/contro"
Secret for HMAC-SHA256 signature verification. Min 16 characters
Minimum string length:
16Example:
"whsec_your_secret_min_16_chars"
Event types to subscribe to
Example:
[
"card.transaction",
"cardholder.kyc.updated",
"balance.low"
]
Response
Webhook config updated
Available options:
true