Webhooks Integration

Webhooks Integration

Webhook is a feature in sandbox to setup baseURL of the notification APIs to receive notifications sent from Onemoney about consent flow and data flow related events.

For eg. if a consent has been rejected, calling consent notification API by FIU results in knowing the status of the consent which is sent from Onemoney in a JSON format..

Webhook Notifications

Webhook notifications are sent from Onemoney to FIU in a JSON format each time an API call is made to Onemoney about consent and data related events.

Setting up of Webhook URL

Follow the below steps to set up Webhook URL at Onemoney.

1 Login to Onemoney Developer Portal Account

Login into Onemoney Developer portal using your registered Google/Github Account with Onemoney.

2 Setting up Webhook

Go to ‘Settings’ >> ‘Webhooks’ and click on ‘Setup Webhook’.

Add the ‘Webhook URL’ to which you would like to receive notifications from Onemoney.

3 Webhook Setup Successful

Click on ‘Save’ to successfully setup webhook.

Once you successfully setup Webhook, use the webhook URL as a base URL to call Consent Notification and FI notification, the details of which are discussed below.

Consent Notification API

This API handles the notifications corresponding to the events generated during consent flow such as consent being active, pending, revoked, rejected, paused, expired.

BaseURL : Use the URL you used during setting up of webhook.

Headers

Parameter NameDescription
client_api_keyeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....
content-typeapplication/json

Request Body

Parameter NameDescription
verThe version of the API
timestampCreation timestamp of the message which will be updated at each leg
txnidThe unique transaction identifier used for providing an end to end traceability.
Notifier
typeEg: FIP
idValue of the destination address for locating the resource to maintain the logs. Eg. FIP-1
ConsentStatusNotification
consentIdA unique ID generated by the AA to be sent to FIU and FIP used by both the parties to retrieve consent artefact
consentStatusStatus of the Consent. Could be ACTIVE, REVOKED, PAUSED or REJECTED
{
    "ver": "1.1.2",
    "timestamp": "2020-08-12T14:06:17.848Z",
    "txnid": "0b811819-9044-4856-b0ee-8c88035f8858",
    "Notifier": {
        "type": "FIU",
        "id": "FIU-1"
    },
    "ConsentStatusNotification": {
        "consentId": "e81051aa-3589-4cf1-8959-63f020f4453e",
        "consentStatus": "REJECTED"
    }
}

Response Body

Parameter NameDescription
verThe version of the API
timestampCreation timestamp.
txnidThe unique transaction identifier used for providing an end to end traceability.
responseResponse of the API call made.
{
  "ver": "1.1.2",
  "timestamp": "2018-09-22T06:13:30.967+0000",
  "txnid": "f35761ac-4a18-11e8-96ff-0277a9fbfedc",
  "response": "OK"
}

FI Notification API

This API handles the notifications corresponding to the events generated during data flow.

Headers

Parameter NameDescription
client_api_keyeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....
content-typeapplication/json

Request Body

Parameter NameDescription
verThe version of the API
timestampCreation timestamp.
txnidThe unique transaction identifier used for providing an end to end traceability.
Notifier
typeEg: FIP
idValue of the destination address for locating the resource to maintain the logs. Eg. FIP-1
FIStatusNotification
sessionIDData fetch Session Id that is valid for 4 hours
sessionStatusStatus of the FI session. Could be ACTIVE, COMPLETED, EXPIRED or FAILED
FIStatusResponse
fipIDFIP ID as defined in the Account Aggregator Ecosystem.
Accounts
linkRefNumberUnique number generated by FIP once the linking of account is Completed
FIStatusCould be READY, DENIED, PENDING, DELIVERED or TIMEOUT
descriptionAccount description
{
  "ver": "1.0",
  "timestamp": "2018-12-06T11:39:57.153Z",
  "txnid": "0b811819-9044-4856-b0ee-8c88035f8858",
  "Notifier": {
    "type": "AA",
    "id": "AA-1"
  },
  "FIStatusNotification": {
    "sessionId": "XXXX0-XXXX-XXXX",
    "sessionStatus": "ACTIVE",
    "FIStatusResponse": [
      {
        "fipID": "FIP-1",
        "Accounts": [
          {
            "linkRefNumber": "XXXX-XXXX-XXXX",
            "FIStatus": "READY",
            "description": ""
          }
        ]
      }
    ]
  }
}

Response Body

Parameter NameDescription
verThe version of the API
timestampCreation timestamp of the message which will be updated at each leg
txnidThe unique transaction identifier used for providing an end to end traceability.
responseResponse of the API call made.
{
  "ver": "1.0",
  "timestamp": "2018-09-22T06:13:30.967+0000",
  "txnid": "f35761ac-4a18-11e8-96ff-0277a9fbfedc",
  "response": "OK"
}