Payment system in dynamic pages

You can use wix pay API to trigger custom payment process using code.

Have a look here. There is an example how to trigger payment on button click. You can store the price of the product in the database and connect to the dynamic page.