Setup your Webhooks

Webhooks/Callbacks allow LocalPayment to send real-time notifications to your server about events such as transaction updates, payment status changes, and more.

This guide will walk you through the steps to set up and configure webhooks in your LocalPayment Dashboard.

📃

Prerequisites


Steps to Set Up Webhooks/Callbacks

  1. Log in to the LocalPayment Dashboard.
  2. Navigate to the Configurations module.
  3. Click on Clients section.
  4. Click on the Edit option.
  5. In the header menu, select Notifications.
  6. Select Reports from the Notifications menu.
  7. Choose the type of callbacks you want to configure:
    • URL
    • Email
  8. Click the Add button.
  9. Enter the URL of your server endpoint or Email that will receive the webhook notifications.
  10. Select the Country field, and all available countries will appear.
  11. Select an Account Number. This field lists all of your Localpayment accounts for the selected country. If you choose All in the Country field, you must also pick All in the Account Number.
  12. In case you are configuring an URL, enter your Key information. We will configure and share with you a secret key that will be used to sign the request via HMAC-SHA256. The resulting signature will be sent in the X-Signature header.

❗️

Important

When you sign the HMAC-SHA256 request, it is recommended that you compress the JSON request to remove white space. Also avoid using any JSON formatter that can modify the original format of property values.

  1. After entering the necessary details, click on the Save button to confirm the setup.

👍

Additional Tips

  • Always use HTTPS for your webhook URL to ensure data is transmitted securely. Additionally, verify the authenticity of webhook requests using the secret key.
  • You can also check the status of a transaction using the Get Transaction Status endpoint. The request payload you will receive will be the same as the one sent by the CALLBACK push notification service.

🚧

Troubleshooting

  • No Notifications Received: Ensure that your webhook URL is correct and accessible from the internet. Check your server logs for any errors.
  • If you encounter any issues, contact Localpayment support for assistance.