Skip to main content

Referrals

A paying Budget Thing customer has a referral code and link. A friend can apply that code to their own account. Applying a code only records the link between the two accounts. Whether either side receives account credit is decided later, on the friend's first qualifying payment.

OperationMethod and pathAuthentication
get-referralsGET /v1/referralsSigned-in user (browser session)
dismiss-referral-promptPOST /v1/referrals/prompts/{prompt}/dismissSigned-in user (browser session)
redeem-referral-codePOST /v1/referrals/redeemSigned-in user (browser session)

All three are interactive by design. A personal access token is refused with 403 Forbidden and the code PERSONAL_ACCESS_TOKEN_SCOPE_DENIED, whatever its scopes: a referral code, the account's referral credit and binding an account to a referrer belong to the account holder, in a signed-in session.

While referrals are not enabled​

The referral program is switched on per environment. While it is off, every endpoint on this page answers 404 Not Found, exactly like an unknown route, and nothing is read, created or recorded. The 404 comes before the session is checked, so a signed-out caller gets 404 too, not 401. (A personal access token is still refused with 403 first, as above.) A request that fails the schema checks in the tables below, such as limit=500, gets its 422 before the 404.

Get your referrals​

GET /v1/referrals?limit=20
Query parameterTypeNotes
limitinteger, optionalPage size, 1 to 100. Default 20.
cursorstring, optionalThe nextCursor of the previous page.

The response describes the signed-in user's own account, and nothing else. It is the same shape as other lists: a page of friends, newest first, and a nextCursor while there is more.

{
"eligible": true,
"code": "K7QW4MZP",
"link": "https://app.budgetthing.com/r/K7QW4MZP",
"rewardsEarned": 3,
"totalCreditApplied": { "amountMinor": 2500, "currency": "USD" },
"pendingCount": 1,
"friends": [
{
"status": "pending",
"signedUpAt": "2027-03-03T10:00:00Z",
"firstPaymentAt": "2027-03-10T10:00:00Z",
"unlocksAt": "2027-05-10T10:00:00Z"
},
{ "status": "signed_up", "signedUpAt": "2027-03-01T08:30:00Z" }
],
"nextCursor": "…",
"prompts": { "billingCard": true, "firstPaymentNotice": false }
}
FieldNotes
eligibletrue only for a billing account owner with an active paid subscription (not in a trial, canceled or unpaid). Anyone else, including a household member who doesn't pay, gets 200 with eligible: false, the counts at 0 and an empty friends list. code, link, totalCreditApplied, nextCursor and prompts are absent then.
code, linkThe account's referral code (random, not case-sensitive) and the link built on it. Created the first time an eligible account asks.
rewardsEarnedHow many referral rewards you have earned, all time. There is no limit.
totalCreditAppliedThe sum of your referral rewards added to your account balance, as amountMinor (minor units, cents for USD) and currency (ISO 4217, upper case). amountMinor is 0 before the first reward. Your friends' credits aren't included.
pendingCountFriends who paid and whose reward is waiting for the hold (see unlocksAt below).
friendsOne entry per referral. A status and dates only (below).
nextCursorPass it as cursor for the next page. Absent on the last page.
promptsWhich in-app prompts are due. First page only.

Friend statuses​

Each friend has status, signedUpAt and, depending on the status, up to three more dates. Nothing else is ever returned.

statusMeaningDates
signed_upThe friend applied your code and hasn't paid yet.signedUpAt
pendingThe friend paid. Your reward is waiting for the hold.signedUpAt, firstPaymentAt, unlocksAt
rewardedYour reward was added to your account balance.signedUpAt, firstPaymentAt, rewardedAt
not_eligibleNo reward will come from this referral.signedUpAt

unlocksAt is when the reward is expected: 60 days after an annual friend's first payment, or two months after a monthly friend's first payment (their third payment). If the friend cancels, is refunded or disputes first, the status becomes not_eligible.

not_eligible covers every way a referral ends without a reward, for example a canceled subscription, a refund, a dispute, a discount code, or a deleted account. The reason is never returned. The response never contains a friend's name, email, plan or amount, and never a fraud, refund or dispute reason.

Responses​

StatusMeaning
200The state above.
401No valid session.
403A personal access token (PERSONAL_ACCESS_TOKEN_SCOPE_DENIED).
404Referrals are not enabled. Nothing is created.
422VALIDATION_ERROR: limit is outside 1 to 100. VALIDATION_FAILED: cursor isn't one this endpoint returned.

Dismiss a prompt​

POST /v1/referrals/prompts/billing-card/dismiss

prompt is billing-card (the card on the billing page) or first-payment-notice (the one-time notice after a first full-price payment). The prompt is then off on every device. It returns 204 No Content, and doing it twice is fine. For an account that has no referral code yet there is nothing to dismiss, and it also returns 204.

StatusMeaning
204Dismissed, or already dismissed.
401No valid session.
403A personal access token (PERSONAL_ACCESS_TOKEN_SCOPE_DENIED).
404Referrals are not enabled. Nothing is recorded.
422VALIDATION_ERROR: prompt isn't one of the two values.

Apply a referral code​

POST /v1/referrals/redeem
Content-Type: application/json

{ "code": "Qx7-example-code" }
FieldTypeNotes
codestring, requiredThe code from a friend's link (/r/<code>) or typed by the user. Up to 64 characters. It isn't case-sensitive, and spaces around it are ignored.

When the code is applied​

{ "applied": true }

The response is 200 OK. It never contains the referrer's name, email, plan or any amount.

A code is applied only when both are true:

  • the account was created within the last 30 days, and
  • the account has no successful payment.

The first code applied to an account wins and can't be changed. Sending the same code again also returns 200 OK and changes nothing, so it is safe to retry.

When the code can't be used​

{
"title": "errors.api.referralCodeInvalid.title",
"titleEnglish": "Referral code invalid",
"status": 422,
"code": "REFERRAL_CODE_INVALID",
"detail": "errors.api.referralCodeInvalid.detail",
"detailEnglish": "That code can't be used. Check it, or continue without one.",
"errors": [
{"message": "referral_code_invalid", "location": "code"}
],
"details": {}
}

Every rejected code gets this same 422 Unprocessable Entity response: an unknown code, your own code, an account older than 30 days, an account that has already paid, and an account that already applied a different code. The response never says which one it was, so it can't be used to find out whether a code exists. Branch on code. See Errors for the shared error shape.

Other responses​

StatusMeaning
401No valid session.
403A personal access token (PERSONAL_ACCESS_TOKEN_SCOPE_DENIED).
404Referrals are not enabled. Nothing is recorded.
422VALIDATION_ERROR: code is missing or longer than 64 characters.

Contract​

These endpoints are new and don't change any existing endpoint. They only exist for clients that support referrals, so adding them is not a breaking change.