Skip to main content
Hotmart and ClickFlare Integration Hotmart is a platform for digital products such as courses, ebooks and memberships. Creators sell their products on it, and affiliates promote them through Hotmart links. Hotmart reports every sale, refund and chargeback through its Webhook tool. To track Hotmart sales in ClickFlare, the click ID has to travel in both directions:
  • The Hotmart link carries the ClickFlare click ID out, in Hotmart’s tracking parameter src (sales page) or sck (checkout).
  • The Hotmart webhook brings it back with every purchase event, inside a JSON body.
There is no ClickFlare template for Hotmart, and you can’t paste a ClickFlare postback URL into Hotmart. Hotmart’s webhook always sends the same fixed JSON body with its own field names, and ClickFlare expects its own keys. A relay in the middle (Zapier, Make or n8n) reads Hotmart’s event and posts the values to ClickFlare under ClickFlare’s keys. This guide covers the full setup, the field mapping and how to handle refunds.

At a glance

To set up Hotmart with ClickFlare:
  1. Set up your domain and custom conversions.
  2. Add Hotmart as Other affiliate network.
  3. Put the click ID in src.
  4. Build the relay.
  5. Create the Hotmart webhook.
Each step is explained in Setup.

How the data flows

Link = their parameter + your token. Postback = your parameter + their value. Hotmart’s parameter is src (or sck). The value comes back in the webhook as purchase.origin.src (or purchase.origin.sck), and the relay sends it to ClickFlare as cf_click_id.

What you’ll need

  • A ClickFlare account with your own tracking domain. Shared domains get flagged. See Tracking domains.
  • A Hotmart account with access to the Webhook tool. Hotmart’s developer docs describe the webhook payload for creators, co-creators and affiliates.
  • An account on a relay tool: Zapier, Make or n8n. A small script on your own server works too.

Setup

1

Set up your own tracking domain

Add a custom tracking domain first, for example trk.yourdomain.com. The relay posts conversions to this domain, so changing it later means updating the relay too. See Tracking domains.
2

Create the custom conversions

Go to Settings → Custom Conversions and create one custom conversion per Hotmart event you want to see as its own column, for example purchase, refund and chargeback. The relay sends these names in ct, and they must match exactly. See Custom conversions.
3

Create the campaign

Go to Campaigns → New Campaign, choose Redirect tracking, pick your traffic source and select your tracking domain. See Creating a campaign.
4

Add Hotmart as an affiliate network

While you create the offer, open its Affiliate Network field and create a new network. Pick Other affiliate network and name it “Hotmart”. You don’t need its postback URL: the relay posts to ClickFlare directly. Set Payout currency to the currency of your Hotmart commission.
5

Create the offer with the click ID in src

In the offer form, paste your Hotmart link into Offer URL and add the click ID in Hotmart’s tracking parameter:
Hotmart uses two parameters:Write the parameter yourself and leave Append Click ID to Offer Url off. The Other affiliate network has no Hotmart parameter to add. Set the payout to Auto so ClickFlare uses the value the relay sends.The Offer URL field of the ClickFlare New Offer form with a Hotmart link ending in src={cf_click_id}
Write {cf_click_id} with braces. Without them Hotmart stores the literal text, and the sale can’t be matched to a click. Keep the click ID alone in src. Hotmart suggests pipe-separated values for its own reports, but extra text in the field breaks the match in ClickFlare.
6

Build the relay

Create a webhook trigger in your relay tool and copy its URL:
  • Zapier: Webhooks by Zapier → Catch Hook.
  • Make: Webhooks → Custom webhook.
  • n8n: a Webhook node, method POST. Use the production URL.
Then add the step that posts to ClickFlare, with the mapping in Field mapping:
Each relay guide shows this step in its own tool: Zapier, Make, n8n.
7

Create the Hotmart webhook

In your Hotmart account, open the Webhook tool and create a new configuration. Hotmart’s “Using Webhooks” developer page links to it with Create a setting.
  1. Paste the relay’s URL as the receiving address.
  2. Choose version 2.0.0. The field names in this guide come from that version.
  3. Select the products to track.
  4. Select the purchase events: at least PURCHASE_APPROVED, plus PURCHASE_REFUNDED and PURCHASE_CHARGEBACK if you track refunds.
  5. Save, then send a test event to the relay.
Hotmart keeps the event history for up to 60 days, so you can check what it sent.
8

Add a lander (optional)

If you send traffic through a presell page, its CTA must use the ClickFlare click URL, not the Hotmart link. ClickFlare then adds the click ID when it redirects to Hotmart.
9

Save the campaign and launch

Save the campaign, copy the campaign URL from the Tracking tab and use it in your ads. Run the checks in Verify the setup before you spend on traffic.

Field mapping

