Getting Started

Get Brandclub Sync running in your app in 5 minutes.

Step 1: Install

Add the SDK via CDN:

<!-- Production -->
<script src="https://sync.brandclub.com/sync-sdk/latest/sdk.umd.js"></script>

<!-- Beta/Sandbox -->
<script src="https://sync-beta.brandclub.com/sync-sdk/latest/sdk.umd.js"></script>

Or via NPM:

npm install @brandclub/sync-sdk

Step 2: Add to Your App

<div id="sync-widget"></div>

<script src="https://sync-beta.brandclub.com/sync-sdk/latest/sdk.umd.js"></script>
<script>
  BrandclubSync.init({
    clientId: "bc_example_rewards_app_demo",
    environment: "sandbox",
    container: document.getElementById("sync-widget"),
    onSync: (result) => {
      console.log("Sync complete!", result);
      // Refresh your data here
    },
  });
</script>

Note: React integration coming soon.

Step 3: Test It

Open your app. The widget will:

  1. Show "Connect Your Accounts"

  2. Let user sign in with phone (use +1-555-0199, code 424242)

  3. Connect a retailer

  4. Start syncing purchases

Step 4: Fetch Order Data

Once synced, get orders from your backend:

Step 5: Go Live

  1. Get your production client ID

  2. Update to environment: "production"

  3. Use sync.brandclub.com base URL

Done! Your app now has automatic purchase tracking.

Recurring Sync

Once connected, we auto-sync users automatically:

  • Weekly auto-sync - We attempt to auto-sync users who have been inactive for a week

No manual triggers needed - purchases appear automatically.

What's Next?

Demo

See it in action: https://example-rewards-app-beta.brandclub.com

Last updated