> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trackplay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ClickBank

> Connect ClickBank so every sale is credited back to the video that made it.

TrackPlay tags every ClickBank link on your page with the viewer's session. ClickBank
sends the sale back, encrypted. TrackPlay decrypts it with your key and joins it to the
play.

## Connect it

<Snippet file="connect-integration.mdx" />

ClickBank needs one extra thing the other carts do not: your **encryption key**.

## Encryption key

ClickBank encrypts its notifications. Without the key, TrackPlay cannot read them and no
sale is recorded.

Find it in ClickBank under **Settings → Advanced Tools → Secret Key**, and paste it into
the integration's Settings tab. It is stored encrypted and never shown back to you in
full.

## Tracking parameters

| Parameter         |                        |
| ----------------- | ---------------------- |
| `unique_aff_sub1` | Unique Affiliate Sub 1 |
| `unique_aff_sub2` | Unique Affiliate Sub 2 |
| `unique_aff_sub3` | Unique Affiliate Sub 3 |
| `unique_aff_sub4` | Unique Affiliate Sub 4 |
| `unique_aff_sub5` | Unique Affiliate Sub 5 |
| `vtid`            | Vendor Tracking ID     |

<Warning>
  Pick one your affiliates are not already using. TrackPlay overwrites the parameter you
  choose on every ClickBank URL.
</Warning>

## Set up the notification URL

Copy the URL from the **Postback Setup** window. In your [ClickBank API Management
dashboard](https://accounts.clickbank.com/master/dashboard/api-management), paste it into:

* **New Order URL**
* **Order Refund URL**
* **Order Chargeback URL**

ClickBank calls this an **Instant Notification (IPN)**.

Then push a test sale. The status flips from **Not configured** to **Active** the moment
the first notification lands.

<Warning>
  Your postback URL is a secret. Anyone holding it can post fake conversions into your
  workspace. Give it to ClickBank and nobody else.
</Warning>

## What TrackPlay does to your links

Every link and form pointing at **`clickbank.net`** gets the parameter added
automatically.

```
https://clickbank.net/checkout?product=123
→ https://clickbank.net/checkout?product=123&vtid=<session>
```

<Note>
  It matches `clickbank.net`, which is the checkout domain, not `clickbank.com`. If your
  buy button points somewhere else, it will not be tagged.
</Note>

## When it does not work

<AccordionGroup>
  <Accordion title="Status is stuck on 'Not configured'">
    No notification has arrived yet. Check the URL is in all three ClickBank fields and
    push a real test sale.
  </Accordion>

  <Accordion title="Decryption errors">
    The encryption key is wrong. Re-copy it from ClickBank (a trailing space is enough to
    break it) and save again.
  </Accordion>

  <Accordion title="Sales arrive with no video attached">
    The link was not tagged. Confirm the buy button points at `clickbank.net` and that no
    redirect in between is stripping the query string.
  </Accordion>
</AccordionGroup>
