How can I create a payment form with multiple selectable fields?

Hi, I want to create a form that gives the possibility to include more than one item (for example insurance). I tried in all ways, but each time either the form was submitted but the payment was incorrect, or the payment was made but the form did not reach the server. How can I go about creating a working one from scratch?