Webhooks Overview

Introduction to Moneyhub webhooks: the webhook envelope, receiving and responding, setup, and testing.

Webhooks are a way for Moneyhub to notify your application in real-time about events related to the users that you have created.

At a glance

TopicSummary
DeliveryAn HTTPS POST to the webhook URL set on your API client
FormatsJSON (application/json) or signed JWT (application/jwt). See Webhook Format
Your responseAny 2xx within 5 seconds
RetriesNone. Each webhook is sent once, so reconcile with the API
OrderNot guaranteed
PayloadsMostly IDs. Fetch the latest data from the API
AuthenticityVerify JWT webhooks with Verifying JWT Webhooks, and optionally allow only Moneyhub source IP addresses
EventsListed in all events, with a page for each

New to webhooks? Try Receive Updates with Webhooks in Getting started, then use Building a Webhook Receiver for complete Node.js and Python examples. Testing and Troubleshooting Webhooks has a production checklist and fixes for common problems.

Schema

Every immediate webhook uses the same envelope. Only eventType and the contents of payload change from one event to another. Each event page documents its payload fields and shows a complete example.

NameTypeDescription
idstringUnique ID of the webhook
eventTypestring[enum]The event id, for example newTransactions
userIdstringThe ID of the user the event relates to
payloadobjectEvent-specific data, described on each event's page

Example webhook

{
    "id": "abe168ce-1b2f-4c38-9c92-db5730485cb3",
    "eventType": "newTransactions",
    "userId": "5c79210bbac25ecb5e71ac40",
    "payload": {
        "accounts": [
            {
                "id": "6d0baf11-248e-4c11-9c04-97b7758b4e04",
                "transactions": [
                    "d520402a-d982-43ee-b1d1-bdfd282249ea",
                    "613586bf-dac9-4996-9c03-7194a7d62297"
                ]
            }
        ]
    }
}

Webhooks are sent as JSON by default, or as a signed JWT if you choose. Batched webhooks use a different envelope that lists events without their payloads. See Webhook Format for both.

Receiving webhooks

Building a Webhook Receiver walks through a complete receiver. The key points are below.

Response

We expect a 2xx response to mark the webhook as received. Any other status code, or no response, is recorded as a failed delivery.

Timeout

When we send webhooks, the request timeout is 5 seconds. Respond with 2xx straight away and process the webhook afterwards, for example from a queue.

Retries

We only attempt to send each webhook once. Failed deliveries are not retried, so use the API to reconcile your data rather than relying on receiving every webhook.

Order and duplicates

Webhooks can arrive in any order, including those from the same sync or payment. Make your processing idempotent: skip webhooks whose id you have already processed, and base updates on the resource IDs and statuses in the payload. See idempotency.

Security

Webhooks are sent over HTTPS. To confirm a webhook came from Moneyhub:

JSON webhooks are not signed. If you use JSON, fetch data from the API using the IDs in the payload rather than trusting the payload itself.

Transaction webhooks

When receiving transaction webhooks, we recommend fetching the transactions from our API to have the latest changes. Multiple transactions can be retrieved at once using our transactions endpoint.

The API may send multiple transaction webhooks for a single connection if that connection has multiple accounts, because transaction webhooks are sent per account.

Each webhook event is limited to 6,000 transaction IDs. If the triggering event (new, updated, or deleted transactions) contains more than 6,000 IDs, the API automatically splits them into multiple webhook events.

Setting up webhooks

You can configure webhook endpoints via the Admin portal when you add or edit your API clients.

Once you start receiving webhooks, you will be able to see a list of them when you drill down to the details of your API users.

Format

From the Client settings in the Admin Portal, you can select either JSON or JWT formatting for the webhook messages that we send you. You can use either format at any time, including for live production clients. See Webhook Format for both formats and Verifying JWT Webhooks for how to check a JWT webhook came from Moneyhub.

Immediate and batched delivery

Webhook delivery supports both immediate and batched destinations, configured independently per client:

  • Immediate webhooks
    • Webhook URL
    • Webhook format
    • Allowed events
  • Batched webhooks
    • Batched webhook URL
    • Batched webhook format
    • Batched allowed events
    • Batch interval in days

Batched delivery queues matching events and sends them as a single batched webhook to the configured batched webhook URL.

Batch interval controls how often a batch is sent:

  • minimum 1 day
  • default 7 days if not set

Clients can configure immediate only, batched only, or both.

To test batched webhooks without waiting for the batch interval, you can flush pending batched events for a sandbox client.

Testing

See Testing and Troubleshooting Webhooks for how to test your receiver, a production checklist, and solutions to common problems.

Available webhooks

Webhooks are grouped by what triggers them. Each group lists its events, and each event has its own page with the payload and a full example.

All events

Every published eventType, with the event name used in JWT webhooks. The JWT event name is always urn:com:moneyhub:events: followed by the eventType in kebab case.

eventTypeGroupJWT event name
syncCompletedFinancial dataurn:com:moneyhub:events:sync-completed
postConnectionEnrichmentCompletedFinancial dataurn:com:moneyhub:events:post-connection-enrichment-completed
newTransactionsFinancial dataurn:com:moneyhub:events:new-transactions
updatedTransactionsFinancial dataurn:com:moneyhub:events:updated-transactions
deletedTransactionsFinancial dataurn:com:moneyhub:events:deleted-transactions
restoredTransactionsFinancial dataurn:com:moneyhub:events:restored-transactions
deletedAccountFinancial dataurn:com:moneyhub:events:deleted-account
newRegularTransactionsFinancial dataurn:com:moneyhub:events:new-regular-transactions
updatedRegularTransactionsFinancial dataurn:com:moneyhub:events:updated-regular-transactions
counterpartyIdChangedFinancial dataurn:com:moneyhub:events:counterparty-id-changed
paymentSubmittedPaymentsurn:com:moneyhub:events:payment-submitted
paymentPendingPaymentsurn:com:moneyhub:events:payment-pending
paymentCompletedPaymentsurn:com:moneyhub:events:payment-completed
paymentErrorPaymentsurn:com:moneyhub:events:payment-error
payFileCreatedPaymentsurn:com:moneyhub:events:pay-file-created
recurringPaymentCreatedPaymentsurn:com:moneyhub:events:recurring-payment-created
affordabilityReportSuccessDecisioningurn:com:moneyhub:events:affordability-report-success
affordabilityReportFailureDecisioningurn:com:moneyhub:events:affordability-report-failure
standardFinancialStatementSuccessDecisioningurn:com:moneyhub:events:standard-financial-statement-success
standardFinancialStatementFailureDecisioningurn:com:moneyhub:events:standard-financial-statement-failure
reauthReminderNudgesurn:com:moneyhub:events:reauth-reminder
refreshReminderNudgesurn:com:moneyhub:events:refresh-reminder
balanceThresholdNudgesurn:com:moneyhub:events:balance-threshold
youveBeenPaidNudgesurn:com:moneyhub:events:youve-been-paid
spendingGoalProgressNudgesurn:com:moneyhub:events:spending-goal-progress
spendingGoalReachedNudgesurn:com:moneyhub:events:spending-goal-reached
spendingGoalExceededNudgesurn:com:moneyhub:events:spending-goal-exceeded
discoverSpendingAnalysisNewConnectionsNudgesurn:com:moneyhub:events:discover-spending-analysis-new-connections
addFirstConnectionNudgesurn:com:moneyhub:events:add-first-connection

New event types can be added. Ignore any you don't handle, and still respond with 2xx.