IPN read receipt response for 2Checkout
Overview
To validate the success of the notification process insert an inline response in the script output of your IPN listener. Once 2Checkout validates the response it considers the IPN successful. Otherwise, 2Checkout sends notifications per the failure recovery process until you provide a valid response.
Read receipt response from 2Checkout
The read receipt response is required in the IPN response body, unlike the previous hash string which is optional, with the EPAYMENT tag. We use this hash as a method of security.
To validate the success of the notification process, insert an inline response in the script output of your IPN listener. 2Checkout expects the following format:
HASH
Note: Possible values for algo: sha256, sha3-256.
Once 2Checkout validates that the above format is part of the response, it considers the IPN successful. Otherwise, 2Checkout continues to send notifications per the failure recovery process until you provide a valid response.
DATE and HASH
HASH
Calculate the HMAC_SHA signature using: - IPN_PID[0] - IPN_PNAME[0] - IPN_DATE - DATE - Your account’s secret key HASH fields values are case insensitive.
Fields used in the HMAC_SHA signature (captured from the IPN payload just received, in the same order)
IPN_PID[0]
First product ID from the IPN_PID[] array.
IPN_PNAME[0]
First product name from the IPN_PNAME[] array.
IPN_DATE
IPN date in the YmdHis format (ex: 20081117145935)
DATE
Response issuing date (server time) in the YmdHis format (ex: 20081117145935)
Example: building the response
For the example parameters included in this article, build the response using shorter data formats for date values. Use only the following values, in the same order, for the HMAC source string:
IPN_PID[0]
1
1
IPN_PNAME[0]
16
Software program
IPN_DATE
14
20050303123434
DATE
14
20050303123434
Therefore, the HMAC source string is:
HMAC SHA-2 string:
HMAC SHA-3 string:
Configure the response to output anywhere on the page defined as the IPN URL for:
SHA-2:
SHA-3:
2Checkout checks the string’s validity and marks notifications as "successfully sent" in the 2Checkout system. Otherwise, 2Checkout resends the IPN notifications at specific time intervals described in the failure recovery process section, until successfully confirmed. Also, 2Checkout displays an error notification in the Dashboard area of your Merchant Control Panel.
Last updated
Was this helpful?