Payment from variable amount

If you want to do multiple products, then you are better off doing something like this tutorial here.
https://support.wix.com/en/article/corvid-tutorial-using-the-corvid-pay-api-to-collect-payments-for-products-in-a-database-collection

Or again go through it by using one of Nayeli’s examples here.
https://support.totallycodable.com/en/article/setting-up-wix-pay-api-using-wix-code