Skip to main content
Webhooks

Guide to set up webhooks in ezyCollect

Jane avatar
Written by Jane
Updated over a week ago

Webhooks are one of a few ways web applications can communicate with one another. It allows you to send real-time data whenever a given event occurs.

In ezyCollect/SimplyPaid, webhooks can be used to notify your Accountings or ERP software, when an activity has been recorded or when a payment has been made. These events can then be consumed and transformed into eg. an email internally when a payment has been made or automatically write-back payments to your accounting system.

To create webhooks, a webhook URL is required. A webhook URL will be used as a destination to send data whenever events occur. This is provided/generated by the receiving application.

1. Login to your ezyCollect file.

2. Click on 'Webhooks' from the sidebar menu on the left


2. Click on the 'Add New Webhook' button

3. In the 'URL to be called' section, enter the webhook URL from the application you want to send data to (http:// or https:// required)

These URLs need to be built and configured from the client's end.

4. Select the type of events you require ezyCollect to notify you about

Currently, we have PAYMENT available. ACTIVITY webhook is not available yet.

5. Save by clicking on 'Create Webhook'


Important Notes:

For each webhook event, you are able to review when the event had occurred and the payload (body of data included). This will depend based on the type of payment URL in addition to the payment option (invoice or one-off):

a. Invoice Payments (Payment URL generated from ezyCollect Reminders)

b. One-Off Payments Option (Payment URL generated from ezyCollect Reminders)

c. One-Off Payments (Payment URL generated from Accounting System with Key-Value Pairs)

If a customer is redirected via a payment URL from an invoice generated by the ERP/Accounting System, this is considered as type c. - One-Off Payments (Payment URL generated from Accounting System with Key-Value Pairs)

Sample Payload for Invoice Payments (Payment URL generated from ezyCollect Reminders)

{
"id": "df0ff1a4-47d8-48a4-b727-8ad560f67d3d",
"createdDate": 1615349393295,
"data": {
"accountNumber": "*None",
"cardName": "sesh upp",
"cardNumber": "420000xxxxxx0000",
"currency": "AUD",
"customerId": "28",
"customerName": "Bernardo Marques",
"date": 1615309775000,
"id": "0df9c01b-f747-45d5-8cc4-7bdcbb091a3f",
"paymentAllocations": [
{
"amount": 100,
"invoiceId": "125",
"invoiceNumber": "00000017"
}
],
"status": "FINAL",
"totalAmountPaid": 100,
"transactionId": "0df9c01b-f747-45d5-8cc4-7bdcbb091a3f"
},
"category": "PAYMENT",
"type": "Accepted"
}

Sample Payload for One-Off Payments Option (Payment URL generated from ezyCollect Reminders)

{
"id": "5daa4538-60b1-4afa-a5ec-5b7d2ad4bf4a",
"createdDate": 1615349503577,
"data": {
"accountNumber": "CUS000006",
"cardName": "Bart Tan",
"cardNumber": "420000xxxxxx0000",
"currency": "AUD",
"customerId": "7",
"customerName": "Island Way Motel",
"date": 1615309845000,
"id": "c217976c-519c-47ef-a87c-47d2fa50c3f9",
"paymentAllocations": [
{
"amount": 100
}
],
"status": "FINAL",
"totalAmountPaid": 100,
"transactionId": "c217976c-519c-47ef-a87c-47d2fa50c3f9"
},
"category": "PAYMENT",
"type": "Accepted"
}

Sample Payload for Payments (Payment URL generated from Accounting or ERP System with Key-Value Pairs)

{ 
"category": "PAYMENT",
"createdDate": "2021-02-26T04:18:04+0000",
"data": {
"cardName": "Jane Doe",
"cardNumber": "XXXX-XXXX-XXXX-0000",
"currency": "AUD", "date": 1614273468000,
"fees": 1.8599001324773354,
"id": "b34640c6-69f5-4743-9990-78edfa980445",
"metadata": {
"internalid": "11235",
"location": "null",
"type": "invoice"
},
"paymentAllocations": [
{
"amount": 97.6
}
],
"status": "FINAL",
"totalAmountPaid": 99.46,
"transactionId": "ch_zwJ6N9FSesy6dhu0SekbhQ"
},
"id": "8c58d55a-32bd-4c5e-9f88-11f7d9c966a0",
"type": "Accepted"
}

Did this answer your question?