Yes, you have to do the paperwork first and, in particular, pay the respective fees at the Banco de la Nacion (you may pay at ANY agency of the Banco de la Nacion ) prior to making the online appointment.
It was already like that last year.
Usually the employees of the Banco de la Nacion know the code when you tell them which type of tramite you have to do.
The reason is that you need the code on the payment receipt which you have to input into the online appointment system.
I may assume that you apply for the CE (carnet de extranjeria) as a foreigner married with a Peruvian citizen.
If this is right you will find all the information yuo need here:http://www.migraciones.gob.pe/index.php ... esidentes/
Look at the paragraph “Familiar residente”, in particular “e) Para el caso de casado (a) con peruano (a)”
This is the link for the online appointment:http://126.96.36.199/citasmigraciones/PA ... NICIO.aspx