How we match partner with an order?
From highest to lowest priority:
4. Referral link
5. Order note attributes - you can add an attribute called "gh_partner_id" with a partner id as the value.
A customer opens a referral link from one partner, but types in a discount code that belongs to a different partner. The order will display as referred by a partner whose code was used.