In main.js you can see how to initialize the widget and how to handle the responses. To test, edit main.js and replace the following lines with your own values.
const apiKey = "{your-api-key}";
const userId = "{your-user-id}";apiKey and vendorId are supplied by GrailPay. userId is the UUID of a user you have created using the register/person API endpoint.