Balance Threshold (balanceThreshold)

Sent when an account balance crosses a threshold you have set.

Id: balanceThreshold

Event that notifies when an account balance has crossed one of the specified balance thresholds on an account.

Prerequisites

When it is sent

The event is sent when the account balance crosses a threshold. This also works for negative threshold values and balances. For example, if a threshold of type less than (lt) with a value of -10000 was created, this would trigger on an account balance of -£100.01.

Payload

These fields are sent in the payload object of the webhook envelope.

NameTypeDescription
accountUidstringAccount Id
accountNamestringAccount Name
balanceAtTimeGenerationobjectThe balance at the time the notification was generated. This balance will be in major units of the currency e.g. pounds.
matchedThresholdsarrayThe threshold that was crossed. The value here will be in minor units and will match the value passed into the /accounts/{accountId}/notification-thresholds endpoint when creating the threshold.

Example (JSON format)

{
  "id": "abe168ce-1b2f-4c38-9c92-db5730485cb3",
  "eventType": "balanceThreshold",
  "userId": "5c79210bbac25ecb5e71ac40",
  "payload": {
    "accountUid": "6d0baf11-248e-4c11-9c04-97b7758b4e04",
    "accountName": "Test Account",
    "balanceAtTimeGeneration": {
      "date": "2020-01-10",
      "amount": 50,
      "currency": "GBP"
    },
    "matchedThresholds": [
      {
        "type": "lt",
        "value": 100
      }
    ]
  }
}

This example uses the JSON format. JWT webhooks carry the same payload fields in a different envelope, and batched webhooks list events without payloads. See Webhook Format.