mockup webhook

GET {{webhook_url}}?type=Order&instance=test_linepay01&code=StatusChange&message=Order Paid&signature={{signature}}

mockup webhook use for create your mockup response you got from ksher when paid order

9. WebHook

The webhook callback address can be configured in the background of the gateway payment gateway

When the order status changes, the payment gateway will send a GET request to the webhook address with the following parameters

Parameter nameTypesDescription
typestringEvent Types, fixed value order
instancestringMerchant side order number, that is, the merchantorderid field
codestringEvent code, fixed value statuschange
messagestringOrder status changes
signaturestringRequest signature
  • The request can be signed and verified through the signature rule, and the apiUrl in the signature rule uses the full address of the webhook
  • If the webhook address response is 200, the notification is successful, otherwise the notification will be repeated, repeated every 5 seconds, at most 6 times
  • When receiving the webhook notification, the parameters need to be verified. For the verification process, please refer to the signature calculation section below.
  • Note the signature is used for you to validate the web hook is actually come from the Payment Gateway or not. you should validate the signature using the same algorithm as other API call.

message

message field value

valueinstruction
Order TimeoutOrder timeout
Order ClosedOrder closed
Order PaidOrder Paid
Order RefundedOrder partial refund/full refund

Webhook notification example

URLwebhook address
MethodGET

Request content

Example in Query string

{https://yoururlwebhooksetup}?code=StatusChange&instance=test_linepay01&message=Order Paid&signature=DA0608731FA24D4C8694D839A2D990D4AEDF3A897126C09BE4C9D6B4DB605932&type=Order

Example in Qodex

Note the signature is used for you to validate the web hook is actually come from the Payment Gateway or not. you should validate the signature using the same algorithm as other API call.

Test a webhook endpoint

If you don't have public url you can setup Webhook URL to send some test webhook like https://webhook.site

or you can read info about Test WebHook registration with request logging site from Microsoft.

Request Params

KeyDatatypeRequiredDescription
typestring
instancestring
codestring
messagestring
signaturestring