Create application webhook
Creates a webhook configuration for the application. The application must belong to the authenticated merchant.
curl -X POST "https://api.example.com/api/v1/applications/example_string/webhooks" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
-d '{
"url": "https://merchant.example.com/hooks/kadosei"
}'
import requests
import json
url = "https://api.example.com/api/v1/applications/example_string/webhooks"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)"
}
data = {
"url": "https://merchant.example.com/hooks/kadosei"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.example.com/api/v1/applications/example_string/webhooks", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)"
},
body: JSON.stringify({
"url": "https://merchant.example.com/hooks/kadosei"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"url": "https://merchant.example.com/hooks/kadosei"
}`)
req, err := http.NewRequest("POST", "https://api.example.com/api/v1/applications/example_string/webhooks", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.example.com/api/v1/applications/example_string/webhooks')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'
request.body = '{
"url": "https://merchant.example.com/hooks/kadosei"
}'
response = http.request(request)
puts response.body
{
"id": "8a1c2f9e-3d4b-4f5a-9b6c-7d8e9f0a1b2c",
"url": "https://merchant.example.com/webhooks/kadosei",
"isActive": true,
"keyFingerprint": "whsec_****a3f2",
"signingSecret": "whsec_full_secret_value",
"subscribedEvents": [
"session.completed",
"session.expired"
],
"lastTestAt": "2026-04-20T12:34:56.000Z",
"lastTestStatus": "SUCCEEDED",
"createdAt": "2026-01-15T08:00:00.000Z",
"updatedAt": "2026-04-01T09:30:00.000Z"
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Error",
"message": "A downstream dependency responded with an error or could not be reached.",
"code": 502
}
{
"error": "Error",
"message": "A downstream dependency did not respond in time.",
"code": 504
}
POST
/api/v1/applications/{applicationId}/webhooksPOST
Base URLstring
Target server for requests. Edit to use your own host.
Bearer Token (JWT)
Bearer Tokenstring
RequiredBearer token (JWT) - just enter the token, "Bearer" prefix will be added automatically
path
applicationIdstring
RequiredID of the application that will own this webhook.
Content-Typestring
RequiredThe media type of the request body
Options: application/json
urlstring
RequiredHTTPS endpoint on the merchant server that receives webhooks.
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token (JWT). Authentication token required.
Path Parameters
applicationIdstring
RequiredID of the application that will own this webhook.
Body
application/json
urlstring
RequiredHTTPS endpoint on the merchant server that receives webhooks.
Example:
https://merchant.example.com/hooks/kadoseiResponses
Was this page helpful?