Skip to main content
The Cashback Hive SDK is a small (~10 KB) browser script that lets publishers surface cashback offers to their audience, let members sign in, and send shoppers to retailers through tracked links so purchases are attributed to you. You load it once with a script tag, and it exposes a single global, window.CashbackHive.

What you can build

Offers

List and search the cashback offers available to your property, with logos, categories and rates.

Activate

Let visitors sign in as Cashback Hive members so their purchases earn cashback, and show their balances.

Click tracking

Send shoppers to retailers through tracked links with your own click IDs and sub-IDs.

Events

React to sign-in changes and clicks from anywhere on your page.

How it works

  1. You add the script tag with your publishable key (cbh_pk_…). The key is bound to the origins you register in the publisher portal, so it is safe to ship to browsers.
  2. The SDK reads the key from the script tag, initialises itself, and dispatches a cbh:ready event on window.
  3. Your code waits for cbh:ready, then calls methods such as offers.list(), auth.signIn() or openOffer().
The SDK is framework-agnostic. It works with plain HTML, React, Next.js, Vue, Svelte, or any site that can load a script tag — including through Google Tag Manager.

Next steps

Quickstart

Get offers rendering on a page in five minutes.

Keys and allowed origins

Understand publishable keys and where the SDK is allowed to run.

Installation

Framework-specific install guides.

API reference

Every method, option, event and type.