event.js works fine for me(but not events.jsw), but I’m not able to call any other web module from there and not sure how secure it is mentioning the code inside javascript file, as it will get exposed to the client (please correct if otherwise).
Yes it is a typo error as it should be in the events.js backend file and not in a events.jsw backend file.
It is correctly stated in the API Reference. Examples
An event fired when a payment transaction status is changed
// Place this code in the events.js file
// of your site's Backend section.
export function wixPay_onPaymentUpdate(event) {
let paymentId = event.payment.id;
let newTransactionStatus = event.status;
}