How to implement IAP in Unity?

I’ve tried using a two plugins for iap purchases on Android, however I always get an error ‘Unable to convert java to dex’. Please tell me how to integrate in-app purchase in my Android game for free?

That’s an error coming from duplicated files. Check for duplicated files, maybe “support” files.

I just dealt with this in my game.
It’s because you have duplicate files in the plugins folder.

I was using an admob plugin for Unity. It was interfering with my iap, therefore I deleted the iap purchases.jar from the admob folder and it works fine now.