BetterRewardsDocs
Open app
Browse guides

Getting started: product owners

From a fresh deployment to your first partner payout: install betterrewards, publish a program, recruit partners and pay them.

8 min read · For companies

betterrewards is open-source software you run yourself. It tracks referrals, reads payments from your own Stripe account, calculates commissions and tells you whom to pay. Money never passes through betterrewards or this website: you pay partners yourself.

StageWhat you doWhere
0. SetupGather env vars, onboarding parameters, DNS & emailSetup
1. DeployRun the app and create the ownerDocker, Vercel or Cloudflare
2. CompanyAdd your name, logo and partner agreementSetup wizard, then Settings
3. StripePaste a restricted key; the webhook is created for youSetup wizard, then Integrations → Stripe
4. ProgramSet the commission and an optional discountSetup wizard, then Programs
5. TrackingAdd the snippet and prove it worksSetup wizard, then Integrations → Tracking & links
6. Payout channelsOptional: connect PayPal / Wise API or skip to manual CSVSetup wizard, then Payouts → Payout channels
7. Recruit & launchShare the join link, invite people, connect to app.betterrewards.networkSetup wizard, then Partners & Network
8. PayReview the batch, pay via API or CSV, settlePayouts

Before deploying, review Setup to prepare your environment variables, onboarding details, DNS, email, and payout accounts. Your first sign-in opens a 6-step setup wizard for stages 2 to 7, and you can leave it and come back at any time.

1. Deploy betterrewards

betterrewards runs in one of three places. All three run the same code on the same database schema, so you can move later. Each has its own step-by-step guide under Deploy.

DockerVercelCloudflare
Good forYour own server; everything in one placeNo server; deploys from GitHubNo server; runs on Cloudflare's network
CostsA server (around USD 5 to 10 a month)Hobby free (non-commercial); Pro for a businessWorkers Paid, USD 5 a month
DatabaseIncludedNeon (free tier to start)Neon (free tier to start)
EmailSMTP or ResendSMTP or ResendCloudflare Email Service or Resend
GuideDeploy with DockerDeploy on VercelDeploy on Cloudflare

Vercel and Cloudflare also have a one-click Deploy button. Every option ends the same way: you sign in with the email you made the owner (with create-owner, or OWNER_EMAIL on the one-click deploys). Everyone else who signs in gets a partner account. To share the work, add teammates as admins under Settings → Team: they run programs, partners and payouts, while Stripe, settings and the team stay with the owner.

Not sure? Try it with Docker on your own computer first: Deploy with Docker starts with a local trial that needs no domain, email provider or Stripe account.

2. Tell partners who you are

In the setup wizard's first step (later under Settings), fill in what partners see when they decide whether to promote you:

  • Business name, website and logo: your instance becomes your program. They appear on the sign-in page, the join page, the portal and the browser tab, and every email partners get comes from your name with your logo. Use a square PNG or JPG of at least 80×80 pixels: most email apps do not show SVG.
  • About your company: a few sentences on the join page.
  • Partner agreement: optional. When set, applicants must accept it, and the date and version are recorded on each partner.
  • Minimum payout: per currency, in normal amounts, such as usd=50. Smaller balances carry over.
  • Payout day: a day of the month. Partners see the next date, and a batch is prepared for you that day.

3. Connect Stripe

In the setup wizard's Stripe step (later: Integrations → Stripe), click Create restricted key in Stripe (or Create test-mode key) to open Stripe's form with the required permissions pre-selected. Connect Stripe has screenshots and fallback steps if you create the webhook yourself.

ResourcePermissionWhy
Checkout Sessions, Invoices, Charges, Customers, Subscriptions, Disputes, Products, Prices, Balance Transaction SourcesReadAmounts, attribution, renewals, refunds, disputes and your catalog
Webhook Endpoints, Event DestinationsWrite (recommended)betterrewards creates its webhook for you
Coupons, Promotion CodesWrite (optional)Discounts for partners' audiences
  1. Paste the restricted key (rk_live_… or rk_test_…) into the form. betterrewards checks its permissions, stores it encrypted and creates the webhook endpoint in Stripe. No restart, no redeploy.
  2. Without the Webhook Endpoints permission, add the endpoint yourself with the URL and events that page lists, and paste its signing secret there.
  3. Click Import products, so programs can pay only on the products you choose.

4. Publish a program

In Programs, create your first program:

