I need to know where to get the licensekey and productld and merchantld
Your title is confusing as your post doesn’t relate to that. Also, licenseKey, merchantId and productId are all of the things you get from the Google Play Developer Dashboard. If you don’t have an account yet, you have to pay 25$ fee for opening a Google Play Developer Account.
I already have an account, you can specify where to go in. I do not know where to find these details
Google Play Console > Settings > Payment settings
see chapter Preparation for your own app here