Getting Started
Refuel is embeddable affiliate infrastructure for any website. Add a single script tag and your visitors can generate affiliate links, share your product, and earn commissions — all without leaving your site.
What is Refuel?
Refuel provides the complete backend for running an affiliate program: link generation, click tracking, conversion attribution, fraud detection, and automated payouts via Stripe Connect. You embed a lightweight widget on your site and get a full dashboard to manage everything.
For Companies
One script tag to launch a full affiliate program. Set your commission rate and go.
For Affiliates
Zero-friction signup. Enter an email, get a link, start earning. No approval queues.
For Developers
REST API, webhook events, and platform SDKs. Build custom integrations in minutes.
5-Minute Quickstart
Sign up and register your company
Create your account by calling the registration endpoint or signing up through the dashboard. You will receive an API key (sk_...) and a publishable key (pk_...).
curl -X POST https://api.refuel.dev/companies/register \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Store",
"domain": "https://acme.com",
"email": "you@acme.com",
"commissionRate": 0.10
}'Set your commission rate
The commissionRate is a decimal between 0.01 and 1.0 (e.g. 0.10 = 10%). You can update it any time via the dashboard or the API.
curl -X PUT https://api.refuel.dev/companies/settings \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "commissionRate": 0.15 }'Embed the Refuel script
Add the following script tag to your site, right before the closing </body> tag. Replace the data-key value with your publishable key.
<script
src="https://sdk.refuel.dev/v1.js"
data-key="pk_your_publishable_key"
async
></script>Track conversions
When a purchase happens, send a conversion event from your backend. The SDK automatically tracks clicks and attributes them to the correct affiliate.
curl -X POST https://api.refuel.dev/track/conversion \
-H "x-api-key: sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"orderId": "order_12345",
"orderValue": 9999,
"currency": "USD",
"affiliateCode": "abc123"
}'