Must have
bank_connections_update_v2
When it fires
This event is triggered when a bank connection:
- is created
- is desynchronised
- is resynchronised
- is deleted or disabled
Event order for new connections: a create event is sent when the connection is created; at that time bank accounts may not yet exist, so connection.accounts is often empty. When bank accounts are then created or updated for that connection, an update event is sent with accounts populated. Consumers should expect: create (possibly empty accounts), then update (with accounts).
Payload fields
| Field | Type | Description |
|---|---|---|
event | String | The name of the webhook event. |
eventType | String | The type of event: create, update or delete. |
customer | Object | The member concerned. |
customer.id | String | Spaycial's member id. |
customer.externalId | String | Your member id. |
customer.connectionsOn | Number | The number of the member's active bank connections. |
customer.connectionsOff | Number | The number of the member's bank connections in error. |
customer.connections[] | Array | The list of all connections of the member, each shaped like connection below. |
connection | Object | The connection that triggered this event, shaped as described below. |
connection.id | String | The bank connection id. |
connection.errorCode | String, nullable | The error code from the data provider. |
connection.errorMessage | String, nullable | The error message from the data provider. |
connection.bank | String | The name of the bank for this connection. |
connection.transactionsEligibleFromDate | String | The start date for eligibility of transactions on this connection. |
connection.consentExpiresAt | String, optional | The end of consent for this connection. |
connection.accounts[] | Array | The bank accounts linked to this connection. Often empty on a create event; an update event is sent when accounts become available. |
connection.accounts[].id | String | Spaycial's bank account id. |
connection.accounts[].accountHash | String, nullable | An opaque hash of the account IBAN. Accounts sharing the same hash belong to the same real bank account (for example joint accounts). Use this together with bankAccountId in all_transactions to deduplicate transactions from joint accounts. |
shoppingHubId | String | Programme id (Spaycial). |
shoppingHubExternalId | String | Programme id in your system. |
Example
{
"event": "bank_connections_update_v2",
"eventType": "update",
"customer": {
"id": "398f0b39-c205-4fb2-a225-70e042df3fdb",
"externalId": "4564564564654",
"connectionsOn": 2,
"connectionsOff": 1,
"connections": [
{
"id": "fea86a6e-48e4-4b20-b07a-3e957f012fb6",
"errorCode": "invalidCredentials",
"errorMessage": "Invalid User",
"bank": "Boursorama",
"transactionsEligibleFromDate": "2021-01-03",
"consentExpiresAt": "2021-04-15 01:02:03.0004",
"accounts": [
{
"id": "a1b2c3d4-0001-0001-0001-000000000001",
"accountHash": "abc123hash"
}
]
}
]
},
"connection": {
"id": "7f41325e-dbe9-4ea6-8406-a2d45ac694ef",
"errorCode": null,
"errorMessage": null,
"bank": "BNP",
"transactionsEligibleFromDate": "2021-01-02",
"consentExpiresAt": "2021-05-01 01:02:03.0004",
"accounts": [
{
"id": "a1b2c3d4-0001-0001-0001-000000000002",
"accountHash": "def456hash"
},
{
"id": "a1b2c3d4-0001-0001-0001-000000000003",
"accountHash": "abc123hash"
}
]
},
"shoppingHubId": "f24b4d97-8d70-4133-b685-732c69b87884",
"shoppingHubExternalId": "654564561"
}