Event Webhooks
The collectAI event webhooks focus on claim lifecycle changes and we will push subscribed events to your system. You can also pull all of these from the the Events API. But this requires you to pull on a certain interval and a defined time frame. We usually recommend an integration with webhooks to achieve a resource efficient real time integration.
Data structure
All claim events that can occur will have the same data structure defined below.
Payload | Description |
---|---|
type | The event type |
eventId | The unique event id |
date | The timestamp when the event occurred in UTC (ISO_8601) |
source | The collectAI event source the event originates from. The field is optional and will be null if no source can be provided. |
claim.id | The unique claim identifier used by collectAI |
claim.merchantId | The merchant id the claim belongs to |
claim.referenceNumber | The claim reference number (provided by the merchant) |
claim.customerNumber | The claim customer number (provided by the merchant) |
Please refer to the Claims API for the claim
fields above.
Example request
POST /your-url HTTP/1.1
Body
{
"type": "FEE_ADDED",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": "ESCALATION",
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345",
...
}
}
Types
Fee step executed
When a fee step has been executed to add a fee to a claim, we will make a POST
request to the configured URL.
This event is only triggered if the escalation process adds a fee. You can also add fees with the API, but this will not result in a webhook event.
Body
The following information will be provided when a fee was added:
Payload | Description |
---|---|
actionStep.name | The name of the action step executed |
claim.fee.id | The id of the fee claim item. |
claim.fee.type | The item fee type DUNNING_FEE . It can be with or without a reference to a primary item. |
claim.fee.value | The value of the fee in cents. |
claim.fee.currency | The currency of the fee's value, i.e. EUR |
Example payload
POST /your-url HTTP/1.1
Body
{
"type": "FEE_ADDED",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": "ESCALATION",
"actionStep": {
"name": "Add dunning fee 1",
},
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345",
"fee": {
"id": 9876,
"type": "DUNNING_FEE",
"value": "2875",
"currency": "EUR"
}
}
}
Message step executed
When a communication step has been executed and the message has been handed over to our providers, we will make a POST
request to the configured URL. In case of invalid (e.g. missing email address) or suppressed contact details, this event will not be sent.
A fallback communication will also trigger this event, when we have handed over a message to our providers.
The successful delivery of a message is not part of this event definition. In case a message delivery failed, please refer to the following event type Message could not be delivered.
Body
The following information will be provided when a claim is escalated:
Payload | Description |
---|---|
actionStep.name | The name of the action step executed |
claim.communication.channel | SMS , LETTER or EMAIL |
claim.communication.reference | Unique identifier for the communication message, i.e. to retrieve it's details or its content from the API. |
Example payload
POST /your-url HTTP/1.1
Body
{
"type": "ESCALATED",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": "ESCALATION",
"actionStep": {
"name": "Reminder Email 1",
},
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345",
"communication": {
"channel": "SMS",
"reference": "a6590eb9-497a-4a7f-b5df-xxxxxxxxxxxx"
}
}
}
Message could not be delivered
When a communication step was attempted, but could not be executed or has been executed and our message providers signaled back problems in delivering the message to the customer successfully, we will make a POST
request to the configured URL. It can take up to a few days until providers stop trying to deliver a message and signals an error.
This type can either follow a Message step executed webhook, when the provider wasn't able to deliver the message or can be be triggered directly, when we weren't able to hand over the message to one of our providers.
Body
The following information will be provided when a claim is escalated:
Payload | Description |
---|---|
claim.communication.channel | SMS , LETTER or EMAIL |
claim.communication.reference | Unique identifier for the communication message, i.e. to retrieve its details or its content from the API. |
claim.communication.recipients | The intended recipients of the communication. This may be an array of email addresses, a phone number or a postal address. |
claim.communication.error.type | CONFIGURATION_ERROR , CONTACT_ERROR , RENDER_ERROR , SEND_ERROR - see below for more details. |
Here are some more details on the failure, depending on the value of claim.communication.error.type
:
Error Type ( claim.communication.error.type ) | Possible Reason Codes ( claim.communication.error.reasonCode ) | Details Object ( claim.communication.error.details ) |
---|---|---|
CONFIGURATION_ERROR | INVALID_SENDER_ERROR , COMMUNICATION_PROVIDER_NOT_CONFIGURED | -- |
CONTACT_ERROR | INVALID_MOBILE_NUMBER , INVALID_EMAIL_ADDRESS ,INVALID_POSTAL_ADDRESS | { "details": { "invalidValues": { "phone": "<bad phone>" } } } |
RENDER_ERROR | PLACEHOLDER_ERROR , SNIPPET_ERROR , QRBILL_ERROR , INTERNAL_ERROR | --- |
SEND_ERROR | BOUNCE_PERMANENT_GENERAL , BOUNCE_PERMANENT_ON_SUPPRESSION_LIST ,BOUNCE_PERMANENT_ON_GLOBAL_SUPPRESSION_LIST ,BOUNCE_TRANSIENT_MBX_FULL ,BOUNCE_TRANSIENT_MESSAGE_TOO_LARGE , BOUNCE_TRANSIENT_CONTENT_REJECTED , BOUNCE_TRANSIENT_ATTACHMENT_REJECTED ,SMS_REJECTED , SMS_NOT_DELIVERED ,SMS_EXPIRED , INVALID_CLAIM ,PROVIDER_ERROR ', | { message: 'some message', smtpCode: '200' } |
To learn more about what these codes mean, see here.
Example payload
POST /your-url HTTP/1.1
Body
{
"type": "MESSAGE_NOT_DELIVERED",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": "ESCALATION",
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345",
"communication": {
"channel": "EMAIL",
"reference": "a6590eb9-497a-4a7f-b5df-xxxxxxxxxxxx",
"recipients": ["mail@mail.com"],
"error": {
"type": "SEND_ERROR",
"reasonCode": "BOUNCE_PERMANENT_MBX_NON_EXISTING",
"details": {
"message": "some error occured",
"smtpCode": "200",
...
},
},
}
}
}
Checkpoint step executed
Whenever the claim has reached a custom configured marker step during its lifecycle, we will make a POST
request to notify about this.
This could be used to connect external processes into the collectAI reminder process, i.e. triggering internal system processes.
Body
The following information will be provided when a checkpoint is reached
Payload | Description |
---|---|
actionStep.name | The name of the action step executed |
Example payload
POST /your-url HTTP/1.1
Body
{
"type": "CHECKPOINT_REACHED",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": "ESCALATION",
"actionStep": {
"name": "Reminder Email 1",
},
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345"
}
}
Disputed
When a dispute is triggered by the Debtor or Merchant, we will make a POST
request to the configured URL for this claim dispute.
Body
In addition to the common claim wrapper information a disputeReason
object will be provided when a dispute is triggered. It does contain justification for a dispute. It contains a type
and an optional message
for custom reasons. type
can have one of the following values:
Dispute Reason | Description |
---|---|
type | Human friendly identifier of the dispute option (e.g DEBTOR_ALREADY_PAID) |
message | Message from the customer disputing the claim (only for type OTHER ) |
disputeId | Unique identifier of the dispute |
Example request
POST /your-url HTTP/1.1
Body
{
"type": "DISPUTED",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": null,
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345",
"disputeReason": {
"type": "DEBTOR_ALREADY_PAID"
}
}
}
When dispute reason is OTHER
POST /your-url HTTP/1.1
Body
{
"type": "DISPUTED",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": null,
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345",
"disputeReason": {
"type": "OTHER",
"message": "I have a problem with my bank account."
}
}
}
Payment in progress
When a customer starts a payment process for the given claim, we will make a POST
request to the configured URL for this.
Body
The following information will be provided when a payment is in progress inside the payment
object:
Payload | Description |
---|---|
claim.payment.providerName | Payment service provider (PSP) that the user is using to start the payment |
claim.payment.paymentMethod | Selected payment method of the PSP |
claim.payment.amount | The amount in cents that the customer will pay |
claim.payment.currency | The currency of the payment, i.e. EUR |
claim.payment.reference | The reference of the payment, i.e. CAI-8373461 |
claim.payment.paymentRequestId | Unique identifier of a payment flow |
claim.payment.claimTotalAmount | The total amount (in cents) of the claim |
claim.payment.claimOutstandingAmount | The outstanding amount (in cents) of the claim |
Example payload
POST /your-url HTTP/1.1
Body
{
"type": "PAYMENT_IN_PROGRESS",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": null,
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345",
"payment": {
"providerName": "COMPUTOP",
"paymentMethod": "CREDIT_CARD",
"amount": 1000,
"currency": "EUR",
"reference": "12345",
"paymentRequestId": "c94e523f-45b8-4ab5-95e2-eae570188b18",
"claimTotalAmount": "1600",
"claimOutstandingAmount": "1400"
}
}
}
Payment completed
When a customer concludes the payment process for the given claim, we will make a POST
request to the configured URL for this.
Body
The following information will be provided when a payment is finished inside the payment
object:
Payload | Description |
---|---|
claim.payment.providerName | Payment service provider (PSP) that the user is using to start the payment (PAYPAL, COMPUTOP, PAYONE,.. etc.) |
claim.payment.paymentMethod | Selected payment method of the PSP (CREDIT_CARD, DIRECT_DEBIT, etc.) |
claim.payment.providerDetails | Payment provider specific external meta data. This field is optional and available only for limited payment providers (Computop only) |
claim.payment.amount | The amount in cents that the customer will pay |
claim.payment.currency | The currency of the payment, i.e. EUR |
claim.payment.claimItems | List of claim items that were paid. See below for more details. |
claim.payment.claimTotalAmount | The total amount (in cents) of the claim |
claim.payment.claimOutstandingAmount | The outstanding amount (in cents) of the claim |
claim.payment.reference | The reference of the payment, i.e. CAI-8373461 |
claim.payment.externalTransactionId | External unique identifier of a completed transaction (usually set by the payment provider) |
claim.payment.paymentRequestId | Unique identifier of a payment flow |
claim.payment.transactionId | Unique identifier of a completed transaction |
The object claim.payment.claimItems
is defined is follows:
Claim Item | Description |
---|---|
claimItem.id | The unique identifier of the item |
claimItem.amount | The amount paid for the item (in cents) |
claimItem.type | (Optional) The item type. Possible values: PRIMARY , DUNNING_FEE , COLLECTION_FEE |
claimItem.reference | (Optional) An external reference to your system. The reference should be unique within an item collection |
claimItem.customFields | (Optional) Additional custom fields in the form of key/value pairs. The value is always a string |
The object claim.payment.providerDetails
is defined as follows:
- Computop
payId
- ID assigned by Computop Paygate for a processed paymentccBrand
- credit card brand name, e.g. VISA, MasterCard, etc. Optional and available only for credit card payment method
Example payload
POST /your-url HTTP/1.1
Body
{
"type": "PAYMENT_COMPLETED",
"date": "2018-08-24T11:32:23Z",
"eventId": "a1daaeb5-7a71-4df1-9278-c635110e3033",
"source": null,
"claim": {
"id": 54321,
"merchantId": 1,
"referenceNumber": "REF-123",
"customerNumber": "12345",
"payment": {
"providerName": "COMPUTOP",
"paymentMethod": "CREDIT_CARD",
"amount": 1000,
"currency": "EUR",
"reference": "12345",
"externalTransactionId": "7272hhd",
"transactionId": "12264990-a4f0-47cd-b519-f99c6d2b606a",
"paymentRequestId": "c94e523f-45b8-4ab5-95e2-eae570188b18",
"claimItems": [
{ "id": 1, "amount": 300, "type": "PRIMARY", "reference": "ref-123", "customFields": { "extRef": "ABC123" } },
{ "id": 2, "amount": 700, "type": "DUNNING_FEE", "reference": "ref-123" }
],
"claimTotalAmount": "1600",
"claimOutstandingAmount": "1400",
"providerDetails": {
"payId": "sZGVyTmFtZSI6Ikpv",
"ccBrand": "VISA"
}
}
}
}