FieldWhat it decides
Join linkThe address you share, such as /join/acme-pro. It cannot change later.
CommissionA percentage of revenue, or a flat amount per payment.
Pays onFirst payment, a number of months, or every payment.
Hold periodDays before a commission becomes payable. 30 covers most refunds.
Attribution windowHow long after a click a purchase still counts.
Customer discountOptional. Each partner gets a Stripe promotion code.
Eligible productsWhich products earn commission and get the discount.
Materials for partnersTalking points, assets and claims to avoid.

Stripe coupons cannot be edited, so a program's discount and products are fixed once it has a discount. Later changes to the commission apply to later payments only.

5. Install tracking

This is the step that makes everything else work. Integrations → Tracking & links shows the code with your real address filled in. Install tracking has the details, including a marketing site on www with the product on app, and a page for each framework: Next.js, TanStack Start, React Router, Nuxt, SvelteKit, Astro, Express and Hono.

Add the snippet to every page where visitors can land:

<script async src="https://rewards.example.com/v1/br.js"></script>

Then pass the click to Stripe when you create the checkout, so the sale and its renewals are credited to the right partner:

const clickId = cookies.get("br_click"); // set by the snippet

await stripe.checkout.sessions.create({
  mode: "subscription",
  customer,
  line_items,
  success_url,
  client_reference_id: clickId ?? undefined,
  subscription_data: { metadata: clickId ? { br_click_id: clickId } : {} },
});

If you create Stripe customers at signup, add metadata: { br_click_id: clickId } there too. Finally, click Open test page in Integrations → Tracking & links. Your page reports back and the status turns to Working. The test records no click.

6. Recruit partners

  • Share the join link. It shows your company, the full terms, and a preview when posted on social media.
  • Invite people: Partners → Invite. Paste one email per line, or Name, email. They get the join link and apply as usual.
  • Add a partner directly when you already have an agreement with them.
  • List on the network to reach partners you do not know yet (see below).

Each application shows the person's note and the code they asked for. Approve it and they get an email with their link and discount code. If you reject it, you can add a reason, which they will see. Turn on automatic approval in Settings if you prefer to review afterwards.

The network at betterrewards.network is free and optional. Connected programs appear in a public directory, where partners across the platform discover them and apply with one profile.

  1. List your product on the network and verify your domain. You get a public product page in Discover once an operator approves your company.
  2. Open Integrations → Network in your instance and click Connect to betterrewards.network. Your instance generates its signing key automatically (or set NETWORK_PRIVATE_KEY in your environment for IaC setups).
  3. Tick the programs to list. Applications then arrive in Integrations → Network, with each applicant's channels and reputation.

Only program terms and daily aggregate counts leave your instance. Customer data and payouts never do. See Connect your betterrewards instance for details.

8. Watch it work

  • Analytics: clicks, customers and commission by time range, program, partner, traffic source and channel tag.
  • Conversions: every credited sale and what was sold.
  • Audit log: who changed what, including purchases blocked as self-referrals.

A partner who buys through their own link or code earns nothing on that purchase. betterrewards compares the customer's email with the partner's, ignoring case, +tags and Gmail dots. For anything it cannot catch, void the commission in Commissions before paying it.

9. Pay your partners

  1. Optional: connect PayPal Payouts API and/or Wise Business API during onboarding (Step 5: Payouts) or under Payouts → Payout channels (owner only). Partners automatically see only the payout methods your enabled channels support (Wise enables local bank cards without a Wise account, Wise email, and Alipay CNY; PayPal enables PayPal).
  2. Open Payouts. The preview lists who is ready, how they want to be paid, and who is held back.
  3. Partners with no payout method stay out of the batch and are emailed to add one. Their balance waits for them.
  4. Create the batch (or let your payout day prepare it). Either send directly with Pay via PayPal / Pay via Wise (with two-step confirmation, automatic webhook & sync reconciliation) or download the CSV / PayPal file and pay by hand.
  5. Once confirmed paid (automatically via API webhook/sync or marked paid manually), partners get an email and a printable statement, and your outbound webhook endpoints receive payout.confirmed.
  6. If a transfer fails or bounces back, its commissions return to the partner's payable balance and they are emailed the reason.

Refunds during the hold period reduce the commission. After a commission is approved, refunds no longer change it. Choose a hold period that covers your refund window.

When a program ends

Archive it, or set an end date. It stops taking new customers, links show an ended page, Stripe codes turn off, it leaves the directory and partners are emailed. Customers already referred keep earning. You can restore a program later, and its codes turn back on.