# Event Types
source: https://developer.mastercard.com/open-finance-europe/documentation/unlicensed/aiia-data/event-notifications/event-types/index.md

Each notification event type has a specific payload format containing the relevant event information.
In addition to the fields documented for each event, webhook payloads include the consent ID that performed the event.

### Example Payload {#example-payload}

```json
{
  "accountsUpdatedWebhook": {
    "consentId": "9c59147b-f323-44bc-b8e1-2b37a2b69182",
    "data": {
      "changedAccounts": [
        {
          "accountId": "MDQzNzc4YWItMzgwYS00MTNmLWJjYmUtMTk5OWQ5Y2FkY2JifERlbW9CYW5rfFpLUk5VdUVYNHFsd2tYZkRkZ2JEVFFFOGFNUktsUmVteG5TNDJiVVVRVDguYzJlYWZkYzQ0Nzc4",
          "oldestTransactionChangedAt": null,
          "transactionsChanged": false
        },
        {
          "accountId": "ZmExODkyNzEtZjk2NS00ZjVjLTk5ZjktZTQ1Y682zYmMyODM5fFRlc3REYXRhQmFuazF8N2aXM5ZFIzd0gzLWhSNWJhY21nSEZCdy4x",
          "oldestTransactionChangedAt": "2018-11-06T00:00:00Z",
          "transactionsChanged": true
        }
      ]
    },
    "event": "AccountsUpdated"
  }
}
```

### Types {#types}

Each event has a similar JSON schema, but uses a unique data object determined by its event type.

```json
{
    "<WEBHOOK_NAME>" : {
        "consentId" : "9c59147b-f323-44bc-b8e1-2b37a2b69182",
        "data" : {...}
        "event": <EVENT_NAME> // Name of the event
    }

}
```

### Accounts Updated {#accounts-updated}

Triggered when an `account` or `transaction` is updated

#### What to do when you receive this? {#what-to-do-when-you-receive-this}

When you receive this webhook, it means that something about the accounts listed in the data has changed. This could be some information on the account itself or new/changed transactions. If you are saving this information yourself, you should update our copy of the data when you receive this.

#### Data {#data}

This will have the event name `AccountsUpdated`

| **Data Object Properties** |          **Type**          |          **Description**           |
|----------------------------|----------------------------|------------------------------------|
| `changedAccounts`          | `list of objects(Account)` | List of accounts that were updated |

| **Account Object Properties** |  **Type**   |                                    **Description**                                     |
|-------------------------------|-------------|----------------------------------------------------------------------------------------|
| `accountId`                   | `string`    | ID of the account                                                                      |
| `transactionsChanged`         | `bool`      | Flag identifying whether any of the transactions for this account were updated as well |
| `oldestTransactionChangedAt`  | `date-time` | Date of the oldest transaction that was updated (if there are any)                     |
| `transactionSpan`             | `interval`  | Date range of the oldest and newest transaction that was updated (if there are any)    |

### Accounts Orphaned {#accounts-orphaned}

Triggered if an `account` becomes orphaned (e.g. when bank suddenly stops providing previously known accounts).

#### What to do when you receive this {#what-to-do-when-you-receive-this}

When you receive this webhook, it means that this account will stop being updated.

#### Data {#data}

This will have the event name `AccountsOrphaned`

| **Data Object Properties** |     **Type**      |     **Description**      |
|----------------------------|-------------------|--------------------------|
| `accountIds`               | `list of strings` | IDs of affected accounts |

### Accounts Unorphaned {#accounts-unorphaned}

Triggered if an `account` stops being orphaned (for example, when bank provides an account that was previously marked as orphaned).

#### What to do when you receive this {#what-to-do-when-you-receive-this}

When you receive this webhook, it means that the previously orphaned account was provided by the bank and it will resume being constantly updated as normal.

#### Data {#data}

This will have the event name `AccountsUnorphaned`

| **Data Object Properties** |     **Type**      |     **Description**      |
|----------------------------|-------------------|--------------------------|
| `accountIds`               | `list of strings` | IDs of affected accounts |

### Connection Update Required {#connection-update-required}

Triggered when a `connection` needs a supervised login.

#### What to do when you receive this {#what-to-do-when-you-receive-this}

When you receive this webhook, it means that a supervised login is required on a connection before we can start updating data for it again. You should instruct the user to perform a [manual synchronization](https://developer.mastercard.com/open-finance-europe/documentation/unlicensed/aiia-data/data-sync/index.md).

#### Data {#data}

This will have the event name `ConnectionUpdateRequired`

|   **Key**    |     **Type**      |                                      **Description**                                       |
|--------------|-------------------|--------------------------------------------------------------------------------------------|
| `reason`     | `string`          | Reason as to why connection needs to be updated                                            |
| `accountIds` | `list of strings` | IDs of affected accounts                                                                   |
| `expiresAt`  | `date-time`       | When the connection is expired (if known). Default value `-9998-01-01T00:00:00.000000000Z` |

### Connection Rate Limited {#connection-rate-limited}

Triggered when we couldn't log in using a `connection` due to provider rate limiting us.

#### What to do when you receive this {#what-to-do-when-you-receive-this}

Do not request data updates; they will not be accepted until `rateLimitedUntil`

#### Data {#data}

This will have the event name `ConnectionRateLimited`

|      **Key**       |     **Type**      |                **Description**                 |
|--------------------|-------------------|------------------------------------------------|
| `rateLimitedUntil` | `date-time`       | Date until when the connection is rate limited |
| `accountIds`       | `list of strings` | List of rate limited account IDs               |

### Consent Needs Update {#consent-needs-update}

Triggered when a client consent is `updated` or created

#### What to do when you receive this {#what-to-do-when-you-receive-this}

When you receive this webhook, it means that something about your consent to the user has changed. It would be a change in what accounts you have access to.

#### Data {#data}

This will have the event name `ConsentNeedsUpdate`

| **Key**  | **Type** |               **Description**                |
|----------|----------|----------------------------------------------|
| `reason` | `string` | Reason as to why consent needs to be updated |

### Consent Revoked {#consent-revoked}

Triggered when a client consent is `Revoked`.

#### What to do when you receive this {#what-to-do-when-you-receive-this}

When you receive this webhook, it means that the user has revoked the consent allowing you to access the user's data. you will no longer be able to access this user's data through our APIs.

#### Data {#data}

This will have the event name `ConsentRevoked`
Note: The data object will be null on this event

### Sync Progress Update {#sync-progress-update}

Triggered when more transactions are fetched during sync.

#### What to do when you receive this {#what-to-do-when-you-receive-this}

When you receive this webhook, it means that we are in the process of updating data on the account. There is nothing specifically that should be done at this time.

#### Data {#data}

This will have the event name `SyncProgressUpdate`

| **NaKeyme** | **Type** |             **Description**             |
|-------------|----------|-----------------------------------------|
| `accountId` | `string` | ID of the account that is being updated |

### Sync Done {#sync-done}

Triggered when [data synchronization](https://developer.mastercard.com/open-finance-europe/documentation/unlicensed/aiia-data/data-sync/index.md) is complete.

#### What to do when you receive this {#what-to-do-when-you-receive-this}

When you receive this webhook, it means that we are done updating data on the accounts listed, even though we may not have received anything for the account.

#### Data {#data}

This will have the event name `SyncDone`

|    **NaKeyme**     |     **Type**      |                                **Description**                                |
|--------------------|-------------------|-------------------------------------------------------------------------------|
| `syncedAccountIds` | `list of strings` | IDs of accounts that were part of this sync. All might not have been updated. |

