This repository contains script to test the VIALET incoming payment webhooks. webhooks.json file provides a list of example webhooks with payment status that will be sent one-by-one to the specified URL.
Repository includes:
- Examples of request body structure for incoming payment webhooks.
- Example of verification of the request signature in
x-api-signatureheader. Each webhook coming from VIALET is signed by RSA (type1) signature. - Basic validation schema for the incoming request body.
Before you start installing dependencies, make sure that you have:
"node": ">=20.6.0"
-
Change the
WEBHOOK_URLin the.envfile to the URL you want to test. -
Install the dependencies:
npm install- Run the script:
npm start- Check the output in the console and logs of the server that receives the webhooks.
- You can change the payload in the
webhooks.jsonfile to test different scenarios. Each webhook body is validated when test script is executed. If the validation fails, the script will log an error message.