Docs
A private test program
Optional: rehearse a whole referral, from a partner link to a refund, in a private copy of your program that nobody else can reach.
Your program runs in production from the start, and you don’t need a test program to go live. If you want to rehearse first, make a private test program: a copy of your program’s settings, groups and rules that takes only test payments, never pays anyone and never touches the live program.
A test program is private. Its partner page is kept out of search engines, strangers who open it see that it is private and can’t join, and only partners your team invites can sign in. Agents reach it only when they ask for it with test_program: true.
Make the test program
Open Settings → Test program and choose Make a test program. You are now in it; a bar across the top says so and takes you back to live. The header links to it from then on.
Point your staging site at it
Add
data-affiligato-testto the script tag on your staging site, or passtest: trueto the tracking package. Clicks and signups then go to the test program. On your own machine (localhost, 127.0.0.1,.localhostand.testhosts) the tag sends nothing to your live program without it; it says in the browser console what it would have sent.Connect your billing's test mode
In Stripe’s test mode, add a webhook endpoint with the same URL and events as your live one, then paste its signing secret into Integrations → Stripe while you are in the test program. Events with
livemode: falsecredit the test program. For Paddle use your sandbox, for Chargebee your test site, each with the credentials you create there.Or use a test API key
Create an API key while you are in the test program. Signups, sales and refunds sent with it through the Conversions API are recorded in the test program.
A full run
- Invite yourself as a partner in the test program, with an email of your own, and open your referral link.
- Sign up on your staging site, so the signup is reported with the click.
- Pay with Stripe’s test card
4242 4242 4242 4242. The payment appears under Transactions and the partner’s commission under Commissions, held for your hold period. - Refund the payment in Stripe. The commission is taken back.
Payouts are refused for a test program. Reset test data, under Settings → Test program, deletes the test program’s clicks, customers, transactions and commissions and keeps its settings, so you can run again.
Testing on the live program instead
Many teams skip the test program: they make one small real purchase through a partner link, with a coupon that takes 99% off so the payment is not zero, check the commission, and refund it, which takes the commission back.
Going live
There is nothing to switch. Remove data-affiligato-test from your production build, and use your live webhook’s signing secret and a key made in the live program. Nothing from the test program carries over.