Environment variables
Exactly which environment variables each Referalli package reads, which pre-rename names still work and until when, and which names are only conventions in our examples.
Referalli's packages read only the environment variables below. Every other name you see in our examples (REFERALLI_WEBHOOK_SECRET, REFERALLI_BILLING_SECRET, REFERALLI_PROGRAM_ID in your app, …) is a convention: your code reads it and passes the value in, so you can call it anything.
What each package reads
Package | Reads | Meaning |
|---|---|---|
CLI ( |
| Use this key instead of the saved login. |
| API base URL (default | |
| Where the login is saved (default | |
| Only to find the default config directory. | |
| The default for | |
|
| |
Server SDK ( |
| The default |
| The default | |
Next.js ( | none directly | Its server helpers ( |
React ( | none | Everything is a prop: the tracking token, the widget token, consent. A |
Express ( | none |
|
MCP server ( |
| The key (or partner token) and the API base URL. |
The other server SDKs (Python, Ruby, Go, PHP, Swift, Kotlin) read nothing from the environment: pass the key to the client.
Names from before the rename
Only the CLI ever read REFERALLY_* names. It still reads these when the new name isn't set, with a notice on stderr, until 2027-03-31:
Old name | New name |
|---|---|
|
|
|
|
|
|
|
|
|
|
Any other REFERALLY_* name in your project (REFERALLY_BILLING_SECRET, REFERALLY_PROGRAM_ID, REFERALLY_WEBHOOK_SECRET, …) is your own: nothing of ours reads it, so nothing breaks on any date. Rename it when convenient. referalli doctor --scan warns only on the five names above and lists the rest as ℹ info, so --strict passes once those five are renamed. All other old names and their dates are under Renamed from Referally.