Any payment provider, credit partners from your server
Your server reports each signup and sale with your program API key, and Affitor finds the partner who referred the customer and writes the commission.
What you need
If you take payments with Stripe Checkout or Stripe subscriptions, Sell on Stripe needs no sale calls. With Stripe connected and your server reporting too, send each payment one way only: the same purchase sent both ways can count twice.
Steps
- GuideAdd the tracker to your site
It records the click when a visitor arrives through a partner link, and keeps the click id in the
affitor_click_idcookie on your domain. - GuideGet your program API key
Program settings › Developers › API keys, where an owner selects Generate. Keep the key on your server, never in the browser.
- GuideReport the signup
When the customer signs up, your server sends
POST /api/v1/track/leadwith theclick_idfrom the cookie and yourcustomer_key. Affitor saves the key on the customer of that click. - GuideReport each sale
After each payment, your server sends
POST /api/v1/track/salewith thecustomer_key(or theclick_id, for a buyer who never signed up),amount_centsand a uniquetransaction_id. Atransaction_idsent again is answered409and not counted twice. - GuideReport refunds
When you refund a payment, send its
transaction_idtoPOST /api/v1/track/refund, and Affitor reverses the commission. A partial refund reduces a commission already approved and cancels one stillpending(in its hold period, not yet approved). - GuideSend a test sale
Program settings › Payments › Send a test sale shows a call to run from your server. Put your own
transaction_idin it, or leave it out: an id that was already used gets409and records nothing. With"livemode": falseit records a test sale and no commission, and the Server API card reads Received.