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-sdkStep 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:
Show "Connect Your Accounts"
Let user sign in with phone (use
+1-555-0199, code424242)Connect a retailer
Start syncing purchases
Step 4: Fetch Order Data
Once synced, get orders from your backend:
Step 5: Go Live
Get your production client ID
Update to
environment: "production"Use
sync.brandclub.combase 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?
API Reference - All available endpoints
Authentication - How auth works
Data Reference - Order data structure
Demo
See it in action: https://example-rewards-app-beta.brandclub.com
Last updated