Any way to know who referred a patron?

We are 2 partners that want to create a digital product that is subscription based.
Ideally, we would want to create 2 “referra links” and monitor the subscriptions to the product based on who referred the patron and split the profits accordingly.
Is there a way to do it?
If not, do you have any creative ideas to use patreon and still be able to do similar things? (I have no problem with writing code and using the API if needed, the only question is whether it’s possible…

Thank you!