Overview
Webhooks are a communication mechanism that enables event-driven notifications between systems. When an event occurs in Novac system, such as a payment being completed or a payout being initiated. Novac automatically sends a real-time notification to the merchant’s system. This means your system doesn’t have to constantly poll Novac for updates. Instead, you simply provide Novac with a publicly accessible webhook URL, and Novac will send aPOST request to that endpoint whenever a relevant event occurs.
Webhook URLs must be publicly accessible at all times in order to receive notifications.
Process Flow
This sequence diagram illustrates the process flow from initiating a checkout payment to its completion, involving the customer, the merchant system, and Novac. With Novac payment, you don’t need to manually subscribe to webhook events.Once you configure your webhook URLs in the dashboard, Novac automatically sends notifications whenever relevant events occur in your account.
Setting Up Your Webhook
1
Step 1 - Log in to your Novac Dashboard
Sign in to your Novac Dashboard using your account credentials.
2
Step 2 - Navigate to Webhooks
From the sidebar menu, go to Settings, Click on API settings tab.
This is where you can configure both test and live webhook URLs.
This is where you can configure both test and live webhook URLs.
3
Step 3 - Add your Webhook URLs and Click on Save
Enter the publicly accessible URLs where you want to receive webhook notifications.
- Add a test webhook URL for test transactions.
- Add a live webhook URL for real payments in production.
- Ensure the URLs are always available and accept
POSTrequests.
POST request to these URLs after a transaction is completed.
Notification Types
| Notify Type | Description | Common Scenario |
|---|---|---|
successful | Payment or transaction was processed successfully. | A customer’s card or bank transfer succeeded. |
failed | Transaction attempt failed or was declined. | Insufficient funds or incorrect payment details. |
reversed | A previously successful transaction was reversed. | Refunds or chargeback scenarios. |
abandoned | Transaction was started but not completed. | Customer exited before finalizing payment. |
Handling Webhook payload
Each webhook request payload sent from Novac follows the structure below:Webhook format
For best practices, after receiving a webhook, we recommend that you validate the transaction status by using the verify transaction endpoint.
Verifying Webhook Source
Webhooks are publicly available URLs; this means that anyone can fake a webhook sample and send a fake request to your system. It’s important to verify that all webhooks received are from Novac to avoid man-in-the-middle attacks. To verify the webhook your system received. We advise merchants to allow requests from a dedicated network address. We provide our IP address, and you should verify that every webhook request comes from it. This method is called IP whitelisting. Novac public IP address: 18.233.137.110It’s important to know that we can add to this IP at any point in time; however, we will inform our merchant before doing so.
What is IP whitelisting?
IP whitelisting is a mechanism used on the server-side as a filter; it helps ensure only a pre-approved set of IP addresses or IP ranges have the right to hit a server. If a request comes from an unknown IP address, your server will reject it.You must use IP whitelisting as a layer of protection for incoming webhooks.
If your system is behind a proxy or load balancers, you must obtain the real client IP.
Validate incoming webhook IP address.
To validate incoming webhooks, we have provided sample codes to give you a better context on how to go about this depending on your programming language.Retries
To ensure reliable delivery, Novac automatically retries webhook notifications when your server fails to respond with a successful 200 OK status code.Your webhook endpoint must always respond with HTTP 200 to acknowledge receipt of the event. Any other status code (e.g., 4xx or 5xx) will trigger a retry attempt.
| Parameter | Description |
|---|---|
| Retry Count | 3 attempts |
| Retry Interval | Every 5 seconds between retries |
| Condition | Triggered when Novac doesn’t receive a 200 OK response from your webhook endpoint |