Initial merchant handling code.