Callback
After a payment or refund is completed, regardless of whether the transaction is successful, PayCloud will forward the transaction result and relevant user details to Sadad. Sadad's backend system must confirm this data by sending a response to the gateway payment system.
- If the gateway payment system does not receive confirmation from Sadad (success or timeout), it will be considered as a missed notification. To ensure Sadad receives these notifications, the system will periodically resend notifications, sending a total of 15 times within 12 hours. However, please note that the system cannot guarantee that each notification will be delivered. The reminder notification sending intervals are 5s, 10s, 15s, 30s, 60s, 3m, 10m, 15m, three 30m intervals, and three 3h intervals.
- Sadad's backend may receive duplicate payment notifications multiple times. Therefore, Sadad needs to ensure that its system is capable of handling such duplicate notifications.
- The recommended approach is to check the attached payment information upon receiving any notification. This is to determine whether the details have been processed before. If the data has been processed, simply return the previously determined result. If not, process the new data and then send a response. To ensure data integrity, especially in the case of concurrent transactions, use transaction locks before carefully examining payment data.
- For enhanced security, Sadad should also verify the signature of the notification.
- In future iterations, additional parameters may be added to the notifications based on evolving business needs. Therefore, it is crucial to ensure the adaptability of the verification system. Unlike a hardcoded list of verification parameters, your system should dynamically handle the parameters provided in each notification.
- POST
URL
{webhook_url} Transaction Result Notification
Parameters
| Field | Type | Description |
|---|---|---|
| webhook_url | String | webhook_url |
- Request-Example
{
"account_entry_mode": "07",
"trans_end_time": "2024-08-20 09:56:44",
"charset": "UTF-8",
"card_network": "VISA",
"store_no": "4022000491",
"pay_scenario": "SWIPE_CARD",
"trans_fee_m": "0",
"sign": "id05OTSywooxGitettnzHK4d8hiurUg1uxKeFJEj6xoCVmTRwgMMH7ZaARYVOMQlK7k1AhccynQYou7B1sNGN/iUsbculb8IvZikiy4EuHMBqQM/BmHDbuTFJVFL7q+hqzMMgZYWD RYwC51/7kqxOhPo99rGq5Wn8amGBzr1DW6JzRiKPFYyXpjf5SnA2L2KqluqxhYSNaSkPZeCSHBIxyQvtzcwF9HRFQdSZaXsCD5j05HvBST2ZXGqv7+KjtOFRhke3dWnmyRDNrB2Qm+RzZaaehyBCNoU1weHBxYPtMJ7Jh32CYAIauWNbXnjkJsnbFD+UCASK3zLPrx1yw==",
"auth_no": "637054",
"vat_amount": "0",
"pay_channel_terminal_no": "37302329",
"order_amount": "10",
"app_id": "wz8c5a8bb2a713ca78",
"sign_type": "RSA2",
"price_currency": "QAR",
"terminal_sn": "P0000006668",
"trans_status": 2,
"trans_type": 1,
"timestamp": "1724147825552",
"trans_no": "50220006932408200000001",
"merchant_no": "302200069321",
"out_merchant_no": "M1234121",
"method": "inst.payment.result.notify",
"pay_user_account_id": "541333******0554",
"pay_channel_merchant_no": "352909960600600",
"format": "JSON"
}
Success Response
- Success-Response
{
"code": 200,
"message": "success"
}