Put Affiliate Drops inside your product
Give your users the full Affiliate Drops flow without leaving your app: campaign economics, the Founding Drop application, affiliate signup and private campaign briefs. Your product can prefill what it already knows, listen for results, and call the same capabilities from your server.
Partner keys are issued by our team. Email support@thinqcorp.com with your product name and the domains you will embed on.
1. Install the widget
Paste where the widget should appear. It renders in an isolated frame and resizes to fit.
<script src="https://affiliatedrops.marketing/embed.js"
data-key="pk_your_widget_key"
data-view="launch"></script>2. Views
launch- economics calculator, then the Founding Drop application.calculator- calculator only.apply-brand- five-step Founding Drop application.apply-affiliate- affiliate application.campaign- private campaign brief and claim. Needsslugandtoken.
3. Mount from JavaScript, prefill and theme
<div id="drops"></div>
<script src="https://affiliatedrops.marketing/embed.js"></script>
<script>
const widget = AffiliateDrops.mount({
key: "pk_your_widget_key",
target: "#drops",
view: "apply-brand",
prefill: {
email: currentUser.email,
first_name: currentUser.firstName,
company: account.name,
product_url: account.website,
tracking_platform: "Rewardful",
avg_first_year_revenue: 1200
},
theme: { accent: "#0f766e", radius: 8, mode: "light" }
});
</script>Prefill accepts any application field name with a string, number or boolean value. Users can still edit every field.
4. Listen for results
AffiliateDrops.on("application_submitted", (data) => {
// { type: "brand" | "affiliate", id, tier? }
analytics.track("affiliate_drops_applied", data);
});
AffiliateDrops.on("calculator_complete", (d) => console.log(d.readiness, d.break_even_bounty));
AffiliateDrops.on("campaign_claimed", (d) => console.log(d.slug));
AffiliateDrops.on("ready", () => {});Events are only delivered to pages on your allowed domains.
5. Partner API
Server-to-server only. Send your secret key as a bearer token. Never expose it in browser code. Limit: 120 requests per minute.
curl -X POST https://affiliatedrops.marketing/api/public/v1/brand-applications \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{"email":"founder@example.com","company":"Example","product_url":"https://example.com",
"avg_first_year_revenue":1200,"tracking_platform":"Rewardful","willing_to_fund_1500":true,
"is_decision_maker":true,"consent_processing":true}'
# -> 201 {"id":"...","tier":"hot","score":78,"stage":"new"}POST /api/public/v1/brand-applications - submit a Founding Drop application. Returns id, score and tier.POST /api/public/v1/affiliate-applications - requires email and agrees_to_disclosure.GET /api/public/v1/applications/:id - stage and tier for applications your key created.POST /api/public/v1/calculator - campaign economics for firstYearRevenue, grossMargin, refundRate, affiliateCommission, clicksPerPromotion, landingConversion, activationBounty, placements.GET /api/public/v1/campaigns/:slug?token= - campaign brief.POST /api/public/v1/campaigns/:slug/claim - body { token, affiliate_email, affiliate_name? }.Errors: 400 invalid_request, 401 invalid_api_key, 404 not_found, 429 rate_limited.
6. Webhooks
We POST JSON to your webhook URL for brand_application.created, brand_application.stage_changed, affiliate_application.created, affiliate_application.stage_changed, campaign.claimed, placement.approved and placement.status_changed. Verify the signature before trusting the payload:
import crypto from "node:crypto";
function verify(req, rawBody, webhookSecret) {
const ts = req.headers["x-affiliatedrops-timestamp"];
const sig = req.headers["x-affiliatedrops-signature"];
if (typeof ts !== "string" || typeof sig !== "string" || !/^[a-f0-9]{64}$/.test(sig)) return false;
const expected = crypto.createHmac("sha256", webhookSecret).update(ts + "." + rawBody).digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(ts)) < 300;
return fresh && crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
}Security
- The widget only loads inside the domains registered for your key.
- Secret keys are stored hashed and can be rotated at any time.
- Your API key can only read records it created.