The filter ptrn/patron_link allows you to filter the link that is used to send users to Patreon to unlock content.
You can receive this link, and then decode state vars out of the link, add your own variables, replace in the state vars in their new state, and then whatever you added to state var will be returned from Patreon to your site when the user returns.
So basically you can use this to send a parameter carrying affiliate id or other information to Patreon and take it back. But it wont persist: If the user just stops the process, and then goes to Patreon and directly signs up manually, the variable wont be there.
So it may be better to put a cookie.