The Simple and very easy way to implement in-app through a library anjilab. Just add the dependecy
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
Add Permission, implement methods and you done.
Auto Sync....
Select Categories