Rotate the signing secret
curl --request POST \
--url https://checkout.kalixo.io/v1/webhook-endpoints/{id}/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://checkout.kalixo.io/v1/webhook-endpoints/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://checkout.kalixo.io/v1/webhook-endpoints/{id}/rotate-secret"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://checkout.kalixo.io/v1/webhook-endpoints/{id}/rotate-secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "we_01JABCDEF",
"object": "webhook_endpoint",
"url": "<string>",
"enabled_events": [
"<string>"
],
"status": "enabled",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"secret": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "amount_locked",
"message": "<string>",
"request_id": "<string>",
"decline_code": "<string>",
"param": "<string>"
}
}Webhook endpoints
Rotate the signing secret
Returns a new secret. The previous secret keeps signing deliveries for
24 hours (both signatures are sent in Kalixo-Signature).
POST
/
v1
/
webhook-endpoints
/
{id}
/
rotate-secret
Rotate the signing secret
curl --request POST \
--url https://checkout.kalixo.io/v1/webhook-endpoints/{id}/rotate-secret \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://checkout.kalixo.io/v1/webhook-endpoints/{id}/rotate-secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://checkout.kalixo.io/v1/webhook-endpoints/{id}/rotate-secret"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://checkout.kalixo.io/v1/webhook-endpoints/{id}/rotate-secret",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "we_01JABCDEF",
"object": "webhook_endpoint",
"url": "<string>",
"enabled_events": [
"<string>"
],
"status": "enabled",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"secret": "<string>"
}{
"error": {
"type": "invalid_request_error",
"code": "amount_locked",
"message": "<string>",
"request_id": "<string>",
"decline_code": "<string>",
"param": "<string>"
}
}Authorizations
Secret key, kc_sk_test_... or kc_sk_live_.... Server-side only.
Headers
Unique key per logical request, reused on retries. 1 to 255 characters.
Required string length:
1 - 255Path Parameters
Response
Webhook endpoint with the new secret.
Example:
"we_01JABCDEF"
Allowed value:
"webhook_endpoint"Event types, or ["*"] for all.
Available options:
enabled, disabled Only returned on create and rotate. Starts with whsec_.