Only allowing referrals for a customer's 1st purchase is a great way to protect your store's margins. Here's how to do it:
First, head over to the Programs tab on your merchant dashboard and click on the program you wish to configure.
Click on the Advanced Settings tab in the program builder.
Under Discount codes apply to section, select Specific Customer Segments.
Choose Customers who haven't purchased from the drop-down list in the Customer Segments field.
Once ready to go live, hit the Save & Exit button.
Now, discount codes generated for affiliates in this program will only be eligible for new customers.