Register a webhook
curl --request POST \
--url https://api.venlyfinance.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://client.example/hooks/venly",
"name": "Production events",
"authenticationMethod": {
"type": "API_KEY",
"headerName": "X-Webhook-Key",
"apiKey": "whsec_9f2c41ab7d"
}
}
'import requests
url = "https://api.venlyfinance.com/v1/webhooks"
payload = {
"url": "https://client.example/hooks/venly",
"name": "Production events",
"authenticationMethod": {
"type": "API_KEY",
"headerName": "X-Webhook-Key",
"apiKey": "whsec_9f2c41ab7d"
}
}
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://client.example/hooks/venly',
name: 'Production events',
authenticationMethod: {type: 'API_KEY', headerName: 'X-Webhook-Key', apiKey: 'whsec_9f2c41ab7d'}
})
};
fetch('https://api.venlyfinance.com/v1/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.venlyfinance.com/v1/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://client.example/hooks/venly',
'name' => 'Production events',
'authenticationMethod' => [
'type' => 'API_KEY',
'headerName' => 'X-Webhook-Key',
'apiKey' => 'whsec_9f2c41ab7d'
]
]),
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.venlyfinance.com/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://client.example/hooks/venly\",\n \"name\": \"Production events\",\n \"authenticationMethod\": {\n \"type\": \"API_KEY\",\n \"headerName\": \"X-Webhook-Key\",\n \"apiKey\": \"whsec_9f2c41ab7d\"\n }\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.venlyfinance.com/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://client.example/hooks/venly\",\n \"name\": \"Production events\",\n \"authenticationMethod\": {\n \"type\": \"API_KEY\",\n \"headerName\": \"X-Webhook-Key\",\n \"apiKey\": \"whsec_9f2c41ab7d\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venlyfinance.com/v1/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://client.example/hooks/venly\",\n \"name\": \"Production events\",\n \"authenticationMethod\": {\n \"type\": \"API_KEY\",\n \"headerName\": \"X-Webhook-Key\",\n \"apiKey\": \"whsec_9f2c41ab7d\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"id": "wh_8842f19c",
"url": "https://client.example/hooks/venly",
"name": "Production events",
"authenticationMethod": {
"type": "API_KEY",
"headerName": "X-Webhook-Key"
},
"status": "ACTIVE"
}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "unauthenticated",
"message": "Please authenticate to perform this action."
}
]
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}Webhooks
Register a webhook
Register an HTTPS endpoint to receive asynchronous Venly Finance events.
POST
/
webhooks
Register a webhook
curl --request POST \
--url https://api.venlyfinance.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://client.example/hooks/venly",
"name": "Production events",
"authenticationMethod": {
"type": "API_KEY",
"headerName": "X-Webhook-Key",
"apiKey": "whsec_9f2c41ab7d"
}
}
'import requests
url = "https://api.venlyfinance.com/v1/webhooks"
payload = {
"url": "https://client.example/hooks/venly",
"name": "Production events",
"authenticationMethod": {
"type": "API_KEY",
"headerName": "X-Webhook-Key",
"apiKey": "whsec_9f2c41ab7d"
}
}
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://client.example/hooks/venly',
name: 'Production events',
authenticationMethod: {type: 'API_KEY', headerName: 'X-Webhook-Key', apiKey: 'whsec_9f2c41ab7d'}
})
};
fetch('https://api.venlyfinance.com/v1/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.venlyfinance.com/v1/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://client.example/hooks/venly',
'name' => 'Production events',
'authenticationMethod' => [
'type' => 'API_KEY',
'headerName' => 'X-Webhook-Key',
'apiKey' => 'whsec_9f2c41ab7d'
]
]),
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.venlyfinance.com/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://client.example/hooks/venly\",\n \"name\": \"Production events\",\n \"authenticationMethod\": {\n \"type\": \"API_KEY\",\n \"headerName\": \"X-Webhook-Key\",\n \"apiKey\": \"whsec_9f2c41ab7d\"\n }\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.venlyfinance.com/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://client.example/hooks/venly\",\n \"name\": \"Production events\",\n \"authenticationMethod\": {\n \"type\": \"API_KEY\",\n \"headerName\": \"X-Webhook-Key\",\n \"apiKey\": \"whsec_9f2c41ab7d\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venlyfinance.com/v1/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://client.example/hooks/venly\",\n \"name\": \"Production events\",\n \"authenticationMethod\": {\n \"type\": \"API_KEY\",\n \"headerName\": \"X-Webhook-Key\",\n \"apiKey\": \"whsec_9f2c41ab7d\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"id": "wh_8842f19c",
"url": "https://client.example/hooks/venly",
"name": "Production events",
"authenticationMethod": {
"type": "API_KEY",
"headerName": "X-Webhook-Key"
},
"status": "ACTIVE"
}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "unauthenticated",
"message": "Please authenticate to perform this action."
}
]
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}Requires scope:
After registering, send a ping to validate your endpoint end-to-end.
manage:webhooks — see Required scopes.
Registers a webhook endpoint for your company so Venly can push asynchronous events — pay-in session transitions, pay-out status changes, verification verdicts and settlement outcomes — instead of you polling for them.
The url must be an absolute https:// endpoint.
Pick an authenticationMethod so your endpoint can verify the caller:
| Type | Fields | Behaviour |
|---|---|---|
API_KEY | headerName, apiKey | The key is injected into the header you name |
BASIC_AUTHENTICATION | username, password | Standard HTTP basic auth |
Secrets (
apiKey, password) are write-only. They are accepted here and never echoed back on any read response, so store your own copy — to change one, send a full update.Authorizations
OAuth2 client credentials flow. Token endpoints:
Body
application/json
Registers a webhook endpoint for your company.
Absolute https:// endpoint the webhook delivers to
Maximum string length:
2048Example:
"https://client.example/hooks/venly"
Authentication applied to outbound webhook deliveries, discriminated by type. Secret fields
(apiKey, password) are accepted on input and omitted from every read response.
- Option 1
- Option 2
Show child attributes
Show child attributes
Optional human-readable label
Maximum string length:
255Was this page helpful?

