Webhooks are a powerful way to receive real-time updates from Fiskil directly to your application. Rather than constantly polling Fiskil's API, webhooks allow Fiskil to push notifications to your app whenever specific events occur. This not only optimizes performance but also ensures that your app reacts immediately to critical updates like new user consents or fresh banking transactions.
Fiskil sends these notifications over HTTPS in a structured JSON format, making it easy to integrate and automate responses in your backend systems. Whether you're handling financial transactions, energy data, or user consents, webhooks streamline your workflows with up-to-the-minute accuracy.
consent.received
), enabling immediate onboarding or data access.banking.transactions.sync.completed
), allowing your app to update balances or generate spending reports.Before Fiskil can send you notifications, you need to set up an endpoint to receive them. Here's how:
banking.transactions.sync.completed
).consent.received
: Triggered when an end user grants data-sharing consent.consent.updated
: Triggered when an end user modifies their consent.consent.revoked
: Triggered when consent expires or is revoked.common.identity.sync.completed
: Indicates successful syncing of an end user's identity data.Triggered when end-user data is cached or updated in Fiskil's platform.
energy.billing.sync.completed
: Billing data synced.energy.usage.sync.completed
: Usage data synced.energy.servicepoints.sync.completed
: Service point data synced.energy.accounts.sync.completed
: Account data synced.energy.concessions.sync.completed
: Concession data synced.energy.der.sync.completed
: Distributed Energy Resource data synced.energy.invoices.sync.completed
: Invoices synced.energy.paymentschedules.sync.completed
: Payment schedules synced.energy.plans.sync.completed
: Energy plans synced.banking.accounts.sync.completed
: Banking account data synced.banking.balances.sync.completed
: Balance data synced.banking.transactions.basic.sync.completed
: Basic transaction data synced.banking.transactions.sync.completed
: Detailed transactions synced (including metadata).banking.payees.sync.completed
: Payees synced.banking.directdebits.sync.completed
: Direct debits synced.banking.scheduledpayments.sync.completed
: Scheduled payments synced.banking.products.sync.completed
: Banking product data synced.Fiskil delivers webhook payloads in JSON format with the following structure:
{
"publish_time": "2023-11-24T05:10:03.957Z",
"message_id": "9061924608716421",
"data": {
"consent_id": "1a460c22-c3ca-4901-8269-0b65c155b483",
"client_id": "2XbIEYCqr3rBLrjPNGmxuB5rqwy",
"end_user_id": "2XpN1YbKmoFcqbcN1Ji58kWyv3e",
"event": "energy.accounts.sync.completed",
"institution_id": "1",
"account_ids": ["262c6cc1-1b35-4f3f-b3d0-98976a86c6ee"],
}
}
publish_time
: Timestamp of the event (RFC3339 format).message_id
: Unique identifier for the event (useful for deduplication).data
: Contains event-specific data, including:
event
: Type of event triggered.end_user_id
: Unique ID of the end user.client_id
: Your app's unique identifier.institution_id
: The data holder's ID.consent_id
: The ID of the user's consent.account_ids
: the list of accounts related to synced data. It is only available for *.accounts.sync.completed
and *.balances.sync.completed
events.payee_ids
: the list of payees related to synced data. It is only available for banking.payees.sync.completed
event.If Fiskil cannot deliver an event (e.g., server unreachable or non-2xx response), it retries up to 5 times with backoff intervals between 1 to 10 minutes. After exhausting retries, the event is discarded.
For secure data transmission, Fiskil enforces HTTPS on all webhook endpoints in production.
Fiskil includes an HMAC SHA256 signature in the X-Fiskil-Signature header. This ensures that the event comes from Fiskil and hasn't been tampered with.
Here's how to verify the signature using Go:
package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/base64"
"fmt"
)
func main() {
var payloadData = `{"publish_time":"2023-11-23T03:03:30.792Z","message_id":"9790112556309026","data":{"arrangementId":"4a726862-6b39-4cd5-92c0-3d20fe96a202","clientId":"2XbIYazvJeBwaJx1xCaFar64uVk","endUserId":"2YPr9YiWLNj3KZt9ycjbvy4bRx5","institutionId":"1"}}`
var signingSecret = "jf+cnWPind3y0kYqJM4cPAC/8kNcwVXE8/fKs/Kz/SxXIkhVfvV8yh8dtEX9+K2PsmItKu5Jqqwy7cw2JQ+ozsSo2M9qmwpPxRMCREO+"
secretBytes, err := base64.StdEncoding.DecodeString(signingSecret)
if err != nil {
panic(err)
}
hmac := hmac.New(sha256.New, secretBytes)
hmac.Write([]byte(payloadData))
signature := base64.StdEncoding.EncodeToString(hmac.Sum(nil))
fmt.Println(signature) // Compare this with X-Fiskil-Signature header
}
# Base64 decode the signing secret
$ echo 'jf+cnWPind3y0kYqJM4cPAC/8kNcwVXE8/fKs/Kz/SxXIkhVfvV8yh8dtEX9+K2PsmItKu5Jqqwy7cw2JQ+ozsSo2M9qmwpPxRMCREO+' | base64 -d > secret.key
# Generate the HMAC signature
$ cat data.json | tr -d '\n' | openssl dgst -sha256 -mac HMAC -macopt key:secret.key
# Compare the output to the X-Fiskil-Signature header value
By verifying signatures, you ensure that only legitimate events from Fiskil are processed by your application.
With Fiskil webhooks, you can build responsive, data-driven applications that react to real-time financial and energy data. By following this guide, you'll be able to securely set up, manage, and verify webhooks to streamline your workflows and deliver timely updates to your users.
For additional help or troubleshooting, refer to our API documentation or contact support.
Was this page helpful?