How to implement referral code in ionic Mobile Apps while downloading from store

i am try to implement refer app and earn point or money like GooglePay And PhonePay

my point is how to implement in ionic 4 app