curl --request POST \
--url https://api-sandbox.finogates.com/v1/platform/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks",
"events": [
"payment_intent.succeeded",
"payment_intent.failed"
],
"event_groups": [
"payment",
"compliance"
],
"description": "Production payment notifications"
}
'import requests
url = "https://api-sandbox.finogates.com/v1/platform/webhooks"
payload = {
"url": "https://example.com/webhooks",
"events": ["payment_intent.succeeded", "payment_intent.failed"],
"event_groups": ["payment", "compliance"],
"description": "Production payment notifications"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhooks',
events: ['payment_intent.succeeded', 'payment_intent.failed'],
event_groups: ['payment', 'compliance'],
description: 'Production payment notifications'
})
};
fetch('https://api-sandbox.finogates.com/v1/platform/webhooks', 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-sandbox.finogates.com/v1/platform/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/webhooks',
'events' => [
'payment_intent.succeeded',
'payment_intent.failed'
],
'event_groups' => [
'payment',
'compliance'
],
'description' => 'Production payment notifications'
]),
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://api-sandbox.finogates.com/v1/platform/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"payment_intent.succeeded\",\n \"payment_intent.failed\"\n ],\n \"event_groups\": [\n \"payment\",\n \"compliance\"\n ],\n \"description\": \"Production payment notifications\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.finogates.com/v1/platform/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"payment_intent.succeeded\",\n \"payment_intent.failed\"\n ],\n \"event_groups\": [\n \"payment\",\n \"compliance\"\n ],\n \"description\": \"Production payment notifications\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"payment_intent.succeeded\",\n \"payment_intent.failed\"\n ],\n \"event_groups\": [\n \"payment\",\n \"compliance\"\n ],\n \"description\": \"Production payment notifications\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 200,
"data": {
"webhook": {
"id": "c4f2e8a1-3b7d-4e9f-a1c2-6d8e3f7a9b0c",
"url": "https://example.com/webhooks",
"events": [
"payment_intent.succeeded",
"payment_intent.failed",
"payout.settled"
],
"is_active": true,
"created_at": "2026-04-01T10:30:00Z"
},
"secret": "whsec_9f2b7c1a4d6e8091a2b3c4d5e6f70819"
},
"query_generated_time": 1712847600000
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Webhook
Tell Finogate the single web address where it should send you automatic updates when things happen on your platform.
When you call this, you:
- Give us one web address (URL) where you want notifications sent
- Choose which events you want to hear about — specific ones, whole groups, or all of them
Your platform has exactly one webhook. If you have already set one up, calling this again simply replaces it — the web address and the chosen events — with the new details. It does not create a second webhook.
The first time you set up your webhook, the response also includes a
signing secret: a private key you use to confirm that a notification
really came from Finogate. The signing secret is shown only once, right
here in this response — save it somewhere safe, it cannot be shown again.
When you later update an existing webhook, no new secret is issued and the
secret field is empty.
curl --request POST \
--url https://api-sandbox.finogates.com/v1/platform/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/webhooks",
"events": [
"payment_intent.succeeded",
"payment_intent.failed"
],
"event_groups": [
"payment",
"compliance"
],
"description": "Production payment notifications"
}
'import requests
url = "https://api-sandbox.finogates.com/v1/platform/webhooks"
payload = {
"url": "https://example.com/webhooks",
"events": ["payment_intent.succeeded", "payment_intent.failed"],
"event_groups": ["payment", "compliance"],
"description": "Production payment notifications"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/webhooks',
events: ['payment_intent.succeeded', 'payment_intent.failed'],
event_groups: ['payment', 'compliance'],
description: 'Production payment notifications'
})
};
fetch('https://api-sandbox.finogates.com/v1/platform/webhooks', 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-sandbox.finogates.com/v1/platform/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/webhooks',
'events' => [
'payment_intent.succeeded',
'payment_intent.failed'
],
'event_groups' => [
'payment',
'compliance'
],
'description' => 'Production payment notifications'
]),
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://api-sandbox.finogates.com/v1/platform/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"payment_intent.succeeded\",\n \"payment_intent.failed\"\n ],\n \"event_groups\": [\n \"payment\",\n \"compliance\"\n ],\n \"description\": \"Production payment notifications\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.finogates.com/v1/platform/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"payment_intent.succeeded\",\n \"payment_intent.failed\"\n ],\n \"event_groups\": [\n \"payment\",\n \"compliance\"\n ],\n \"description\": \"Production payment notifications\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/webhooks\",\n \"events\": [\n \"payment_intent.succeeded\",\n \"payment_intent.failed\"\n ],\n \"event_groups\": [\n \"payment\",\n \"compliance\"\n ],\n \"description\": \"Production payment notifications\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 200,
"data": {
"webhook": {
"id": "c4f2e8a1-3b7d-4e9f-a1c2-6d8e3f7a9b0c",
"url": "https://example.com/webhooks",
"events": [
"payment_intent.succeeded",
"payment_intent.failed",
"payout.settled"
],
"is_active": true,
"created_at": "2026-04-01T10:30:00Z"
},
"secret": "whsec_9f2b7c1a4d6e8091a2b3c4d5e6f70819"
},
"query_generated_time": 1712847600000
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Create a new webhook endpoint on the platform.
HTTPS URL that will receive webhook POST requests.
1 - 2048"https://example.com/webhooks"
Individual event types to subscribe to. An empty list subscribes to all events.
[
"payment_intent.succeeded",
"payment_intent.failed"
]
Event groups to subscribe to (e.g. 'payment', 'wallet'). Expanded into individual event types and merged with events.
["payment", "compliance"]
Optional human-readable description for the webhook endpoint.
255"Production payment notifications"
Response
Your webhook after this update. secret is present only on first setup.
Standard response wrapper for single-object responses and errors.
Generic over the payload type. A route that declares
CommonResponse[SomeModel] gets the real data schema rendered in
OpenAPI/Swagger; a bare CommonResponse leaves data untyped.

