AffiliateRail docs
Getting started

Quickstart

From an empty account to an attributed test-mode sale, using nothing but this page.

By the end of this page you will have a program with the tracking script installed and verified, Stripe connected in test mode, yourself added as the first partner, and one test-mode sale attributed to your own link. Budget about fifteen minutes.

Create your program

Sign up at app.affiliaterail.com/signup. You confirm your email with a code, set a password, then name the program: product name, website URL and currency. The currency is fixed once the program has money in it, so pick the one you charge in.

Your first dashboard arrives already populated with sample data so you can see what a running program looks like. Sample rows are clearly marked and deleting them later is one click. The trial runs fourteen days with the Grow plan's features, the API and MCP included.

Put the script on your site

Add one tag to your marketing site, ideally in the <head> of every page:

<script async src="https://app.affiliaterail.com/rail/v1/rail.js" data-rail="prg_xxxx"></script>

Your data-rail value is your program id; the dashboard shows the exact tag ready to copy under Settings, Integrations. The script is under 5 KB, loads asynchronously, and does one job: when a visitor arrives on a partner link such as yoursite.com/?ref=alice, it records the click and remembers the referral in a first-party cookie.

If your app lives on a different registrable domain than your marketing site (say getacme.io next to acme.com), list it in the tag's data-domains attribute so the referral survives the crossing.

Prove the install works

In the dashboard, open Insights, then Attribution health, and choose Check my install. The check fetches your page, confirms the tag is present with your program id, drives a real test click through the same endpoint your visitors will use, and tells you which domain the referral cookie lands on. Each line comes back as a pass or a failure with the fix spelled out.

The test click and everything it created are deleted when the check finishes, so your reports stay clean.

Connect Stripe in test mode

From Getting started choose Connect Stripe, and pick your test-mode account. The connection is read-only: we see checkouts and invoices so we can attribute sales, and we structurally cannot touch your money or write to your Stripe account.

Test mode behaves identically to live. The event shapes are the same, so everything you prove now holds when you switch to the live account.

Add yourself as a partner

On the Getting started page, choose Add yourself as a partner, or open Partners and add your own email. You are active immediately with a working link in the form yoursite.com/?ref=your-handle.

Make a test sale

Open your site through your own link, then run a checkout with Stripe's test card (4242 4242 4242 4242, any future expiry, any CVC).

  • If you sell through Stripe Checkout, a Payment Link, a Pricing Table or a Buy Button, there is nothing else to wire: the script stamps the checkout for you.
  • If you build subscriptions server-side with Stripe Elements, pass the referral as one metadata field when you create the customer. Server-side attribution shows the three lines in Node, Next.js and Python.

When Stripe reports the payment, the sale appears under Insights, Attribution health with the path that attributed it, and a commission appears under Commissions, produced by your default flow. Click through to the commission and it will tell you exactly which flow and branch priced it.

Where to go next

  • Concepts explains the objects you just created.
  • Commission flows is where the default rate becomes your actual commission structure.
  • Payouts connects your PayPal or Wise account for when real money is owed.
  • The partner portal is what your partners see; put your logo on it before you invite anyone.