Webhook

Introduction to EdfaPay Webhooks

EdfaPay's Webhook API offers a robust and reliable method for your system to receive real-time notifications concerning transaction status updates. This enables automated processes such as confirming orders, marking payments as complete, or handling failed transactions directly within your application, eliminating the need for constant polling.

EdfaPay sends a POST request to your configured notification_url after every significant payment event.

❗️

Security Note: SSL Required

Your server must be configured to support HTTPS with a valid SSL certificate. Connections over HTTP will be rejected.


How Webhooks Work

EdfaPay webhooks follow a straightforward process to ensure timely and accurate delivery of transaction updates:

  • 1. Provide Your URL: During the initial transaction request, you specify a notification_url.
  • 2. EdfaPay Sends Notification: After processing a transaction, EdfaPay sends a POST request to this URL, including a JSON body with event data.
  • 3. Acknowledge Receipt: Your system must respond with an HTTP 200 OK status to acknowledge successful receipt of the notification.
  • 4. Retry Mechanism: If 200 OK is not received, EdfaPay will retry sending the notification up to 3 times, with a 30-second delay between attempts.

Setting Up Your Webhook Endpoint

To successfully receive and process EdfaPay webhook events, you need to prepare your server endpoint and configure your EdfaPay account:

🚧

Pre-requisite: Portal Configuration

Before you begin developing your endpoint, ensure you have set up your webhook information within your EdfaPay portal account. Refer to the Webhook Information section in the portal for details.

Your endpoint will be a publicly accessible URL, typically structured as: https://your-domain.com/your-webhook-endpoint

EdfaPay will make a RESTful POST call to this endpoint, delivering a JSON payload containing the event data specific to the webhook type you are using.


📘

Important Update Note

It is crucial to keep your callback (notification_url) and its underlying logic updated. Any changes to your endpoint URL or processing logic must be reflected in your EdfaPay portal configuration to ensure continuous and correct reception of transaction responses. Failure to update may result in missed payment status notifications.