AffiliateTally

How it works

From a referral link to a paid commission.

Connect Stripe, make one small change to your signup, and AffiliateTally does the rest: it attributes each subscriber, tallies every paid invoice, and hands you a payout list.

Connect Stripe

In AffiliateTally, go to Settings and connect the Stripe account your subscriptions bill through. You approve the connection on Stripe’s own screen. From then on, AffiliateTally reads your invoices, subscriptions, refunds and disputes as they happen.

AffiliateTally reads; it does not act.

Nothing in AffiliateTally creates a charge, refund, transfer or payout on your account. Read more on your money and your data.

Set your program

Decide what affiliates earn and when it becomes payable:

Commission
A percentage of what each referred customer pays.
Duration
The first payment only, a fixed number of months, or for life.
Hold window
How long commission waits before it can be paid, so refunds land first.
Minimum payout
Small balances roll over until they reach it.
Automatic upgrades
For example, 10 paying customers in 90 days moves an affiliate to better terms.
Custom terms
Give any individual affiliate their own rate or duration.

Then share your application link. Affiliates apply on a form branded with your company name; you approve each one, and each gets a referral link of the formyourapp.com/pricing?via=their-code. You choose the page the links point to in Settings.

Track referrals: the one change on your side

When someone arrives through an affiliate link, your app reads thevia value and, when they subscribe, saves it on the Stripe subscription’s metadata under the keyaffiliate_ref. That is the whole integration. Attribution becomes a permanent fact on the Stripe record instead of a cookie that had to survive checkout.

If you use Stripe Checkout

checkout.ts
// via = the code your app saved when the visitor arrivedconst session = await stripe.checkout.sessions.create({
  mode: 'subscription',
  line_items: [{ price: PRICE_ID, quantity: 1 }],
  subscription_data: {
    metadata: {affiliate_ref: via },
  },
  success_url, cancel_url,
});

If you create subscriptions yourself

subscribe.ts
await stripe.subscriptions.create({
  customer: customer.id,
  items: [{ price: PRICE_ID }],
  metadata: {affiliate_ref: via },
});

One-off payments

For a purchase with no subscription, AffiliateTally looks foraffiliate_ref on the payment (or invoice) first, then on the customer record, so you can tag a customer once at signup instead of tagging every order. Stripe only itemises tax on invoices and Checkout, so for a bare PaymentIntent you can addaffiliate_tax_centsto have the tax left out of the commission.

Why the subscription, and not each invoice?

Stripe copies the subscription’s metadata onto every invoice when it is finalised. AffiliateTally reads that frozen copy, so editing the subscription later can never rewrite who earned a commission that was already paid.

How commission is calculated

Invoice paid
$214.92
Sales tax on the invoice
−$15.92
Commission basis
$199.00
Commission at 20%
$39.80

Example

  • Paid invoices only. A subscription can be active and still unpaid. Commission accrues when an invoice is actually paid, never at signup, so free trials earn nothing until the first real payment.
  • Tax excluded. The basis is the invoice total minus its tax, so affiliates never earn a cut of tax you remit.
  • Frozen on the record. The charged amount, tax and basis are stored with each commission, so changing a program later never restates history.
  • Reversed on refunds and disputes. Refunds, partial refunds, disputes and voided invoices take commission back in proportion. If it was already paid, the reversal is offset against the next batch.
  • Counted once. Each invoice earns each affiliate exactly one commission, enforced by the database, however many times Stripe retries.
  • Nothing missed. A daily job re-reads the last 30 days of Stripe events and records anything not yet counted.

Approve and pay

When a commission’s hold window ends, it approves itself. An affiliate is included in the next payout batch once they have payout details and a tax form on file and their balance is over your minimum.

Export the batch

Download a CSV and upload it to the payout tool you already use.

Pay and mark paid

Pay each affiliate by Zelle, PayPal or bank transfer, then mark it paid. The record shows who marked it and when.

Either way, the money leaves your account, on your rail. AffiliateTally never holds it.

Ready to connect Stripe?

Set up your program and invite your first affiliates.