Passing a variable to a backend page

Back-End-Code:

export async function createMyPayment(productId, VARIABLE) {
    return wixData.query(VARIABLE)
    .find()
    .then((product) => {
 let paymentInfo = ({
            items: [{
                name: 'The Cool Product:<br>  Serial Key:<br> ' + product.items[0].serialKey + '<br>Password:<br>' + product.items[0].password,
                price: 1
            }],
        amount: 1
        });
    return wixPay.createPayment(paymentInfo);
    });
}

Front-End-Code:

//Front-End-Code
import {createMyPayment} from 'backend/nameOfBackEndModul.JSWhere'

$w.onReady(()=>{
 let VARIABLE = "CollectionNameHere"
    createMyPayment(VARIABLE)
})

But you should ask your question in the VELO-FORUM instead here.