Enable Webhooks
Enable Webhooks Notifications with The Payment Gateway
The steps needed to enable Payment Gateway webhook notifications:
-
In
POST /paymentrequest (the request we use to create payments), there is a field namednotificationUrl, you have to provide your webhook URL in that field to receive webhook messages on it. -
Your provided webhook URL should be publicly available and reachable on the public internet network, It should also be HTTPS; HTTP URL without an SSL certificate will not be acceptable.
-
When receiving a webhook message from our Payment Gateway, you will receive a payment object containing all the needed information about that particular payment including the new payment status,when doing processing on that received payment object, you should always return a
200 OKresponse to our Payment Gateway otherwise the payment gateway to repeat sending that particular webhook message. Note: when your system (The merchant application) receives a webhook request from our Payment Gateway, you must respond to our webhook with a200 OKresponse otherwise our Payment Gateway will keep sending you new repeated webhook messages for that particular payment.
the Merchant application should respond with 200 OK, otherwise, the Payment Gateway will keep sending webhook requests repeatedly.
Webhook Data Sample
Received Request Header
{
"X-Signature": "R/sDfOilPfSNB7oqIF/Vgil3bcECQaHVlQ57nK20mzY65Sr9fZDQrJabVTbS7ILFRshXTASGOfF
t0n8WkdDOtCEZ3phYISIg4PZ4RpCzN5thqUn1cblthUTo919wCzVnJEVtFs4qqmfl+DFrHkRAjbSkbepcXuG0HymRPI
oK26YSBQyPl9WUVLJ9h9dJ8lktspDqxDjb2cgk1jsckiXZkrAVDTh28R/h51yTUJpx6M9rIHWJtVgMxZS7nl45DBuOT
qwJxyKQftwOQpbrN19wtCpzRPys3zFFnwAzlLa6hOThIaszyMgkuxtSfuRvIRC2PALBz+1aFBpQn0Yg7v7bFg=="
}
If you want to verify the X-Signature, you will need to acquire Payment Gateway's RSA Public key,
Contact the Payment Gateway Team to request it.
Received Request Body
You will receive the following request payload on the webhook URL (notificationUrl), it contains the full payment object including
the status & paymentId fields, use these fields to update the Order or Payment status on your system (Merchant system).
{
"requestId": "20250226-171349-023",
"paymentId": "935e93e1-c74b-45ac-8e95-e11e817eb48f",
"status": "SUCCESS",
"canceled": false,
"amount": 3000,
"confirmedAmount": 3000,
"currency": "IQD",
"paymentType": "CARD",
"creationDate": "2025-02-26T17:13:51",
"details": {
"resultCode": "00",
"rrn": "505700009817",
"authId": "123456",
"authDate": "2025-02-26T17:21:06",
"maskedPan": "521372******8582",
"paymentSystem": "MASTER_CARD"
},
"withoutAuthenticate": false,
"additionalInfo": {}
}