Hotmart’s version 2.0.0 webhook sends the event name at the top level and the sale in data. The relay maps it like this: Other fields you may want:
  • data.commissions[].currency_value is the commission currency (ISO code such as BRL or USD). Match it to the affiliate network’s Payout currency in ClickFlare.
  • data.purchase.price.value is what the buyer paid, not what you earn. Use the commission for ROI.
  • data.purchase.order_bump.is_order_bump tells you whether the sale was an order bump.
Pulling one entry out of the commissions list works natively in Make and n8n. In Zapier, a list arrives as line items. Add a Code by Zapier or Formatter by Zapier step that picks the commission for your source before the POST step.

Events, refunds and repeat sales

Hotmart’s purchase webhook can send PURCHASE_APPROVED, PURCHASE_COMPLETE, PURCHASE_CANCELED, PURCHASE_BILLET_PRINTED, PURCHASE_PROTEST, PURCHASE_REFUNDED, PURCHASE_CHARGEBACK, PURCHASE_EXPIRED and PURCHASE_DELAYED. A sensible start: Each ct is its own column in ClickFlare, so you see sales, refunds and chargebacks side by side. A negative payout subtracts the refunded commission from revenue. Check Hotmart’s event descriptions before you map the other events. A boleto that is printed but never paid, for example, isn’t a sale. Repeat sales on the same click. ClickFlare keeps one conversion per click ID and custom conversion. Without a transaction ID, a second purchase on the same click, such as a subscription renewal, replaces the first one. Send Hotmart’s transaction code in txid in the JSON body, as in Field mapping. A different txid makes each call its own conversion, and the same txid replaces the earlier one. If your relay uses the GET postback instead, put the code in the URL:
See Postback parameters.

Security

Hotmart sends a unique account token, the hottok, in the X-HOTMART-HOTTOK header of every webhook and recommends checking it before you process the data. If your relay can read request headers, add a filter that stops the run when the header doesn’t match your hottok. This keeps anyone who finds your relay URL from posting fake sales.

Verify the setup

1

Click through the campaign

Open the ClickFlare campaign URL. When Hotmart loads, check the address bar: src= must be followed by a real click ID, not the text {cf_click_id}.
2

Check the payload

Send a test from Hotmart’s Webhook tool, or make a real sale. In the relay’s history, check that data.purchase.origin.src holds the click ID and that the commission is where you mapped it.
3

Check ClickFlare

The sale should appear on the campaign under the purchase custom conversion with your commission. In Logs → Event Logs, you can see the conversion as ClickFlare received it.
While you set up, open the first real webhook in the relay’s history and check that purchase.origin.src (or sck) holds the click ID. Hotmart’s sales report also shows the src value in its Source field, so Conversion Upload can fill a gap from a file if you ever need it.

Troubleshooting

  • The webhook doesn’t reach the relay. Check Hotmart’s event history for the configuration and the relay’s run history.
  • origin.src is empty. The link has no src, the lander CTA goes straight to Hotmart, or you used sck on the link and mapped src (or the other way round).
  • The relay posts the wrong value. Look at the relay’s last run. cf_click_id must be the click ID alone.
  • The ct doesn’t match. ct must match a custom conversion name exactly, including case.
  • The relay posts to the wrong domain. Use your own tracking domain with /cf/cv.
See Troubleshooting S2S postbacks.
  • 0: the relay didn’t find the commission. Check the path to data.commissions and the source you filter on.
  • Too high: the relay sends purchase.price.value (what the buyer paid) or the creator’s commission instead of yours.
  • Wrong currency: set Payout currency on the Hotmart affiliate network to the commission currency.
The relay doesn’t send txid, so a second purchase on the same click replaces the first. Add txid to the body, set to data.purchase.transaction. See Events, refunds and repeat sales.
The offer URL has the token without braces. It must be src={cf_click_id}.

FAQ

Yes, through a relay. You pass the click ID in src or sck, and Zapier, Make or n8n turns Hotmart’s purchase webhook into a ClickFlare conversion.
Hotmart’s webhook sends a fixed JSON body to a URL. It has no macros to put values into a postback URL, and it doesn’t use ClickFlare’s key names. The relay does that translation.
src for affiliate links and sales pages, sck for links that go straight to the checkout. Use one per offer and map the matching field in the relay.
You need something that receives Hotmart’s JSON and posts ClickFlare’s JSON. Any of the three works, as does your own script. n8n can be self-hosted if you prefer to keep sales data on your own server.
Yes. Once ClickFlare records the sale, it can send it to the traffic source through the traffic source’s postback or conversion API. Map only the purchase custom conversion there if you don’t want refunds sent.

Zapier

Relay with a Zap

Make

Relay with a scenario

n8n

Relay with a workflow