FinWatch Webhook
curl --request POST \
--url http://localhost:8081/blnkwebhook \
--header 'Content-Type: application/json' \
--data '
{
"event": "transaction.created",
"data": {
"transaction_id": "txn_123",
"amount": 1000,
"currency": "USD",
"source": "balance_123",
"destination": "balance_456",
"reference": "ref_001",
"status": "applied",
"created_at": "2024-01-15T10:30:00Z",
"meta_data": {
"key": "value"
}
}
}
'import requests
url = "http://localhost:8081/blnkwebhook"
payload = {
"event": "transaction.created",
"data": {
"transaction_id": "txn_123",
"amount": 1000,
"currency": "USD",
"source": "balance_123",
"destination": "balance_456",
"reference": "ref_001",
"status": "applied",
"created_at": "2024-01-15T10:30:00Z",
"meta_data": { "key": "value" }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
event: 'transaction.created',
data: {
transaction_id: 'txn_123',
amount: 1000,
currency: 'USD',
source: 'balance_123',
destination: 'balance_456',
reference: 'ref_001',
status: 'applied',
created_at: '2024-01-15T10:30:00Z',
meta_data: {key: 'value'}
}
})
};
fetch('http://localhost:8081/blnkwebhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8081",
CURLOPT_URL => "http://localhost:8081/blnkwebhook",
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([
'event' => 'transaction.created',
'data' => [
'transaction_id' => 'txn_123',
'amount' => 1000,
'currency' => 'USD',
'source' => 'balance_123',
'destination' => 'balance_456',
'reference' => 'ref_001',
'status' => 'applied',
'created_at' => '2024-01-15T10:30:00Z',
'meta_data' => [
'key' => 'value'
]
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:8081/blnkwebhook"
payload := strings.NewReader("{\n \"event\": \"transaction.created\",\n \"data\": {\n \"transaction_id\": \"txn_123\",\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"source\": \"balance_123\",\n \"destination\": \"balance_456\",\n \"reference\": \"ref_001\",\n \"status\": \"applied\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"meta_data\": {\n \"key\": \"value\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://localhost:8081/blnkwebhook")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"transaction.created\",\n \"data\": {\n \"transaction_id\": \"txn_123\",\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"source\": \"balance_123\",\n \"destination\": \"balance_456\",\n \"reference\": \"ref_001\",\n \"status\": \"applied\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"meta_data\": {\n \"key\": \"value\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8081/blnkwebhook")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"transaction.created\",\n \"data\": {\n \"transaction_id\": \"txn_123\",\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"source\": \"balance_123\",\n \"destination\": \"balance_456\",\n \"reference\": \"ref_001\",\n \"status\": \"applied\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"meta_data\": {\n \"key\": \"value\"\n }\n }\n}"
response = http.request(request)
puts response.read_body"Transaction txn_123 from webhook event 'transaction.created' processed successfully"{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Transactions
FinWatch Webhook
Receives webhook events and processes transactions automatically. Configure this endpoint as your webhook URL to have transactions automatically forwarded to FinWatch for evaluation.
POST
/
blnkwebhook
FinWatch Webhook
curl --request POST \
--url http://localhost:8081/blnkwebhook \
--header 'Content-Type: application/json' \
--data '
{
"event": "transaction.created",
"data": {
"transaction_id": "txn_123",
"amount": 1000,
"currency": "USD",
"source": "balance_123",
"destination": "balance_456",
"reference": "ref_001",
"status": "applied",
"created_at": "2024-01-15T10:30:00Z",
"meta_data": {
"key": "value"
}
}
}
'import requests
url = "http://localhost:8081/blnkwebhook"
payload = {
"event": "transaction.created",
"data": {
"transaction_id": "txn_123",
"amount": 1000,
"currency": "USD",
"source": "balance_123",
"destination": "balance_456",
"reference": "ref_001",
"status": "applied",
"created_at": "2024-01-15T10:30:00Z",
"meta_data": { "key": "value" }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
event: 'transaction.created',
data: {
transaction_id: 'txn_123',
amount: 1000,
currency: 'USD',
source: 'balance_123',
destination: 'balance_456',
reference: 'ref_001',
status: 'applied',
created_at: '2024-01-15T10:30:00Z',
meta_data: {key: 'value'}
}
})
};
fetch('http://localhost:8081/blnkwebhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8081",
CURLOPT_URL => "http://localhost:8081/blnkwebhook",
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([
'event' => 'transaction.created',
'data' => [
'transaction_id' => 'txn_123',
'amount' => 1000,
'currency' => 'USD',
'source' => 'balance_123',
'destination' => 'balance_456',
'reference' => 'ref_001',
'status' => 'applied',
'created_at' => '2024-01-15T10:30:00Z',
'meta_data' => [
'key' => 'value'
]
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:8081/blnkwebhook"
payload := strings.NewReader("{\n \"event\": \"transaction.created\",\n \"data\": {\n \"transaction_id\": \"txn_123\",\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"source\": \"balance_123\",\n \"destination\": \"balance_456\",\n \"reference\": \"ref_001\",\n \"status\": \"applied\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"meta_data\": {\n \"key\": \"value\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://localhost:8081/blnkwebhook")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"transaction.created\",\n \"data\": {\n \"transaction_id\": \"txn_123\",\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"source\": \"balance_123\",\n \"destination\": \"balance_456\",\n \"reference\": \"ref_001\",\n \"status\": \"applied\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"meta_data\": {\n \"key\": \"value\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8081/blnkwebhook")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"transaction.created\",\n \"data\": {\n \"transaction_id\": \"txn_123\",\n \"amount\": 1000,\n \"currency\": \"USD\",\n \"source\": \"balance_123\",\n \"destination\": \"balance_456\",\n \"reference\": \"ref_001\",\n \"status\": \"applied\",\n \"created_at\": \"2024-01-15T10:30:00Z\",\n \"meta_data\": {\n \"key\": \"value\"\n }\n }\n}"
response = http.request(request)
puts response.read_body"Transaction txn_123 from webhook event 'transaction.created' processed successfully"{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}⌘I
.png?fit=max&auto=format&n=0JF6z69u57hmqsWm&q=85&s=531373acedba0eb783b669f6d558dfd8)