Selling on Gumroad
Sales are credited by discount code.
A website with a contact form
Credit leads with a script and a JSON call.
Anything else
Credit a sale or deal by hand.
Selling on Gumroad (or any shop with discount codes)
A visitor’s browser cannot carry a cookie into Gumroad’s checkout, so sales there are credited by discount code.1
Add a coupon for the affiliate
On the affiliate’s page, add a coupon code, for example
MAYA20.2
Create the same code on Gumroad
On Gumroad’s Discounts page, create the same code with the discount buyers should get.
3
Copy your ping address
Under Integrations → Credit Gumroad sales, choose the program and copy the address it shows.
4
Paste it into Gumroad
In Gumroad, open Settings → Advanced and paste the address as the Ping address.
MAYA20, Maya is credited automatically. A refund reverses the commission if it has not been paid yet.
A sale without the code cannot be credited, because the checkout carries no cookie. Give each affiliate their code to share together with their link.
A website with a contact form (leads)
Use this for services and anything you close by hand: the visitor fills in a form, and you decide later whether it became a client.1
Add the script to every page
?ref= code in a cookie, and fills any form field named affiliate_ref for you.2
Report the lead from your server
When the form is sent, your website’s server reports the lead. Never do this from the visitor’s browser: the token is a secret.
3
Mark it won
When you win the client, open Referrals, enter the deal value next to the lead and press Won. The commission is earned then, and held for the hold period.
external_id twice credits only once, so retries are safe. To report a finished sale instead, use "type":"sale" and an "amount". Every field is described in the API reference.
Anything else
Credit a sale or deal yourself under Referrals → Credit a referral by hand: choose the affiliate, Sale or Lead, enter the amount and press Credit referral.The API token
Integrations → API token shows the bearer token your website uses. You can replace it at any time; whatever used the old one must be updated, because it stops working immediately. Treat it like a password.How a referral is recorded
Every route above ends in the same place, which applies the same rules:- Only an approved affiliate in an active program earns. Anyone else’s referral is refused.
- A referral is recorded once: the same
external_idis never credited twice. - A purchase made by the affiliate themselves is recorded but earns nothing.
- A sale earns its commission straight away and holds it for the hold period. A lead earns only when you mark it won.
- A refund reverses a commission that has not been paid. A refund after payment is marked with a note, and recovering that money is up to you.
- Suspicious referrals are flagged for review. See Reports and fraud checks.