bunq callbacks: list, set and remove notification filters #1
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Catcrafts/Nostro#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Nostro can read and pay through a bunq connection, but it cannot tell bunq to push a notification when something happens on an account. bunq calls these callbacks and stores them as notification filters. There is no typed call for them in the library (only the raw
GetandPostreach them, for a consumer that holds the credentials itself), and nothing on nostrod's interface or in the CLI. So whoever uses nostrod, and therefore holds no key, has no way to register a URL.Who needs it
A server that settles incoming bank transfers. The catcrafts.net shop takes SEPA transfers into its own bunq account and marks an order paid when a credit with its reference arrives. bunq pushes each payment to the shop's server within seconds, which is what makes that fast. The shop can already read the account through nostrod (
Transactions), and registering the callback is the last thing its own bunq client is kept for:tools/register-bunq-webhook.shborrows that client's session. With this in Nostro, the client and the API key beside it can be deleted.It is useful beyond that shop. Any front end that wants to react to a payment, a card transaction or a request without polling needs the same calls.
What bunq offers
From bunq's documentation (doc.bunq.com, "Callbacks (Webhooks)" and the Notification Filter pages, read 2026-11-21) and from the script above, which has registered one against production:
GET /v1/user/{userID}/notification-filter-urllists the URL filters. Each item is aNotificationFilterUrlwith acategoryand anotification_target.POST /v1/user/{userID}/notification-filter-urlwith{"notification_filters":[{"category":"MUTATION","notification_target":"https://…"}]}sets them. The POST replaces the whole set: a filter left out is deleted, and an empty list removes all of them.notification_delivery_methodin the body is refused on this endpoint as superfluous.MUTATION(any change of a balance, carrying the payment),PAYMENT,INSTANT_PAYMENT,REQUEST,DRAFT_PAYMENT,SCHEDULE_RESULT,IDEALand theCARD_TRANSACTION_…family.GET /v1/user/{userID}/notification-filter-failurelists the dropped ones, and a POST there withnotification_filter_failed_idssends them again.185.40.108.0/22, which it says may change) and optional certificate pinning (certificate-pinned).Not checked, because bunq's pages do not say: whether a filter outlives the API key that set it, and whether an OAuth connection may set one.
What it would take
BunqConnector, list the filters and replace them, with typed values (a category and a target). Because bunq's POST replaces everything, adding or removing one filter has to read the set, change it and write it back.net.catcrafts.Nostro1(design rule 10 allows adding methods), the XML,Nostro::Client, and a polkit action for each (design rule 9). Setting changes something at the bank and pays nobody, which is whatChangeis for.AGENTS.consumer.mdfor consumers.FakeBunq.incand tests for the calls, and one run against the sandbox.To decide
View, every program in the user's session could read it without a password.