Webhooks

Webhooks are server callbacks to your server from Instantpay. Webhooks are event-based and are sent when specific events related to the transaction happen.

Configuration Steps

The Webhook is called after the transaction has been done. It reports the status of the transaction. In case of a pending transaction, final result of the transaction will also be reported on this Webhook once it is settled.

Step 1 -Please create a URL at your end on which we will hit a GET request with transaction parameters.

Step 2- Then login to Instantpay portal and Go to Developer APIs ➡️ Credentials and then click on Setup Webhook and enter the Webhook URL.

Step 3- For every callback, we expect a specific in response to the callback. The request and response structure is mentioned below.

Request Structure

https://<your-webhook-url>?ipay_id=ipay_id&agent_id=agent_id&opr_id=opr_id&status=status&res_code=res_code&res_msg=res_msg&txn_mode=txn_mode

Request Parameters

ParamsDescription
ipay_idUnique transaction id generated in Instantpay's system
agent_idUnique transaction id given by the client at the time of transaction
opr_idUniques transaction id from the service provider
statusStatus of the transaction. Possible values are SUCCESS, PENDING or REFUND
res_codeResponse Code
res_msgResponse Message
txn_modePossible values are DR for Debit from user wallet and CR for Credit in user wallet.

Response Structure

{
    "ipay_id": "1234567890",
    "success": true,
    "description": "callback called successfully"
}

Response Parameters

ParamsDesription
ipay_idecho back the ipay_id field value
successIt will be true or false
descriptionRemarks

📘

Important

We mark the callback as acknowledged when we receive the response with HTTP Code 2XX, success: true and ipay_id field is correctly echoed back.

If the callback is not acknowledged in 3 sec then we will be sending 5 request at an Interval of 5, 15, 30, 60 and 240 minutes at the configured URL.

❗️

"res_code":"TUP","res_msg":"Response Timedout please contact help desk #E1"

If you received above message in callback please check the final status from Instantpay Dashboard and take action accordingly.