๐ Integrating With Your Webhook
๐ Webhook Integrationโ
Real-time Transaction Updates
Implement a webhook to receive real-time transaction updates by creating a POST API endpoint designed to accept transaction parameters. Include your API URL in the "webhookUrl" variable along with other required parameters as specified in the Hesabe developer portal.
๐ Webhook Implementation Stepsโ
๐ API Endpointsโ
๐ Request Parametersโ
Create a POST API endpoint in your application to receive transaction parameters
Include your API URL in the "webhookUrl" variable when initiating payment requests
Handle incoming webhook data to update your system with transaction status
๐ Example Webhook Responseโ
For testing purposes, you can refer to the example webhook response provided below:
{
"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"
}
๐ Key Response Fieldsโ
Benefits of Webhook Integration
This webhook will enable your system to receive real-time transaction updates in a structured format, allowing for immediate processing, automatic order fulfillment, and instant notification of successful transactions.