Work with events in background

Hey, I am starting working with corvid, and I tryed to add javascript function in the backend(fetch function to my external api) when i have an order in my store.

I Work with the onOrderPaid event, I putted it as backend folder in jsw file and imported it to the main site code, but it seem that the function don’t get the event details,
The function starts when i do a test order, but in the site monitoring i see that the function cannot read the event properties and get it as udinfined. Anyone know how to solve it?

my code(the part that not work):

import { fetch } from ‘wix-fetch’ ;
import wixStores from ‘wix-stores-backend’ ;

export function onOrderPaid(event) {
console.log( “AA22” );
console.log(event);
let num=event.number;
console.log(num);
}

And i want ask another question, in backend function, should i do import to the library like wix-stores in the jsw file? in the main site file? maybe i dont need to import?
and should i import the backend function in the main site or it is work automaticly?