Upvote:1
It appears that you are applying from India. In this case you will pay the visa fee after submitting the DS-160 form, and before scheduling the appointment. Someone else can make the payment for you, but for the chosen payment method you need a unique number in order to continue to schedule the appointment.
The process is different if you are applying from some other country. In that case, check the US consulate web site for that country or ustraveldocs.com.