Asynchronous Notification
Asynchronous notification is a HTTP request which is sent from LianLian to notify you about the status of a specific transaction.
In this section, you will learn about the common concept and features of asynchronous notification.
The Features of Asynchronous Notification
Generally, a asynchronous notification has below features:
It is written in
InputStream
. Here are several examples about the way to get it:
Its
Content-type
istext/json;charset=utf-8
.It is sent from below IP addresses, which we recommend you to add in whitelist:
The HTTP protocol of asynchronous notification is set according to the protocol of
notify_url
which you set in the original request. The recommended version ofTLS
is not lower than1.2
if you are usingHTTPS
protocol.
Handle Asynchronous Notification
For all the asynchronous notifications, your system need to do 2 steps before executing delivery logic:
Send response. For asynchronous notifications which passed the verification step, you need to send below
json
object to inform LianLian that you have received our notification. Otherwise we would repeatedly send asynchronous notification until we receive the expected response or the count of total re-send operation has exceeded its limitation.
Assuming there is no issues from internet layer, if we haven't received your response within 5
seconds, asynchronous notification mechanism would mark the result as FAILURE and send it again.
Resending logic: 30 times in total with an interval of 2 minutes, until your server has correctly handled the notification. But if we never got the expected response after 30 times, the resending action would be stopped. In this case, you will have to do the query actions by yourselves.
However, there are few cases like internet traffic jam, network delay, packet loss or other causes which results in an unexpected phenomenon, that your server has received 2 same asynchronous notification for a same transaction. In case of it, your system MUST have the capability to handle duplicated asynchronous notifications, respond them with the expected response of LianLian but proceed your successful logic only ONCE. The financial risks which caused by repeated asynchronous notification borne by yourselves.
Last updated