Connecting payment form to a dynamic page

Is there a way to connect a payment or order form to a dynamic page, so for exemple when customers order a specific item which is in a dynamic page, i can know which product or the dynamic item he filled the payment form on.

Hi,
You can add an event listener for a form completion on a dynamic page (e.g. click event to the purchase button or whatever button the customer needs to click to proceed) and save() the current item to a separate database.

You can do the same for the cart page by getting the current cart on backend.