Webhooks are an incredible tool in payment integration. They are automated messages from NetappsPay to send real-time data to you whenever a specific event occurs on your account, such as successful payments or unsuccessful transactions.

Typically, Webhooks function as an endpoint on your server that enables you to receive notifications about activities on your platform. When an activity happens, NetappsPay will send a POST request with a JSON body to that endpoint and include information about the event, such as its type and associated data.

Structure of a webhook

  • An event field describing the type of event
  • A data object containing information about the transaction

For example, a sample payload would look like this

{
    "event": "PAYMENT_FAILED",
    "data": {
        "amount": 1000.0,
        "appFee": 1.4,
        "merchantFee": 14.0,
        "txIsSucces": false,
        "currency": "NGN",
        "checkoutPoint": "http://localhost",
        "paymentRef": "123456789",
        "merchantRef": "123456789",
        "paymentChannel": "Card",
        "deviceFingerPrint": "2345678",
        "message": "Testing",
        "txStatus": "FAILED",
        "txTimestamp": "May 13, 2022, 4:31:11 PM",
        "customer": {
            "fullname": "Customer",
            "email": "[email protected]",
            "phone": "081543946918",
            "joinedAt": "May 13, 2022, 4:22:52 PM"
        },
        "card": {
            "first": "520473",
            "last": "2449",
            "expiry": "12/25",
            "cardType": "Master Card"
        }
    }
}

To setup your webhook credentials, follow the steps below:

  • Login to your NetappsPay account
  • On the dashboard, select "Api Keys/Webhooks" menu from the developer section.
  • Enter your webhook credentials and click the "Submit" button to complete the process.