API Reference

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 payment 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
  • 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

Knet webhook example

Knet Success webhook data

Knet fail/canceled 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 transaction webhook data