Webhook

Webhooks (Web Callback) provides payment information to your application in real-time when

  • a payment is successful
  • a payment fails
  • error in payment

Defining Webhook is mandatory and can be done using the notificationUrl parameter while creating charge request. The notification URL will receive the webhook data.

After Payment

  • Successful transactions will be redirected on returnUrl
  • All other scenarios like failed or cancelled it will redirected on cancelUrl.

Referencing webhook data

Webook data can be saved in your database for future refernce in the getpaymentstatus API.

track_id can be fetched from the returnUrl, cancelUrl, notificationUrl and passed to the getpaymentstatus API to fetch the transaction details at a later point

👍

You will get below data after a success or fail payment

  • payment_id
  • result
  • isTerminalStatus
  • post_date
  • tran_id
  • ref
  • track_id
  • auth
  • order_id
  • requested_order_id
  • refund_order_id
  • payment_type
  • invoice_id
  • transaction_date
  • receipt_id
  • trn_udf
📘

Terminal Webhook Notification

The system dispatches a webhook to the merchant's notificationUrl/notifyURL when the payment link is expired.
The webhook includes the isTerminalStatus: true boolean field indicating no
further state transitions will occur.

Merchants can safely release inventory or mark orders as cancelled
immediately upon receiving "result": "NOT CAPTURED" with "isTerminalStatus": true, rather
than waiting indefinitely or polling

Merchants no longer need to run continuous GET inquiry polling for late captures once
isTerminalStatus: true is received.

Knet webhook example

Knet Success webhook data

Knet fail/canceled/error transaction webhook data

Master Card / Visa Card/ Apple Pay / Samsung Pay / Google Pay webhook example

Master Card / Visa Card/ Apple Pay / Samsung Pay / Google Pay success transaction webhook data

Master Card / Visa Card/ Apple Pay / Samsung Pay / Google Pay fail/canceled/error transaction webhook data