improved error handling in case of missing merchant id