What This Tutorial Covers
By the end of this guide, your ClickBank sales fire as server-side Purchase events into Meta CAPI with full Event Match Quality parameters, your refunds fire correction events so Meta stops optimizing toward refunders, and the whole pipeline runs without a browser pixel doing anything important.
You will need:
- A ClickBank affiliate account or vendor account
- A Meta Business account with the Conversions API set up
- A tracker that supports both ClickBank IPN and Meta CAPI (RedTrack, ClickMagick, FunnelFlux Pro, ClickerVolt, or a custom S2S endpoint)
- The Meta Pixel ID and the Conversions API access token from your Meta Events Manager
I will use ClickerVolt as the reference tracker because it ships native ClickBank IPN and full 15-signal Meta CAPI on every plan. The same logical setup works on RedTrack and FunnelFlux Pro with a longer postback configuration. I will call out the divergences when they matter.
The Architecture You Are Building
The whole pipeline has six moving parts. Understanding the picture first makes the steps below click into place.
The seven-step loop. Steps 1-3 are the click side. Steps 4-7 are the server side. The refund row is what most setups skip.
The setup below covers steps 2 through 7. The Meta ad click and the ClickBank order form are configured inside Meta Ads Manager and ClickBank respectively.
Step 1: Configure Your Meta CAPI Endpoint
Before any of the ClickBank work, you need a Meta Pixel ID and a Conversions API access token. If you already have CAPI set up via Meta's wizard, skip this step.
In Meta Events Manager:
- Open your Pixel under Data Sources.
- Click Settings, scroll to Conversions API, click Set up manually.
- Generate an access token. Copy the token and the Pixel ID into a notes file. You will paste both into your tracker in Step 4.
- While you are here, note the Event Match Quality score on your existing events. That is the number you will improve.
The Pixel ID is the long numeric string (e.g. 1234567890123456). The access token is a 200+ character string starting with EAA....
Step 2: Pass the Meta Click ID Into ClickBank
The Meta click ID (fbclid) is the identifier that lets Meta match the server-side Purchase event back to the ad click. If the click ID is missing, your CAPI events fall back to email and phone matching alone, and your Event Match Quality drops.
Your tracker captures the fbclid from the ad click URL. Your job is to forward that click ID into ClickBank's affiliate tracking parameter (tid) so the IPN payload includes it.
The redirect URL pattern you want:
https://hop.clickbank.net/?affiliate=YOURACCOUNT&vendor=VENDORNICKNAME&tid={click_id}
Replace {click_id} with the token your tracker provides. The token names vary by tracker:
- ClickerVolt:
{visitor_id}or{click_id} - RedTrack:
{clickid} - FunnelFlux Pro:
{hit-id} - ClickMagick:
[CLICK_ID]
When ClickBank receives the affiliate hop with a tid parameter, it preserves that value through the entire order flow and includes it in the IPN payload as cbaffi or in the clickbank_id_tid field depending on the IPN version.
Step 3: Configure Your Tracker as the Redirect
In your tracker, build a campaign that captures the Meta click ID from the inbound URL and routes the user to ClickBank with the click ID appended.
The Meta ad URL you build in Ads Manager looks like:
https://your-tracker-domain.com/?campaign=clickbank-offer-1&fbclid={fbclid}
Most trackers handle the {fbclid} URL parameter substitution automatically once you set the Meta ad source. ClickerVolt detects fbclid from the inbound URL by default; RedTrack maps it via the Meta traffic-source template; FunnelFlux Pro adds it as a custom variable on the campaign node.
In your tracker, the redirect destination is the ClickBank hop URL from Step 2, with the tracker's click ID token in the tid slot.
Step 4: Configure the ClickBank IPN
The Instant Notification URL (IPN) is the webhook ClickBank fires when a sale, refund, chargeback, or rebill happens. Your tracker exposes an endpoint that receives those events and converts them into Meta CAPI calls.
In ClickBank:
- Go to Vendor Settings (if you are the vendor) or My Account > Account Settings (if you are an affiliate using a vendor that supports affiliate IPN).
- Find the Advanced Tools section.
- Paste your tracker's IPN URL into the Instant Notification URL field.
- Generate or paste your Secret Key. Copy this key.
In your tracker:
- Add the ClickBank integration.
- Paste the same Secret Key. The tracker uses this to verify that incoming IPN posts actually came from ClickBank.
- If your tracker offers a Meta CAPI configuration screen, paste the Pixel ID and access token from Step 1 here.
- Map the ClickBank event types (
SALE,RFND,CGBK,BILL) to your tracker's internal event types. Most native integrations do this automatically.
ClickBank IPN payload sample (the fields that matter):
{
"transactionType": "SALE",
"receipt": "1ABCD234",
"transactionTime": "2026-05-21T14:23:11Z",
"totalOrderAmount": 67.00,
"customer": {
"billing": {
"fullName": "Jane Doe",
"firstName": "Jane",
"lastName": "Doe",
"emailAddress": "jane@example.com",
"address": {
"city": "Austin",
"county": "Travis",
"country": "US",
"postalCode": "78701",
"state": "TX"
}
}
},
"trackingCodes": {
"trackingId": "your-click-id-here"
}
}
The trackingCodes.trackingId field carries the click ID you passed in Step 2. This is the value that connects the ClickBank sale back to the original Meta ad click.
Step 5: Construct the Meta CAPI Purchase Event
Your tracker reads the IPN payload, matches trackingCodes.trackingId to the original click record, and fires a server-side Purchase event to Meta CAPI.
The minimum CAPI payload:
{
"data": [{
"event_name": "Purchase",
"event_time": 1747843391,
"event_id": "1ABCD234",
"action_source": "website",
"event_source_url": "https://your-tracker-domain.com/clickbank-offer-1",
"user_data": {
"em": ["sha256-of-jane@example.com"],
"ph": ["sha256-of-phone"],
"client_ip_address": "203.0.113.42",
"client_user_agent": "Mozilla/5.0...",
"fbc": "fb.1.1747843391.fbclid-value",
"fbp": "fb.1.1747843391.browser-id"
},
"custom_data": {
"currency": "USD",
"value": 67.00,
"content_ids": ["clickbank-product-sku"],
"content_type": "product"
}
}]
}
The event_id field deduplicates against the browser pixel if you are still firing one. The fbc field is the Meta click ID parameter in the format fb.{subdomain_index}.{timestamp}.{fbclid}. The fbp field is the Meta browser ID, captured from the _fbp cookie when the user hit your tracker.
For maximum Event Match Quality, include the extended parameters:
"user_data": {
"em": ["..."],
"ph": ["..."],
"client_ip_address": "...",
"client_user_agent": "...",
"fbc": "...",
"fbp": "...",
"fn": ["sha256-of-jane"],
"ln": ["sha256-of-doe"],
"ct": ["sha256-of-austin"],
"st": ["sha256-of-tx"],
"zp": ["sha256-of-78701"],
"country": ["sha256-of-us"],
"external_id": ["sha256-of-clickbank-receipt-1ABCD234"]
}
This is the 15-signal CAPI payload Meta supports. The first 5 fields (email, phone, IP, user agent, click ID) are what most trackers send. The extended fields (first name, last name, city, state, zip, country, external ID, browser ID) are what lift EMQ from a mid-band score in Events Manager toward the top band.
ClickBank's IPN payload contains every one of these fields in customer.billing. Whether your tracker actually forwards them to Meta is a tracker question. ClickerVolt sends all 15. RedTrack and FunnelFlux Pro send the standard 5. If you are on a tracker that stops at 5, you can fire the extended payload yourself via a custom serverless function reading the IPN webhook.
Step 6: Handle Refunds and Chargebacks
When a customer refunds on day 21, ClickBank fires a RFND IPN. If you do nothing with that event, Meta keeps optimizing toward the customer profile that just clawed back the money.
The fix is to fire a refund correction event. Meta does not have a dedicated "refund" event type the way Google has RETRACT, but you can fire a Purchase event with a negative value, or use the deprecated-but-still-functional ClickerVolt_Refund custom event pattern, depending on your account's setup.
The recommended approach as of 2026:
{
"data": [{
"event_name": "Purchase",
"event_time": 1749643391,
"event_id": "1ABCD234-REFUND",
"action_source": "system_generated",
"user_data": { ... same as original event ... },
"custom_data": {
"currency": "USD",
"value": -67.00,
"content_ids": ["clickbank-product-sku"]
},
"opt_out": false
}]
}
The negative value tells Meta that this conversion's economic outcome was undone. Meta's optimizer treats negative-value conversions as anti-signals when computing audience similarity. The event_id differs from the original so Meta does not dedupe it as a duplicate of the original Purchase.
If your tracker does not auto-fire refund events, you have three options:
- Build a custom serverless function that listens to ClickBank's IPN, detects
RFNDevents, and fires the correction event to Meta CAPI. About 80 lines of code. - Run a daily reconciliation script that pulls refunds from your ClickBank API and fires CAPI corrections in batch. Less precise but easier.
- Switch to a tracker that handles this natively. ClickerVolt's Refund Sync auto-fires Google RETRACT, Meta correction events, and TikTok CancelOrder within seconds of the refund IPN. Some other trackers handle it manually.
Step 7: Verify the Loop Works
Before scaling spend, confirm the pipeline actually fires events.
Test the sale flow:
- Make a $1 test purchase on the ClickBank offer using your own ad click (set up a test campaign with a $5 daily cap and click your own ad).
- Within 60 seconds, check Meta Events Manager > Test Events. You should see a
Purchaseevent withvalue: 1.00, your fbclid infbc, and an EMQ score. - Click into the event. Verify the
user_datafields are populated. Iffn,ln,ct,st,zpare missing, your tracker is sending the standard 5-parameter payload, not the extended 15.
Test the refund flow:
- Go to your ClickBank account orders, request a refund on the test purchase.
- Within a few minutes, check Test Events in Meta Events Manager for a negative-value Purchase or a refund correction event.
- If nothing fires, your tracker is logging refunds internally but not pushing them to Meta. Use one of the three options from Step 6.
Check your EMQ score after 48 hours. Meta needs 24 to 48 hours of events to compute a stable score. The 1.0–10.0 EMQ score is shown per event in Events Manager. If you're stuck in the bottom band after a week of real volume, your fbc is probably missing or your phone numbers are not hashing correctly.
Common Mistakes
I've seen the same five mistakes wreck ClickBank-to-Meta-CAPI setups over and over. Avoid these.
1. Forgetting to URL-encode the tid value. If your click ID contains special characters or hyphens, ClickBank's hop URL needs the value URL-encoded. Otherwise the click ID gets truncated or corrupted, and IPN matching fails.
2. Firing both pixel and CAPI without an event_id. Without a shared event_id, Meta treats them as separate events and your reported conversions inflate. Always set event_id to the ClickBank receipt number on both sides so Meta can deduplicate.
3. Hashing emails the wrong way. Meta requires SHA-256 hex strings, lowercased and trimmed before hashing. jane@Example.com and jane@example.com produce different hashes. Always normalize before hashing.
4. Missing the fbp cookie. The _fbp cookie is set by the Meta Pixel when it loads. If you blocked the pixel entirely to save page weight, fbp will be empty in your CAPI calls, and your EMQ drops. Fire the pixel with deduplication, or set _fbp manually in your tracker.
5. Ignoring chargebacks. Refund events fire within 30 days. Chargebacks fire 60 to 90 days later. If you only handle RFND and ignore CGBK, Meta keeps optimizing toward customers who eventually chargeback, which is a worse signal than a regular refund.
What Good Looks Like
A correctly configured ClickBank-to-Meta-CAPI pipeline produces:
- Server-side delivery of every ClickBank conversion to Meta Events Manager, including the buyers a browser pixel alone misses (Safari ITP, in-app browsers, content blockers).
- An Event Match Quality score in the top band of Events Manager on Purchase events, driven by the full 15-parameter user_data payload.
- A drop in reported CPA over 14 to 28 days as Meta's algorithm refines on cleaner signal.
- A natural drop in customer profiles that refund or chargeback, because the algorithm stops optimizing toward them after correction events fire.
The work above takes 30 to 45 minutes the first time if you have a tracker that handles ClickBank natively. It takes a half day if you are wiring up a custom S2S endpoint.
Why This Matters
ClickBank is one of the only major affiliate networks that exposes refund and chargeback events through IPN. Most affiliate networks fire the sale and never tell you when the customer clawed back. That makes ClickBank uniquely well-suited to a full refund-aware CAPI pipeline, and it makes the work above unusually valuable.
Most affiliates running ClickBank offers on Meta are still on pixel-only setups, getting half the signal and training Meta on a noisy attribution graph that costs CPA every month. The buyers who get this pipeline right pull ahead, because Meta's algorithm rewards better signal with cheaper traffic over time.
See ClickerVolt's native ClickBank IPN with full 15-signal Meta CAPI
Frequently Asked Questions
Do I still need the Meta Pixel if I have CAPI set up?
Yes, fire both with deduplication via event_id. The pixel gives you faster real-time data in Meta Events Manager. CAPI gives you the durable, complete signal. Together they cover the cases where one fails.
Can I track ClickBank conversions in Meta without a tracker?
You can, but you will write the wiring yourself. The ClickBank IPN posts to whatever URL you give it; you can run a serverless function (Cloudflare Workers, AWS Lambda) that parses the IPN payload and fires CAPI events directly. The tracker is what saves you from building that yourself.
What does ClickBank's IPN actually send?
A JSON payload with transaction details, customer billing info (full name, email, phone, address), product info, payment info, and tracking IDs. Every field you need for a 15-signal Meta CAPI payload is in there. The question is whether your tracker forwards all of them.
How long until my EMQ score improves?
Meta needs 24 to 48 hours of events to compute a stable EMQ score. If you are firing 50+ events a day with the extended parameters, you should see EMQ climb measurably from a mid-band score toward the top band within a week. Lower volume takes longer.
Will Meta penalize me for negative-value Purchase events?
No. Meta explicitly supports negative-value Purchase events as the recommended pattern for refund correction in 2026. The algorithm interprets them as anti-signals when computing audience similarity, which is exactly the behavior you want.
Does this same pipeline work for upsells and rebills?
Yes. ClickBank's IPN fires separate events for upsells (SALE with a different product SKU), rebills (BILL), and refunds (RFND). Fire them all as separate CAPI events with unique event_id values. Meta then prospects toward customers whose lifetime value (sales + upsells + rebills minus refunds) is highest.
What if I am promoting someone else's ClickBank offer as an affiliate?
You need the vendor to either expose affiliate IPN (some do, some do not) or you need to route traffic through a tracker that captures the click ID on the affiliate hop and matches it to the IPN payload via cbaffi. ClickerVolt and FunnelFlux Pro support this natively. RedTrack supports it via postback configuration.
