Integrating With Your Webhook


Next Page: HesabeRequestHandler
Previous Page: Direct Apple Pay Integration


Webhook Integration

To implement a webhook for receiving transaction updates, you can create a POST API endpoint designed to accept transaction parameters following a transaction. To integrate this API with the payment initiation request, you should include the URL of your API in the "webhookUrl" variable, along with other required parameters as specified in the Hesabe developer portal. https://developer.hesabe.com/docs/2.0/integrating-end-point


For testing purposes, you can refer to the example webhook response provided below:

JSON Response

{
   "blocks":[
      {
         "type":"header",
         "text":{
            "type":"plain_text",
            "text":"TRANSACTION SUCCESSFUL",
            "emoji":true
         }
      },
      {
         "type":"section",
         "fields":[
            {
               "type":"mrkdwn",
               "text":"*Date & Time:*\n2023-09-20T10:09:36"
            },
            {
               "type":"mrkdwn",
               "text":"*Transaction Token:*\n84221716951937729753667644493"
            }
         ]
      },
      {
         "type":"section",
         "fields":[
            {
               "type":"mrkdwn",
               "text":"*Order Reference Number:*\n1695193758"
            },
            {
               "type":"mrkdwn",
               "text":"*Service Type:*\nPayment Gateway"
            }
         ]
      },
      {
         "type":"section",
         "fields":[
            {
               "type":"mrkdwn",
               "text":"*Amount:*\nKWD 49"
            },
            {
               "type":"mrkdwn",
               "text":"*Payment Type:*\nKNET"
            }
         ]
      }
   ],
   "token":"84221716951937729753667644493",
   "amount":"49.000",
   "reference_number":"1695193758",
   "status":"SUCCESSFUL",
   "payment_type":"KNET",
   "service_type":"Payment Gateway",
   "datetime":"2023-09-20 10:09:36"
}

This webhook will enable your system to receive real-time transaction updates in a structured format, allowing for further processing and notification of successful transactions.




Next Page: HesabeRequestHandler
Previous Page: Access Keys