Skip to main content

Webhook

Webhook Service

tip

When payer complete the payment or refund, lianlian thailand will push the notification result to the notify_url which was provided in the merchant payment or refund request. Notification will push 13 times automatically if not received the assigned response from merchant server side, interval 10 mins for each push.

Payment notification

Request Parameters

ParameterTypeLengthRequiredDescription
merchant_idstring18trueunique identifier for merchant assigned by LianLian, 8 digits prefix with '14'
order_idstring18truelianlian bill id, one on one with merchant order id
merchant_order_idstring64truemerchant order id
order_statusstring2truefixed value: PS, see status enums Payment Status
order_amountstring8,2trueorder_amount in request
order_currencystring3trueorder_currency in request
complete_timestring19truepayment bill complete time, timezone with UTC+7(Asia/Bangkok)

Response

caution

merchant respond to lianlian

ParameterTypeLengthRequiredDescription
codeint-truefixed value: 200000
messagestring8truefixed value: Success

Request & Response Sample

  • Request
{
"merchant_id": "142023010100009001",
"merchant_order_id": "ORDER_202301010001",
"order_id": "122023010100160021",
"order_status": "PS",
"order_amount": "88.99",
"order_currency": "THB",
"complete_time": "2023-01-01 13:19:13"
}
  • Response
{
"code": 200000,
"message": "Success"
}

Curl Sample

curl -X POST \
-H 'Content-Type: application/json' \
-H 'sign-type: RSA' \
-H 'sign: ACXIbRDxK1ETQ51s4LEq1MkLQptK5nEnEG1eUykzz5oH+StkOYqZnNP9uaiNoaqJqdWP0CD3b0dHQWJGCiUx+3EpYE5FSujakMFnh0wL8GrdtJ7nA4+cDd4xSQHq5wBX5GnbEYnD7bXV3hEC9A0sBqx7Z87deXiuE+L0j35hTut/QFRvHOBMDvMfgO1OiPkNWmJ6jf20LrE3D4RJJru8o70aUM++lLOPPdbeghDXIYM/veHu+w3wU3nDY5kbsD/9IeaOE40qO/Tykyk2LeBbhpV1QNW/gqr0C7CEmt0IcYLKHkCvVieroGzmXZNyPxVglD0M2nxSeXFQ0SGcclqWTg==' \
-i https://merchant_notify_url.com/notify_path \
-d '{"merchant_id":"142023010100009001","merchant_order_id":"ORDER_202301010001","order_id":"122023010100160021","order_status":"PS","order_amount":"88.99","order_currency":"THB","complete_time":"2023-01-01 13:19:13"}'

Refund notification

Request Parameters

ParameterTypeLengthRequiredDescription
merchant_idstring18trueunique identifier for merchant assigned by LianLian, 8 digits prefix with '14'
refund_order_idstring18truelianlian refund order id
merchant_refund_idstring64truemerchant refund id
refund_amountstring8,2truerefund amount, up to two decimal
refund_currencystring3truerefund currency, supported Currency
refund_statusstring2truefixed value: RS, see Payment Status
complete_timestring19truepayment bill complete time, timezone with UTC+7(Asia/Bangkok)

Response

caution

merchant respond to lianlian

ParameterTypeLengthRequiredDescription
codeint-truefixed value: 200000
messagestring8truefixed value: Success

Request & Response Sample

  • Request
{
"merchant_id": "142023010100009001",
"merchant_refund_id": "REFUND_202301010001",
"refund_order_id": "122023010100160022",
"refund_status": "RS",
"refund_amount": "88.99",
"refund_currency": "THB",
"complete_time": "2023-01-01 13:19:13"
}
  • Response
{
"code": 200000,
"message": "Success"
}

Curl Sample

curl -X POST \
-H 'Content-Type: application/json' \
-H 'sign-type: RSA' \
-H 'sign: ACXIbRDxK1ETQ51s4LEq1MkLQptK5nEnEG1eUykzz5oH+StkOYqZnNP9uaiNoaqJqdWP0CD3b0dHQWJGCiUx+3EpYE5FSujakMFnh0wL8GrdtJ7nA4+cDd4xSQHq5wBX5GnbEYnD7bXV3hEC9A0sBqx7Z87deXiuE+L0j35hTut/QFRvHOBMDvMfgO1OiPkNWmJ6jf20LrE3D4RJJru8o70aUM++lLOPPdbeghDXIYM/veHu+w3wU3nDY5kbsD/9IeaOE40qO/Tykyk2LeBbhpV1QNW/gqr0C7CEmt0IcYLKHkCvVieroGzmXZNyPxVglD0M2nxSeXFQ0SGcclqWTg==' \
-i https://merchant_notify_url.com/notify_path \
-d '{"merchant_id":"142023010100009001","merchant_refund_id":"REFUND_202301010001","refund_order_id":"122023010100160022","refund_status":"RS","refund_amount":"88.99","refund_currency":"THB","complete_time":"2023-01-01 13:19:13"}'