The Referral Program is an open source program by Jupiter to provide referral fees for integrators who are integrating Jupiter Swap and Jupiter Limit Order. You can check out the code here and how it works.
You can manage your Referral Account on
https://referral.jup.ag/ (currently only working for Jupiter related accounts).
Deriving the Fee Token Account
feeAccount is a PDA based on the referral account you have created with the dashboard above. Here is an example code on how to derive it:
const [feeAccount] = await PublicKey.findProgramAddressSync(
referralAccountPubkey.toBuffer(), // your referral account public key
mint.toBuffer(), // the token mint
new PublicKey("REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3") // the Referral Program
When passing in the fee token account, please make sure that the fee token account exists.