I am looking to develop an iOS app (most likely using Swift) and want to be able to find a way for local (bricks and mortar) shops to refer customers to buy the app themselves via their app store.
However I want to provide an incentive for the shop owners, for example a discount code so that the customer provides it when buying the app so that I can attribute sales figures to each 'shop owner' and pay them their share for the referral.
For example: John walks into a shop selling gifts. Sarah tells John about the app and encourages him to buy it on his phone via the App store. She provides him with a code 'sarahsshop' [and this could provide a discount?]. John searches for the app on his iPhone and select's download he then enters the code 'sarahsshop' and purchases the app [at a discount?]. I can then login to my developer account at the end of the month and see that there are 50 sales using the code 'sarahsshop' and can pay Sarah accordingly.
Does anyone know of a way to do this?