Insights Webhooks
Insight groups are configured for each merchant in the Internal Portal, allowing merchants to then freely turn on Webhooks for those groups within the Admin Dashboard.
Webhooks are a crucial mechanism for merchants to receive notifications about Insight Groups.
Webhook processing and Security
Yaspa Webhooks are sent via HTTPS and are signed with SHA256withRSA. For information on processing and around Webhook security see the section here - Webhooks.
Client implementations must not use strict mode parsing on the JSON payload. The webhook body may contain additional, optional parameters not explicitly listed here, and strict parsing will result in deserialisation failures.
Insights Webhook payload and Parameters
The Insights webhook is HTTPS post request and a typical example of the request body is as follows:
{
"type": "INSIGHTS",
"data": {
"metadata": {
"merchantId": "684af205b26c48042487c93c",
"customerId": "eixyc0oxx9o0",
"reference": "eixyc0oxx9o0",
"citizenTransactionId": "54f97545-a987-cfa9-b2a8-f66b97",
"merchantTradingName": "Test Merchant"
},
"insightGroup": {
"id": "68d6593704a1aa70943d2bb1",
"name": "Payment Basics",
"insights": [
"PAYMENT_BASICS"
],
"period": [
"MONTHLY"
],
"fromDate": "2025-06-28T09:32:33.440188Z",
"toDate": "2025-07-26T09:32:33.440206Z"
},
"insights": {
"PAYMENT_BASICS": {
"insight": "PAYMENT_BASICS",
"fromDate": "2025-06-28T09:32:33.440188Z",
"toDate": "2025-07-26T09:32:33.440206Z",
"accounts": [
{
"accountId": "9800b595-329f-49ff-8519-b6d5622f211f",
"accountType": "CURRENT",
"currency": "GBP",
"closingBalance": 350,
"lastUpdatedAt": "2025-09-26T09:32:33.852805Z",
"consents": [
{
"consentId": "31d99e03-2ae2-40db-a39b-50b2fb650581",
"status": "ACTIVE",
"createdAt": "2025-07-26T09:32:33.126Z",
"expiresAt": "2025-10-25T10:32:33.125Z"
}
],
"paymentBasics": {
"categorisations": {
"OTHER": {
"PAYOUT": {
"paymentCount": 15,
"amount": 200
},
"PAYIN": {
"paymentCount": 5,
"amount": 300
}
},
"GAMBLING": {
"PAYOUT": {
"paymentCount": 6,
"amount": 150
},
"PAYIN": {
"paymentCount": 2,
"amount": 40
}
}
},
"period": {
"MONTHLY": [
{
"fromDate": "2025-06-28T09:32:33.440188Z",
"toDate": "2025-06-30T23:59:59Z",
"description": "2025-06",
"data": {
"OTHER": {
"PAYOUT": {
"paymentCount": 10,
"amount": 170
},
"PAYIN": {
"paymentCount": 3,
"amount": 200
}
},
"GAMBLING": {
"PAYOUT": {
"paymentCount": 2,
"amount": 50
},
"PAYIN": {
"paymentCount": 1,
"amount": 20
}
}
}
},
{
"fromDate": "2025-07-01T00:00:00Z",
"toDate": "2025-07-31T23:59:59Z",
"description": "2025-07",
"data": {
"OTHER": {
"PAYOUT": {
"paymentCount": 5,
"amount": 30
},
"PAYIN": {
"paymentCount": 2,
"amount": 100
}
},
"GAMBLING": {
"PAYOUT": {
"paymentCount": 4,
"amount": 100
},
"PAYIN": {
"paymentCount": 1,
"amount": 20
}
}
}
}
]
}
}
}
]
}
}
}
}
Insight webhook payload contains common data fields applicable to all insights, along with a nested object structure that contains the specific data for each insight type included in the group.
Insights
| Field | Type | Description |
|---|---|---|
| type | string | Always "INSIGHTS". Identifies the webhook category. |
| data | Insight Data | Main webhook payload |
Insight Data
Field | Type | Description |
|---|---|---|
metadata | Metadata | Contains data on the merchant, merchant user etc.. |
insightGroup | Insight Group | Insight Group for which the insights in this webhooks payload are generated |
insights. <Insight Type> | Insight Data | Contains actual insights data keyed by the insight type (like PAYMENT_BASIC, BALANCE. etc.). For more details on each insight data check the relevant insight section from list below:
|
Metadata
| Field | Type | Description |
|---|---|---|
| merchantId | string | Unique merchant identifier |
| customerId | string | Unique platform customer identifier. |
| reference | string | Reference value (often matches customerId). |
| citizenTransactionId | string | Unique transaction or event identifier. |
| merchantTradingName | string | Merchant’s display or business name. |
Insight Group
| Field | Type | Description |
|---|---|---|
| id | string | Unique group identifier |
| name | string | Name of the insight group (“Affordability insights”) |
| insights | array | List of insight keys ([“AFFORDABILITY”]) |
| period | array | Periods covered (e.g., [“MONTHLY”]). |
| fromDate | string | ISO 8601 period start date for the group. |
| toDate | string | ISO 8601 period end date for the group. |
There will often be other parameters in the body, such as some of the optional parameters will be carried through the system, as such it's critically important that merchant servers do not use strict mode parsing on the above JSON format, otherwise there will be failures to read data from Yaspa.
Parameter list:
| Parameter | Description |
|---|---|
| metadata.merchantId | The ID of your Merchant |
| metadata.customerId | Customer ID in your system |
| metadata.citizenTransactionId | Yaspa transaction ID |
| metadata.reference | Reference in your system |
| metadata.merchantTradingName | The trading name of your Merchant |
| insightGroup.id | The ID of the Insight Group |
| insightGroup.name | Name of the Insight Group |
| insightGroup.insights | Name of the Insights available in the Insight Group |
| insightGroup.period | Period requested for Insight Group |
| insightGroup.fromDate | Start date of the period |
| insightGroup.toDate | End date of the period |
| accounts.accountId | Customer Account Id |
| accounts.accountType | Customer Account type |
| accounts.currency | Customer Account currency |
| accounts.balance | Customer Account closing balance |
| accounts.lastUpdatedAt | Last date of data polling |
| consents.consentID | Consent ID |
| consents.status | Status of the Consent |
| consents.createdAt | Consent creation date |
| consents.expiresAt | Consent expiry date |
| insights | Name and content of the Insights (part of the Insight Group) |
Updated 2 months ago
