Payment and no payment conditional logic

Hi,

I´m using stripe with checkout, because the pdf which is being genereated must be delayed after payment.

our problem: the payment and pdf generating should only work if 2 field are being used.

Example: X1: name of company and X2: name of second company. (they are listed)
If both is being selected, then the pdf and payment should be working

If not, the customers can use a second field with writing themselves the names of the company
Y1.: name of company self written and Y2: name of company self written
in second point the pdf is not being generated but we get the form with all data. Here we want to inform the customer manually about the possibilites.

Thanks for your help!

Best regards,
Daniel