Ruling on inviting friends to a e-commerce app in return for points or discounts
Question

We are developing an e-commerce project consisting of an app and website. One of the features that we are currently working on adding to it is enabling the user of the app to invite someone else by sending an invite link with a code that is unique to the person who he wants to invite to the app. When the invited person uses the link, with the code, he will be able to subscribe to the app through this link. We want to give the person who sent the invitation a number of points, and through these points he will be able to obtain discounts on orders, based on the number of points. Is it permissible for us to do this? If, instead of points, we make the reward for this invitation a discount on a single order that the customer makes, and we state clearly the percentage of this discount, is that permissible? If all the ways mentioned above are prohibited, is there any other, Islamically-acceptable way in which we can reward this customer for inviting his friends? If we cancel the points and offer no reward for inviting others, is it permissible for us to do that?
Praise be to Allah.There is nothing wrong with the user of the app inviting his friends in return for commission, points or a discount, subject to two conditions:
The first condition:
That subscription to the app should be free. If subscription is in return for payment, then that is gambling, because he definitely loses the money that he pays in the hope of gaining more than that by inviting his friends, which is a gain that is merely possible. Gambling is certain loss for possible gain.
Al-Bujayrimi (may Allah have mercy on him) said: Gambling refers to when an action may lead to gain or loss. "(Hashiyat al-Bujayrimi ‘ala Sharh al-Minhaj  4/376).
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said: In the case of gambling – which is any transaction which may lead to loss or gain – the one who engages in that transaction does not know whether he will be a winner or a loser. All of that is haram and is in fact a major sin. It is no secret that it is reprehensible, when we realise that Allah, may He be exalted, has mentioned it alongside Idol worship, alcohol and divining arrows."(Fatawa Islamiyyah  4/441).
The second condition:
The commission should be known, because this comes under the heading of paying a fee for someone to do a certain job, the condition of which is that the fee should be known.
In al-Mawsu‘ah al-Fiqhiyyah (15/216) it says: Fees and stipulated conditions thereon:
The amount of the fee should be known:
The Malikis, Shafa‘is and Hanbalis said: In order for the hiring contract to be valid, it is stipulated that the fee should be a known amount of wealth, in terms of type and amount, because not knowing what you will receive undermines the purpose of the hiring contract, for hardly anyone would want to work when he does not know what fee he will receive. This is in addition to the fact that there is no reason for not mentioning it in the contract.
Finding out about what payment will be received may be done by seeing it or having a description of it. End quote.
In al-Ma‘ayir ash-Shar‘iyyah (p. 261), it says: It is stipulated that the payment should be known, it should be something that has value according to Islamic teachings, and it should be something that can be handed over. If the payment is unknown, or it is not permissible according to Islamic teachings, or it is not possible to hand it over, then the payment should be worked out according to the going rate for similar work. End quote.
Hence it is not valid to make the payment in the form of points which will lead to an unknown gift or an unknown discount. Rather it must be explained to the participant that the points are equal to such and such cash value, or that the discount will be of such and such an amount.
If you cancel the points, and inviting others will be done for free, as mentioned at the end of your question, this is also permissible, on condition that it is made clear, and that everyone who invites someone else knows that he is doing that voluntarily, and that there is no benefit for him in doing that.
And Allah knows best.