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.
| Stage | What you do | Where |
|---|---|---|
| 0. Setup | Gather env vars, onboarding parameters, DNS & email | Setup |
| 1. Deploy | Run the app and create the owner | Docker, Vercel or Cloudflare |
| 2. Company | Add your name, logo and partner agreement | Setup wizard, then Settings |
| 3. Stripe | Paste a restricted key; the webhook is created for you | Setup wizard, then Integrations → Stripe |
| 4. Program | Set the commission and an optional discount | Setup wizard, then Programs |
| 5. Tracking | Add the snippet and prove it works | Setup wizard, then Integrations → Tracking & links |
| 6. Payout channels | Optional: connect PayPal / Wise API or skip to manual CSV | Setup wizard, then Payouts → Payout channels |
| 7. Recruit & launch | Share the join link, invite people, connect to app.betterrewards.network | Setup wizard, then Partners & Network |
| 8. Pay | Review the batch, pay via API or CSV, settle | Payouts |
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.
| Docker | Vercel | Cloudflare | |
|---|---|---|---|
| Good for | Your own server; everything in one place | No server; deploys from GitHub | No server; runs on Cloudflare's network |
| Costs | A server (around USD 5 to 10 a month) | Hobby free (non-commercial); Pro for a business | Workers Paid, USD 5 a month |
| Database | Included | Neon (free tier to start) | Neon (free tier to start) |
| SMTP or Resend | SMTP or Resend | Cloudflare Email Service or Resend | |
| Guide | Deploy with Docker | Deploy on Vercel | Deploy 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.
| Resource | Permission | Why |
|---|---|---|
| Checkout Sessions, Invoices, Charges, Customers, Subscriptions, Disputes, Products, Prices, Balance Transaction Sources | Read | Amounts, attribution, renewals, refunds, disputes and your catalog |
| Webhook Endpoints, Event Destinations | Write (recommended) | betterrewards creates its webhook for you |
| Coupons, Promotion Codes | Write (optional) | Discounts for partners' audiences |
- 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.
- Without the Webhook Endpoints permission, add the endpoint yourself with the URL and events that page lists, and paste its signing secret there.
- Click Import products, so programs can pay only on the products you choose.
4. Publish a program
In Programs, create your first program:
| Field | What it decides |
|---|---|
| Join link | The address you share, such as /join/acme-pro. It cannot change later. |
| Commission | A percentage of revenue, or a flat amount per payment. |
| Pays on | First payment, a number of months, or every payment. |
| Hold period | Days before a commission becomes payable. 30 covers most refunds. |
| Attribution window | How long after a click a purchase still counts. |
| Customer discount | Optional. Each partner gets a Stripe promotion code. |
| Eligible products | Which products earn commission and get the discount. |
| Materials for partners | Talking 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.
7. Get recommended on the network
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.
- List your product on the network and verify your domain. You get a public product page in Discover once an operator approves your company.
- 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).
- 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
- 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).
- Open Payouts. The preview lists who is ready, how they want to be paid, and who is held back.
- Partners with no payout method stay out of the batch and are emailed to add one. Their balance waits for them.
- 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.
- 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.
- 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.