Test a webhook notification

POST {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test

Sends sample notifications to test if the webhook is set up correctly. We send four test notifications for each event code you choose. They cover success and failure scenarios for the hard-coded currencies EUR and GBP, regardless of the currencies configured in the merchant accounts. For custom notifications, we only send the specified custom notification. The response describes the result of the test. The status field tells you if the test was successful or not. You can use the other fields to troubleshoot unsuccessful tests. To make this request, your API credential must have the following roles: * Management API—Webhooks read and write

Request Body

{"notification"=>{"paymentMethod"=>"visa", "eventCode"=>"AUTHORISATION", "amount"=>{"currency"=>"EUR", "value"=>1000}, "reason"=>"Authorize visa payment", "success"=>true}, "types"=>["CUSTOM"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"data":[{"merchantId":"YOUR_MERCHANT_ACCOUNT","output":"","requestSent":"{\"live\":\"false\",\"notificationItems\":[{\"NotificationRequestItem\":{\"amount\":{\"currency\":\"EUR\",\"value\":100},\"eventCode\":\"AUTHORISATION\",\"eventDate\":\"2022-05-10T17:02:03+02:00\",\"merchantAccountCode\":\"YOUR_MERCHANT_ACCOUNT\",\"merchantReference\":\"4TZLD23Y\",\"operations\":[\"CANCEL\",\"CAPTURE\",\"REFUND\"],\"paymentMethod\":\"visa\",\"pspReference\":\"E05WW50L6IOBRGA0\",\"reason\":\"\",\"success\":\"true\"}}]}","responseCode":"200","responseTime":"532 ms","status":"success"}]}