how can create a dynamic form in wordpress?

my wordpress website have some price table , each column of this price table has a buy button with link like this
each link has a diffrent id number and each id point to a product for example
id=8 point to product A and
id=20 point to product B
i want build a page and on this page create a form.
this form fields should be change by id number in url
and form can connect to payment service like paypal or other.
İ don’t want use woocommerce plugin
how can i create this??