Skip to main content
Everything on this page is under Integrations in the app, with your own address and token already filled in. Choose the route that matches how you sell.

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.
When a buyer uses MAYA20, Maya is credited automatically. A refund reverses the commission if it has not been paid yet.
Gumroad allows one ping address per account. If another system already uses it, that system has to pass each ping on to this address.
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

It remembers the ?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.
Sending the same 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_id is 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.