If you want to receive automatic alerts regarding Rollee's successful tasks regarding your Users, Accounts or endpoints, Webhooks provide a solution for it.

Use Cases

One example of using Webhooks is: trigger an Income Data Fetch right after an account is successfully connected.
Whenever you create an Account, there is an option of receiving an alert. This means that whenever you submit credentials on a datasource at Rollee Connect an Account is created. Also, whenever that Account gets successfully authenticated, you can receive an alert informing you the Account is updated, and that the connected status is now True.
At this moment, the Data Fetches can start. If you receive the alerts via Webhooks, you can automatically trigger a Data Fetch once you get it, and reduce manual labour.

Another use case is: being alerted when new data has been fetched so you can update it on your own end.

Setting up Webhooks

Webhooks are simply HTTP requests done from Rollee Backend whenever an event happens. When setting up a Webhook, we allow you to specify:

  • the URL the request is made;
  • the method of the HTTP request (POST or PUT);
  • additional headers sent in the request (for identification or security purposes)

To create a Webhook, you can do the following requests:

For a User Event Webhook:

curl -X PUT -H "Authorization: Bearer <YOUR_TOKEN>" --url 'https://api.getrollee.com/api/v0.3/webhooks/users' -d '{"url": "<YOUR_URL>", "method": "POST", "headers": {"your_header":"<YOUR_HEADER>"} }'
curl -X PUT -H "Authorization: Bearer <YOUR_TOKEN>" --url 'https://api.sand.getrollee.com/api/v0.3/webhooks/users' -d '{"url": "<YOUR_URL>", "method": "POST", "headers": {"your_header":"<YOUR_HEADER>"} }'

For an Account Event Webhook:

curl -X PUT -H "Authorization: Bearer <YOUR_TOKEN>" --url 'https://api.getrollee.com/api/v0.3/webhooks/accounts' -d '{"url": "<YOUR_URL>", "method": "POST", "headers": {"your_header":"<YOUR_HEADER>"} }'
curl -X PUT -H "Authorization: Bearer <YOUR_TOKEN>" --url 'https://api.sand.getrollee.com/api/v0.3/webhooks/accounts' -d '{"url": "<YOUR_URL>", "method": "POST", "headers": {"your_header":"<YOUR_HEADER>"} }'

For an Endpoint Event Webhook:

curl -X PUT -H "Authorization: Bearer <YOUR_TOKEN>" --url 'https://api.getrollee.com/api/v0.3/webhooks/endpoints' -d '{"url": "<YOUR_URL>", "method": "POST", "headers": {"your_header":"<YOUR_HEADER>"} }'
curl -X PUT -H "Authorization: Bearer <YOUR_TOKEN>" --url 'https://api.sand.getrollee.com/api/v0.3/webhooks/endpoints' -d '{"url": "<YOUR_URL>", "method": "POST", "headers": {"your_header":"<YOUR_HEADER>"} }'

Retry policy

Since webhooks usage can fail due to network issues. Rollee's webhook implementation
have a retry policy that ensure that you will receive all events at least once. The events are retried for a period of 3 days.