/

to search

#Notifications

Below is a summary of the API endpoints you need to implement on your server and expose to receive notifications from Setu AA. These notifications are webhooks from Setu based on the events that occur during the consent and data flow.

The base_url is the server URL you share with us to receive notifications.

To get started quickly, you can setup a mock API endpoint using Beeceptor. Once configured on Bridge, Setu will send notifications to that URL. This will help you understand the notification flow before you start to implement it on your server.

Types of notifications
  • Consent notification—notification triggered for the events that occur in consent flow
  • FI notification—notification triggered for the events that occur in data flow

Note: Webhooks retries will be added in future iterations.


This notification is used to communicate the updated status of the consent. We do not send notification for consent status PENDING.

Consent statusExplanation
PENDINGThe consent has been created and customer action is awaited
ACTIVECustomer has approved the consent
REJECTEDCustomer has rejected consent
REVOKEDCustomer has revoked consent which was previously approved
PAUSEDCustomer has paused a previously approved consent
EXPIREDThe consent has expired
Consent notification Payload

Setu will post this payload to your notification endpoint whenever there is a change in consent status.

{
"data": {
"status": "ACTIVE",
"detail": {
"accounts": [
{
"maskedAccNumber": "XXXXXXXX6053",
"accType": "CURRENT",
"fipId": "setu-fip",
"fiType": "DEPOSIT",
"linkRefNumber": "e4b27e62-e41a-42c0-a5b3-0a5542b25ddf"
}
]
}
},
"timestamp": "2023-04-03T09:14:43.323Z",
"success": true,
"type": "CONSENT_STATUS_UPDATE",
"error": null,
"consentId": "c16cc10e-eae3-4277-96e1-64c0ed21c53e"
}

In cases where the user cancels the consent before login, or rejects the consent after login, an error code and error message will be included in the notification payload.


Response
{
"success": false,
"error": {
"code": "UserCancelled",
"message": "cancel_not_understand"
},
"data": null,
"consentId": "72cb6cb8-c248-4b88-9282-18262fbdfbc2",
"notificationId": "66d5fef5-d5f3-48f6-afe7-1e82ac952ecb",
"timestamp": "2024-01-29T07:28:24.547Z",
"type": "CONSENT_STATUS_UPDATE"
}
Consent error codes

Mapping of error code, error message and it's meaning:

Error CodeError MessageMeaning
UserCancelledcancel_not_understandI do not understand what is happening
UserCancelledcancel_will_share_laterI will share my data later
UserCancelledcancel_not_want_to_shareI do not want to share my data with FIU
UserRejectedreject_not_understandI do not understand why my data is being requested
UserRejectedreject_not_want_to_shareI do not want to share my data with FIU
UserRejectedreject_accounts_not_foundI could not find my accounts
UserRejectedreject_otherFor other reasons
NoFIPAccountsDiscoveredno_fip_accounts_foundNo fip accounts discovered
FIPDeniedFIP_DENIED_CONSENTFIP denied your consent

Please note that if user cancels the consent before login, this keeps the consent in PENDING state and same consent link can be used again.


#FI notification

The Financial Information (FI) notification is used to communicate the data session status created by you using the Create Data Session API. Whenever each FIP in the data session responds with an update, this notification will be sent to the webhook endpoint configured by you.

The FI notification payload contains two statuses—

  • Individual account FI status
  • Combined data session status
Individual account FI statusExplanation
PENDINGFIP has received the account data request
READYFIP is ready with the requested account data
DELIVEREDFIP has delivered the requested account data
TIMEOUTThe account data request to the FIP has timed out
DENIEDFIP has denied sharing the requested account data

Combined data session statusIndividual account FI status
PENDINGIndividual account FI status of all accounts in the data session are in PENDING status. Data fetch for this data session cannot be initiated yet.
PARTIALOne or more accounts have individual FI account status as READY but the remaining have status as PENDING/FAILED/TIMEOUT. Data fetch for this data session can be initiated. However, only data from READY accounts can be fetched.
COMPLETEDIndividual account FI status of all accounts is READY. Data fetch can be initiated for this data session.
EXPIREDData session has expired, irrespective of individual account FI statuses. No further fetches can happen for this data session.
FAILEDData session has failed, irrespective of individual account FI statuses. Retry by creating a new data session.

FI Notification Payload
{
"data": {
"status": "COMPLETED", // combined data session status
"fips": [
{
"accounts": [
{
"FIStatus": "READY", // individual account FI status
"description": "fi status description not found from FIP",
"linkRefNumber": "e4b27e62-e41a-42c0-a5b3-0a5542b25ddf"
}
],
"fipID": "setu-fip"
}
],
"format": "json"
},
"timestamp": "2023-04-03T09:20:53.424Z",
"dataSessionId": "32d40afc-4795-495d-8ca4-d817d730e5b5",
"success": true,
"type": "SESSION_STATUS_UPDATE",
"error": null,
"consentId": "c16cc10e-eae3-4277-96e1-64c0ed21c53e"
}

Was this page helpful?