Menu

Webhooks

Webhooks Object

Copied!
{
        "merchantId" : "c673e5e13-df89-34e5-a6f3-7584903d4f34",
        "notificationEventType" : "ORDER_STATE_CHANGE", 
        "adminCode" : "MERCHANT_ADMIN_CODE",
        "merchantCode" : "MERCHANT_CODE", 
        "orderCode" : "worldpay-order-code", 
        "paymentStatus" : "SUCCESS", 
        "environment" : "LIVE"
}

When we send you a webhook notification, it will be a POST request to the URL you setup in the webhook.

merchantIdString
Identifier that is unique for this merchant
notificationEventTypeString
The event type that has triggered this notification
adminCodeString
A WorldPay generated unique code for the merchant.
merchantCodeString
A WorldPay generated unique code for the merchant.
orderCodeString
A WorldPay generated unique code for the order. This order code will be referred to in all reports. When triggering a test notification in the Worldpay UI, this will be a random identifier prefixed by "dummy_".
paymentStatusString
The current status of the Order.
environmentString
Indicates whether the Order was created in TEST or LIVE. When triggering a test notification in the Worldpay UI, this will be set to TEST.

Handling webhooks

You need to return an HTTP 200 response to this request to confirm you have received the notification. If anything other than an HTTP 200 response is returned, then we will retry the notification. Note that the body of the response is ignored. We will retry these notifications for up to 24 hours. If no 200 response is returned in that time, then the notification is abandoned.