4. Events examples

Webhook events will be sent to a specified URL, not at the time the event was created, but with a certain frequency (several seconds).

In this case, several events may accumulate for the profile during this waiting time. All of them will be divided into batches of 10 elements and sent as payload in separate requests.

Events examples are described as follows: Currently Customate Api supports next event types:

  1. payment.updated
  2. transaction.updated
  3. funding_source.verified

Webhook request payload example with all available event types:

{
"items": [
{
"id": "d353ad23-79e9-487d-9ea6-9c31b239db91",
"type": "payment.updated",
"creation_datetime": "2020-04-22T16:00:00.000Z",
"data": {
"id": "5e614f0b-f57c-4a42-a24d-8412c84e29ad",
"status": "failed",
"amount": 100,
"profile": {
"id": "025e371d-c76d-4b97-be8a-743f343416da"
},
"funding_source": {
"id": "e16b0c85-8b1c-4f33-9835-1b9c01dfbec1"
},
"payee": {
"id": "4dba13e4-cbec-42e8-9875-c3c85ef80e93"
},
"schedule": null,
"scenario": "DirectDebitToCustomate",
"metadata": {
"custom_id": "d6ae0bd3-6139-4fa3-b090-750759f0f556"
},
"error_code": "no_instruction",
"error_message": "No Instruction held with paying bank"
}
},
{
"id": "d353ad23-79e9-487d-9ea6-9c31b239db91",
"type": "transaction.updated",
"creation_datetime": "2020-04-22T16:00:00.000Z",
"data": {
"id": "5e614f0b-f57c-4a42-a24d-8412c84e29ad",
"status": "failed",
"name": "Release",
"amount": 100,
"closing_balance": 2200,
"profile": {
"id": "025e371d-c76d-4b97-be8a-743f343416da"
},
"payment": {
"id": "e16b0c85-8b1c-4f33-9835-1b9c01dfbec1"
},
"funding_source": {
"id": "e16b0c85-8b1c-4f33-9835-1b9c01dfbec1"
},
"payee": {
"id": "4dba13e4-cbec-42e8-9875-c3c85ef80e93"
},
"schedule": {
"id": "2462928f-376c-487c-9236-42c86ca335a7"
},
"metadata": {
"custom_id": "d6ae0bd3-6139-4fa3-b090-750759f0f556"
},
"error_code": null,
"error_message": null
}
},
{
"id": "d353ad23-79e9-487d-9ea6-9c31b239db91",
"type": "funding_source.verified",
"creation_datetime": "2020-04-22T16:00:00.000Z",
"data": {
"id": "5e614f0b-f57c-4a42-a24d-8412c84e29ad",
"type": "direct_debit",
"currency": "GBP",
"profile": {
"id": "025e371d-c76d-4b97-be8a-743f343416da"
},
"validation_status": "valid",
"validation_issue_code": null,
"validation_issue_message": null
}
}
]
}