Extract merchant id from url

Change-Id: Ide09cbf2cec70b190795a79a29517f208e37fbc2