Skip to main content
[AU] Webhook API Endpoints

This article will outline how you can use our API to get information about your Webhooks.

Updated over a year ago

Note: This article is relevant to merchants integrating with Zepto in Australia.

Zepto has introduced new Webhook API endpoints that will help you understand the Webhook configuration for your account, as well as understand the status of the Webhook deliveries.

To get a better understanding of what Webhooks are and how to configure Webhooks for your Zepto account, please read our amazing article attached here.

This article explains four of our new endpoints and their functionality:

Please find the API documentation attached here.

1. Webhook Config (Find out which Webhooks are being fired to you)

To get a list of all the Webhooks configured for your account, you can make a GET request to the List all Webhooks endpoint. You can see a sample response from this endpoint below:

Endpoint: GET /webhooks

Response:

"data": [
{
"id": "8f21e9b6-6d96-4ba0-a5c7-92b332517532",
"url": "https://webhook.site/34d8324e-c74f-460b-a4d4-40712214449f",
"signature_secret":
"8a6226a9331c3ce1d249c8db533ced06632aea49a351a629c3701eb928a2aac3",
"events": [
"agreement.accepted",
"agreement.cancelled",
.
.
.
]}

2. List Webhook Deliveries (from the last 7 days)

To get a list of all the Webhook deliveries you have received in the last 7 days, you can make a GET request to the List all deliveries for a webhook API. The parameter required to make this request is the webhook_id. This is found in the response of the GET /webhooks request from section 1. The response will show all Webhook deliveries sent to this configuration within the last 7 days (Webhooks are only stored for a total of 7 days).

Endpoint: GET /webhooks/{webhook_id}/deliveries

Response:

"data": [
{
"id": "44d35889-fbca-45cd-895b-4b66b22b142e",
"event_type": "payout_batch.added",
"state": "completed",
"payload_data_summary": [
{
"ref": "PB.8apq"
}
],
"response_status_code": 200,
"created_at": "2021-12-13T05:44:44Z"
},
{
"id": "7243fa23-d213-43d6-afbf-2a3a94b4d1f5",
"event_type": "debit.scheduled",
"state": "completed",
"payload_data_summary": [
{
"ref": "D.ljml"
}
],
"response_status_code": 200,
"created_at": "2021-12-13T05:44:44Z"
}]

3. Getting an individual Webhook delivery.

To retrieve an individual Webhook delivery, we can make a GET request to the Get a Webhook Delivery API. This endpoint can be used to retrieve the status of an individual Webhook delivery. To get this information you will need to specify the individual webhook_deliveries_id in the request. This ID can be found in the response to the GET /webhooks/{webhook_id}/deliveries request from Section 2.

Endpoint: GET /webhook_deliveries/{id}

Response:

{
"data": {
"id": "78774731-8412-46da-9fae-51b6c00ddc73",
"webhook_id": "738b8207-7647-4d7a-8fcc-15f8fd58b8c7",
"event_type": "credit.cleared",
"state": "completed",
"payload": {
"data": [{
"ref": "C.srfi",
"type": "credit",
"amount": 1000,
"status": "cleared",
"bank_ref": "CT.qb52",
"category": "payout",
"channels": [
"direct_entry"
],
.
.
.
}],
"event": {
"at": "2021-12-13T13:04:43Z",
"who": {
"account_id": "0b22d23d-49bc-4321-84e5-a5c5c649016e",
.
.
},
"type": "credit.cleared"}},
"response_status_code": 200,
"created_at": "2021-12-13T13:04:43Z"
}
}

4. Resend a failed Webhook delivery.

In situations where you would like to get a failed Webhook delivery redelivered, you can use our Resend a Webhook Delivery API. This will tell the Zepto app to resend a Webhook that may have failed (for example, if your application had an outage), helping to start any logic that your application requires Webhooks for.

Endpoint: POST /webhook_deliveries/{id}/redeliver

Response:

{
"data": {
"id": "78774731-8412-46da-9fae-51b6c00ddc73",
"webhook_id": "738b8207-7647-4d7a-8fcc-15f8fd58b8c7",
"state": "pending"
}
}

Feel free to reach out if you have further questions by emailing us directly at support@zepto.com.au or clicking on the green bubble icon from the corner of the screen.


โ€‹
โ€‹

Did this answer your question?