Appearance
Events
Events are our way of letting you know when something interesting happens on behalf of your users. When an interesting event occurs, we create a new Event
object. For example, when a new bill is received, we create a bill.update
event; when a bill payment is sent, we create a bill.payment
event.
We have a system for sending the event objects directly to an endpoint on your server, called webhooks. Webhooks are managed in Nexus.
The event object
Example Response
json
{
"_id": "580e3e11dec21e861b5a3719",
"type": "bill.update",
"created": "2016-04-20T16:51:12Z",
"clientId": "579b695decfa110127118752",
"sessionId" : "your-session-id-if-supplied-12345",
"identifier": "example-id-123",
"partnerId": "55942f330cfcfd6c4ed529d9",
"payload": {
"resource": {
"id": "579b695decfa11012711875d",
"type": "bill"
},
"data": {
"previous": {
"balance": "25.21"
},
"current": {
"balance": "52.11"
}
}
}
}
Attribute | Description |
---|---|
_id | ID of the event. |
type | Description of the event: e.g. bill.issued , bill.updated , etc. |
clientId | The id of the client to which the event pertains. |
partnerId | The id of the partner to which the event pertains. |
sessionId | Your internal identifier associated with the client session as described in Sessions. |
identifier | Your internal identifier associated with the client . |
created | An ISO 8601 formatted date of when this event was created. |
payload | Object containing data associated with the event.. |
payload.resource | Object containing data associated with the resource of the event. |
payload.resource.id | ID of the resource associated with the event. |
payload.resource.type | The type of resource associated with the event. Possible values are bill . |
payload.data | Object containing unique attributes per type as described in types of events. |