Circle Affiliate Program: Complete Integration Guide | AffiliateBase

Create an Affiliate Program with Circle

Step-by-step guide to integrating affiliate tracking with your Circle community platform

Circle is a popular community platform that helps creators build engaged communities and monetize through memberships. If you're using Circle to host your community and want to grow your membership base through affiliate marketing, AffiliateBase provides seamless integration.

This comprehensive guide will walk you through everything you need to know about setting up an affiliate program with Circle, from webhook configuration to tracking membership sign-ups, subscription purchases, and member upgrades.

Whether you're running a paid community, offering tiered memberships, or selling access to exclusive content, an affiliate program can help you acquire new members while rewarding your partners for successful referrals.

Follow these steps to integrate AffiliateBase with Circle:

1

Set Up Circle Webhooks

Navigate to your Circle admin dashboard and go to Settings > Integrations > Webhooks. Create a new webhook endpoint pointing to AffiliateBase.
text
https://api.affiliatebase.com/webhooks/circle
2

Select Webhook Events

Subscribe to the following Circle events: member.created, subscription.created, and subscription.updated. These events will trigger affiliate tracking.
3

Add Webhook Secret to AffiliateBase

Copy your webhook secret from Circle and add it to your AffiliateBase dashboard under Settings > Integrations > Circle.
4

Configure Commission Rules

Set up your commission structure in AffiliateBase dashboard. You can configure different rates for different membership tiers or plans.
5

Pass Affiliate IDs to Circle

Add affiliate tracking parameters to your Circle community sign-up URLs. AffiliateBase will capture these and attribute conversions correctly.
6

Test the Integration

Create a test membership sign-up in Circle to verify that affiliate tracking is working correctly. Check your AffiliateBase dashboard for the conversion.

Circle Webhook Handler Example

Here's an example of how to handle Circle webhooks for affiliate tracking:

// Example: Next.js API route for Circle webhooks
import { headers } from 'next/headers';
import crypto from 'crypto';
import { AffiliateBase } from '@affiliatebase/sdk';

const affiliateBase = new AffiliateBase({
  apiKey: process.env.AFFILIATEBASE_API_KEY!,
});

export async function POST(request: Request) {
  const body = await request.text();
  const signature = headers().get('x-circle-signature')!;
  
  // Verify webhook signature
  const expectedSignature = crypto
    .createHmac('sha256', process.env.CIRCLE_WEBHOOK_SECRET!)
    .update(body)
    .digest('hex');
  
  if (signature !== expectedSignature) {
    return new Response('Invalid signature', { status: 401 });
  }
  
  const event = JSON.parse(body);
  
  // Handle different event types
  switch (event.type) {
    case 'member.created':
      // Only track if member has a paid subscription
      if (event.data.member.subscription_id) {
        await affiliateBase.trackConversion({
          affiliateId: event.data.member.metadata?.affiliateId,
          type: 'membership_signup',
          amount: event.data.member.subscription?.price,
          currency: event.data.member.subscription?.currency,
          customerId: event.data.member.id,
          subscriptionId: event.data.member.subscription_id,
          metadata: {
            community_id: event.data.member.community_id,
            membership_tier: event.data.member.membership_tier,
          },
        });
      }
      break;
      
    case 'subscription.created':
      await affiliateBase.trackConversion({
        affiliateId: event.data.subscription.metadata?.affiliateId,
        type: 'subscription',
        amount: event.data.subscription.price,
        currency: event.data.subscription.currency,
        customerId: event.data.subscription.member_id,
        subscriptionId: event.data.subscription.id,
        metadata: {
          community_id: event.data.subscription.community_id,
          plan_name: event.data.subscription.plan_name,
        },
      });
      break;
      
    case 'subscription.updated':
      // Track subscription upgrades/downgrades
      if (event.data.subscription.previous_price !== event.data.subscription.price) {
        await affiliateBase.trackConversion({
          affiliateId: event.data.subscription.metadata?.affiliateId,
          type: 'subscription_upgrade',
          amount: event.data.subscription.price - event.data.subscription.previous_price,
          currency: event.data.subscription.currency,
          customerId: event.data.subscription.member_id,
          subscriptionId: event.data.subscription.id,
        });
      }
      break;
  }
  
  return new Response(JSON.stringify({ received: true }), { status: 200 });
}

Why Use AffiliateBase with Circle?

AffiliateBase is the perfect solution for Circle community owners who want powerful affiliate tracking without complexity.

Native Circle Integration

Built-in integration with Circle webhooks. Automatically tracks membership sign-ups, subscriptions, and upgrades without custom code.

Subscription Lifecycle Tracking

Tracks subscription renewals, upgrades, downgrades, and cancellations. Ensures affiliates receive commissions for recurring revenue.

Multiple Membership Tiers

Support for different commission rates based on membership tier or plan. Perfect for communities with multiple membership levels.

Real-Time Tracking

Track conversions in real-time as members join or upgrade. No delays or batch processing.

Affiliate Dashboard

Give your affiliates a professional dashboard to track their performance, view commissions, and generate affiliate links for your community.

Webhook Security

Built-in webhook signature verification ensures only legitimate Circle events are processed, protecting your affiliate program from fraud.

Frequently Asked Questions

Does AffiliateBase work with Circle?

Yes! AffiliateBase integrates seamlessly with Circle through webhooks. It automatically tracks membership sign-ups, subscription purchases, and membership upgrades.

How are membership sign-ups tracked?

AffiliateBase tracks Circle memberships through webhooks. When a member joins your community via an affiliate link, the member.created or subscription.created webhook triggers affiliate tracking and commission calculation.

Can I track subscription renewals?

Yes! AffiliateBase tracks Circle subscription renewals automatically. When a member's subscription renews, the original affiliate receives commission for the renewal, ensuring they're rewarded for recurring revenue.

What happens when a member upgrades or downgrades?

AffiliateBase tracks membership changes through the subscription.updated webhook. The original affiliate maintains attribution, and commissions can be calculated based on the upgrade amount or new subscription level.

Can I set different commission rates for different membership tiers?

Yes! You can configure different commission structures in AffiliateBase based on membership tier, plan, or price. This gives you full control over your affiliate program.

How do I add affiliate tracking to my Circle community URLs?

Add affiliate tracking parameters to your Circle community sign-up URLs (e.g., ?ref=AFFILIATE_ID). AffiliateBase will capture these parameters and attribute conversions correctly when members join.

Do affiliates get their own dashboard?

Yes! Affiliates get access to a professional dashboard where they can view their conversions, commissions, performance metrics, and generate affiliate links for your community.

Ready to Launch Your Circle Affiliate Program?

Get started with AffiliateBase today and start growing your Circle community through affiliate marketing.