Watch becomes useful once it is connected to your Blnk Core instance. Connecting Watch allows transactions created in Core to be evaluated automatically against those rules as part of your transaction flow.Documentation Index
Fetch the complete documentation index at: https://docs.blnkfinance.com/llms.txt
Use this file to discover all available pages before exploring further.
We recommend having at least one rule set up before you connect your live Blnk Core to Watch. Without rules, every transaction is evaluated as a non-match.
- Sync directly from your database
- Push transactions into Watch through the API
Postgres DB Sync
Watch connects directly to your PostgreSQL database, set with theDB_URL environment variable, and continuously evaluates transactions as they appear.
PostgreSQL transactions table structure
PostgreSQL transactions table structure
Watch checks for and reads from a
Watch uses
blnk.transactions table.This table uses the same structure as the Blnk Core transactions table, so Watch works with Blnk Core out of the box, with no extra setup required.| Column | Type | Description |
|---|---|---|
transaction_id | string | Unique transaction identifier (e.g. txn_...) |
amount | integer | Transaction amount in the smallest currency unit |
currency | string | ISO currency code (e.g. USD, NGN) |
source | string | Source balance ID |
destination | string | Destination balance ID |
description | string | Free-form transaction description |
status | string | Transaction status |
created_at | timestamp | When the transaction was created |
meta_data | jsonb | Arbitrary key-value metadata |
created_at as a watermark to track sync progress and pull new transactions incrementally.start command to start the Watch service:
Use this approach when:
- Watch should stay aligned with the transactions already written by Blnk Core.
- You want historical transactions evaluated on startup before live processing continues.
- You want the least operational overhead between Core and Watch.
- You do not want to build or maintain a separate ingestion pipeline.
Push transactions into Watch through the API
Watch can also run as a pure evaluation service. In this mode, Watch exposes HTTP endpoints and expects transactions to be sent to it. Core does not get read directly from the database. Instead, something forwards transactions into Watch as they happen. You have two ways to push transactions via the API:- Via inbound webhooks
- Manual ingestion
Blnk Core can send transaction events directly to Watch through the
/webhook endpoint.Register the webhook in Core
Register the hook in Core using the hooks endpoint — you can use a PRE or POST hook.Point the hook URL to Watch’s Replace
/blnkwebhook endpoint:Register Watch hook in Blnk Core
http://localhost:8081 with your Watch base URL if it runs elsewhere.Receive and evaluate transactions
Once registered, every time new transactions are created, Blnk fires a webhook to Watch. Watch receives it and injects the transaction for evaluation.Use this approach when:
- You want event-driven transactiondelivery into Watch without giving Watch direct database access.