There are two different questions hidden inside "How do I get a Tesla referral code?"
If you already own a qualifying Tesla product, your referral link is available in the Tesla app. If you are a first-time buyer, you do not create your own buyer code; you use a valid referral link from an eligible Tesla owner.
If you already own a Tesla
Open the Tesla app, tap the menu, select Refer and Earn, then use Refer Now to share your link.
If you are buying your first Tesla
Open the referral link before placing the order. Tesla tracks the referral through the purchase flow; there is no normal coupon-code box that you can fill in later.
The safest process is:
- open the referral link;
- sign in to Tesla;
- configure a qualifying product;
- check that Tesla displays the applicable benefit;
- submit the order.
Tesla explicitly states that referral links cannot be credited after the order has been placed.
Why some shared links stop producing benefits
Tesla limits how many order referrals an owner can receive. Once that limit is reached, a buyer can click the URL but fail to receive a buyer benefit.
That is why the order page itself should always be checked before payment.
Sources: Tesla Refer and Earn.