Supaffi

Set up/Test your setup

Test your setup

Run a referral from click to commission before you invite real affiliates.

Before you invite affiliates, follow one referral from click to commission yourself. It takes a few minutes and proves the script, the checkout and Stripe all work together.

Choose how to test

A product is connected to one Stripe mode, test or live, and there is no switch between them. Pick one of two ways to make a sale without losing money.

Add a second product connected to Stripe test mode, and pay with a test card. Nothing is charged.

  • It needs its own website, such as a staging copy at staging.yourapp.com. A second product on yourapp.com is refused, because affiliates.yourapp.com already belongs to your live product. Supaffi then proposes affiliates.staging.yourapp.com, with its own DNS record.
  • Before you press Create the key in Stripe, switch Stripe to test mode or a sandbox. The key you paste must start with rk_test_.
  • The staging site needs the test product's script tag and the checkout change, with your Stripe test keys.

Either way, see Add a product and the rest of this section for the setup itself.

Run a test referral

  1. Sign up as an affiliate

    Open the product's signup link and join with an email you will not buy with. Note your code.

  2. Open your affiliate link in a private window

    A fresh window starts with no earlier referral:

    Affiliate link
    https://yourapp.com/?via=your-code

    In the browser's developer tools, your site should now have a __supaffi_referral cookie.

  3. Buy from the same window

    Go through your normal checkout with a different email from the affiliate's. In test mode, use Stripe's test card 4242 4242 4242 4242 with any future date and any CVC.

  4. Look for the commission

    Open Commissions in Supaffi. The sale shows up as soon as Stripe reports it, usually within seconds.

supaffi.yourserver.com/dashboard
Commissions
Test affiliate
26 Oct · $29.00 sale
Pending$5.80
A test sale on the Commissions page: Pending until its hold ends.

What to check

WhereWhat you should see
TrackingScript reads Live, Last click shows today, and First sale shows a date after the purchase.
Settings, ConnectionsConnected to Stripe and Receiving events from Stripe.
OverviewA Tracking is working banner after the first referred sale.
CommissionsA row for your test affiliate, status Pending, payable once the program's hold is over.

Open the commission to check the details:

  • Sale links to the payment or invoice in Stripe.
  • Click and Link show your test click and code.
  • The amount is the program's rate applied to the price after discounts, before tax.

To finish, refund the payment in full in Stripe. The commission is voided and its detail reads Refunded in Stripe with the date. On the live product, this step is what keeps the test free.

If nothing shows up

SymptomCheck
Script reads Not foundThe tag is in the <head> of your home page. Press Check the site again.
Last click stays on None yetThe page you opened has the script, the link has ?via= with a live code of this product, and the cookie is in your browser.
Waiting for the first event from StripeThe sale was made in the other Stripe mode or on another Stripe account, or the endpoint was disabled or deleted in Stripe. See The webhook endpoint.
The sale is in Stripe, but no commissionIn Stripe, open the Checkout Session and look for supaffi_referral in its metadata. If it is missing, the checkout code did not get the cookie. See Checkout Sessions.