Create a webhook

You can create a webhook (API) that will send a callback request to a URL of your choice in response to events that happen in Ezypay. The webhook will return a full response object containing all details of the object. For example, when a customer created event occurs, the webhook will return the details of the customer object created e.g. name, email, contact information and address.

Event Types

Ezypay provides the following events and subscribed Webhooks can be configured to send notifications when these events happen:

EventOccurs when...
customer_createEvent when a new customer is created.
customer_updateEvent when a customer's details are updated.
invoice_createdEvent after an invoice is created.
invoice_past_dueEvent when an invoice status has changed to past_due because the invoice due date has passed but the invoice has not been paid. Can occur because of a failed transaction or no transaction was attempted.
invoice_paidEvent when an invoice status has changed to paid because of a successful payment transaction or an external payment was recorded.
invoice_batch_createdEvent when a batch of ad-hoc invoices to bill one or more customers on an on-demand basis gets created.
invoice_batch_processingEvent when a batch of ad-hoc invoices to bill one or more customers on an on-demand basis is being processed.
invoice_batch_successEvent when the status of a batch of ad-hoc invoices to bill one or more customers on an on-demand basis changes to success.
invoice_batch_invoice_failedEvent when the status of a batch of ad-hoc invoices to bill one or more customers on an on-demand basis changes to failed.
subscription_createEvent when a new subscription is created.
subscription_cancelEvent when a subscription is cancelled.
subscription_activateEvent when a subscription is activated.
subscription_completedEvent when a subscription completes.
payment_method_invalidEvent when a customer's payment method becomes invalid. This event is only thrown when a valid payment method becomes invalid. If a payment method is invalid upon creation, no webhook event is triggered.
payment_method_validEvent when a customer's payment method becomes valid. This event is only thrown when a customer approves their PayTo payment method (which sets the payment method to valid), as PayTo payment methods are invalid by default.
payment_method_linkedEvent when a payment method gets linked to a customer.
payment_method_replacedEvent when a customer's payment method gets replaced by another.
payment_method_changedEvent when a customer's primary payment method gets changed to another.
subscription_payment_reactivateEvent when a customer's subscription is reactivated. A customer's subscription can become deactivated because of past due invoices. When all invoices are resolved, the subscription will automatically reactivate.
subscription_payment_stoppedEvent when a subscription's billing schedule becomes inactive and billing has stopped.
credit_note_createdEvent when a credit note is created. This event is triggered when a merchant moves funds to a customer usually as a refund or a dispute.
credit_note_paidEvent when a credit note is successfully paid. Credit note status changed to paid.
credit_note_failedEvent when a credit note transaction has failed. Credit note status changed to failed.
partner_invoice_createdEvent after a partner invoice is created.
partner_invoice_paidEvent when a partner invoice status changed to paid because of a successful payment transaction or an external payment was recorded.
partner_invoice_past_dueEvent when a partner invoice status has changed to past_due. Can occur because the invoice due date has passed but the invoice has not been paid because of a failed transaction or simply no transaction was attempted.
dispute_wonEvent when a dispute is won.
dispute_lostEvent when a dispute is lost.
transaction_settledEvent when an invoice payment has been settled to the merchant.

Instructions on how to create a webhook can be found here:
https://developer.ezypay.com/reference#create-webhook

🚧

NOTE

In an event whereby Ezypay fails to send a webhook to the integrator. Ezypay will try a maximum of 32 times only.

Automatic Retries

If a webhook notification fails (i.e. endpoint does not return a 2xx HTTP or timeout response), Ezypay will automatically attempt to resend the webhook notification to your webhook URL. For the next 24 hours, Ezypay will resend the webhook notification every 60 mins after each fail attempt.

Each failed attempt will be recorded in the webhook event notification log in the order in which they were created, allowing for follow-up support action. You can retrieve the notification log by calling the List webhook notification log (API). Failed attempts can be identified as they will have the status = fail. The webhook notifications log will display the most up-to-date information on webhooks sent in the system.

Simulate a webhook event

You can test out a webhook to ensure it is working correctly by manually simulating a webhook event (API). You can specify what events will trigger the webhook response. A record of events will be created in the webhook notification log. You can view this log by calling the List webhook notification log (API).

View a webhook

You can retrieve a webbhook (API) to view details such as the events that have been assigned to trigger this webhook.

How to retrieve webhook details can be found here:
https://developer.ezypay.com/reference#retrieve-webhook-details
https://developer.ezypay.com/reference#list-webhook-notification-logs

Update a webhook

You can update a webhook (API) to make changes to an existing webhook such as:

  • changing the callback URL
  • adding or removing events that will trigger this webhook

How to update a webhook instructions can be found here:
https://developer.ezypay.com/reference#update-webhook

Delete a webhook

You can delete a webhook (API) that is no longer required.

How to delete a webhook instructions can be found here:
https://developer.ezypay.com/reference#delete-webhook

👍

Steps to setup your Ezypay POSTman environment:

Guide to setting up Ezypay's POSTman sandbox environment

Setting up Ezypay's webhooks collection

In case of missing button, just click import on your POSTman application and select "Link":