For developers
Track any checkout in an afternoon.
A one-line script for the browser, a REST API and a postback URL for the server, and signed webhooks back to you. JSON in, JSON out, keys per workspace.
<!-- before </head> on every page -->
<script async src="https://affiloop.appsbtw.com/t.js" data-key="pk_live_xxxxxxxx"></script>
1. In the browser
The script reads ?ref= or ?via= from the address, stores a first-party cookie and exposes affiloop(). Call it after sign-up and on the thank-you page, or let a payment integration report the sale instead.
affiloop('lead', {
email: 'jane@acme.com',
customer_id: 'user_1842'
});
affiloop('convert', {
amount: 49.00,
currency: 'USD',
order_id: 'ORDER-1042',
email: 'jane@acme.com'
});
2. From your server
Send sales from your back end with the secret key. The same order id sent twice counts once, so retries are safe.
curl -X POST https://affiloop.appsbtw.com/api/v1/sales \ -H "Authorization: Bearer sk_live_xxxxxxxx" \ -d email=jane@acme.com \ -d amount=49.00 -d currency=USD \ -d order_id=ORDER-1042 -d recurring=1
Checkout builders that can only call a URL use the postback:
https://affiloop.appsbtw.com/t/postback?key=sk_live_xxxxxxxx
&event=sale&email={email}&amount={total}
¤cy=USD&order_id={order_id}
REST API v1
Endpoints
Authenticate with Authorization: Bearer and your workspace secret key. 120 requests a minute per key.
| POST | /api/v1/leads | Record a sign-up for a referred visitor |
| POST | /api/v1/sales | Record a sale or renewal; idempotent on order_id |
| POST | /api/v1/refunds | Refund a sale in full or in part |
| GET | /api/v1/affiliates | List affiliates with links and balances |
| POST | /api/v1/affiliates | Create an affiliate from your own sign-up flow |
| GET | /api/v1/referrals | List referred customers |
| GET | /api/v1/commissions | List commissions with status and amount |
| GET | /api/v1/coupons/{code} | Look up which affiliate owns a coupon |
Outgoing webhooks
commission.created, commission.approved, payout.paid, affiliate.approved and more, signed with HMAC SHA-256 and retried.
Payment webhooks
Stripe, Paddle, Lemon Squeezy, Chargebee, Paystack, Razorpay, Shopify, Gumroad and WooCommerce, each with its signature checked.
Idempotent
Every conversion is unique per provider and order id. Replays and retries never double a commission.
Two keys
A public key for the browser that can only report, and a secret key for the server you can rotate any time.
The full reference, with every field and response, ships in the documentation and inside the dashboard under Integrations → API & postback. See the integrations
Your next hundred customers are already talking about you.
Give them a link, a coupon and a reason. Set up a program in an afternoon and pay your first affiliates next month.
- Free trial, no card needed
- Import affiliates from a CSV
- Arabic and right-to-left included
- Cancel any time, export everything