Webhooks
You can receive notifications from Aria by subscribing to them. They are rather simple. Notification system comes with some concepts.
1. Concepts
1.1 Event
Events are the backbone of the notification system.
A subscription will always be associated to an event.
Event name | Description |
---|---|
kyc.updated | The overall KYC status of an user has been updated. |
contract.created | The contract has been created and send to a user. |
contract.updated | The status of a contract has been updated. |
loan.created | A Loan has been created. |
loan.updated | A Loan has been updated. |
loan.deleted | A Loan has been deleted. |
credit-limit.created | A CreditLimit has been registered. |
credit-limit.updated | A CreditLimit has been updated. |
credit-limit.deleted | A CreditLimit has been deleted. |
advance.created (deprecated) | An Advance has been created. |
advance.updated (deprecated) | An Advance has been updated. |
What if an error occurs ?
We will retry to send the event, indefinitely. This is an alpha feature that will be improved soon.
1.2 Subscription
Subscription
is our generic way to design event related notification system. With Subscription
s, you can configure a webhook. You can manage Subscription
s with the API.
We explain Subscription
management in the next chapter.
1.3 SubscriptionType
At the moment, we only provide webhook
SubscriptionType
.
1.4 Invocation
Invocation
represents the firing of an event associated to a Subscription
. It comes with logs. If your webhooks integration does not seem to work, you may check InvocationLog
.
Quirks
In exceptional and rare cases, you may be surprised that one event has been notified to you instead of another. For example, a loan.updated
event triggered by a PAYMENT_ORDERED
=>TO_REPAY
status change could be notified to you before the previous one (ACCEPTED
=>PAYMENT_ORDERED
). This could be related to the architecture of our event system or external factors. It's quite rare but when it happens, we logically abandon the sending of the previous event.
2. Subscription management
You can manage your Subscription
s using the following endpoints on the API:
- List Subscriptions
- Create new WebHook Subscription
- Update one WebHook Subscription
- Delete one Subscription
3. Managing Aria's responses
Every event is structured like an object with key informations nested under payload
.
{
"date": "2022-04-21T08:57:27.987Z",
"event": "advance.created",
"payload": {
"id": "78c9c54c-f656-472d-b303-8d13307d622a",
"amount": 16339.2,
"status": "CREATED",
"userId": "61bb5cddeedf325d8b039555",
"dueDate": "2022-01-21T00:00:00.000Z",
"billDate": "2021-12-07T00:00:00.000Z",
"currency": "EUR",
"duration": 3888000000,
"pendingDate": "2022-04-21T13:57:35.860Z",
"endDate": "2022-05-24T13:57:35.860Z",
"customerSiren": "552120222"
}
}
Updated 10 months ago