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

# Coupon-based affiliate tracking with promo codes

> Track affiliate sales using promotion codes synced with Stripe, Shopify, WooCommerce, and Paddle. Assign unique coupon codes to partners for accurate attribution.

Track affiliate and partner sales through unique promotion codes instead of (or alongside) referral links. Coupon-based tracking is perfect for podcasts, YouTube videos, influencer marketing, and any channel where customers can't click a referral link.

## What is Coupon-Based Affiliate Tracking?

Coupon-based tracking assigns unique promotion codes to each partner. When customers apply these codes at checkout, Partnero automatically attributes the sale to the correct partner—even without referral link cookies.

### Why Use Coupon Tracking?

* **Offline channels**—Podcasts, print media, events, word-of-mouth
* **Video content**—YouTube, TikTok, Instagram where links aren't clickable
* **Influencer partnerships**—Easy-to-remember codes for audiences
* **Multi-channel attribution**—Combine with referral links for complete tracking
* **Podcast advertising**—Partners share codes verbally

<Note>
  Coupon tracking requires integration with a supported payment platform. Make sure you have one of the supported integrations connected before setting up coupon tracking.
</Note>

## Supported Payment Platforms

Partnero syncs coupons and promotion codes with these platforms:

| Platform        | Coupon Sync | Auto-Tracking |
| --------------- | ----------- | ------------- |
| **Stripe**      | ✓           | ✓             |
| **Paddle**      | ✓           | ✓             |
| **WooCommerce** | ✓           | ✓             |
| **Shopify**     | ✓           | ✓             |

## How It Works

```
┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  Partner gets   │     │  Customer uses   │     │  Partnero       │
│  unique code    │────▶│  code at checkout│────▶│  attributes sale│
└─────────────────┘     └──────────────────┘     └─────────────────┘
        │                        │                        │
        ▼                        ▼                        ▼
┌─────────────────┐     ┌──────────────────┐     ┌─────────────────┐
│  e.g. JOHN20    │     │  Stripe/Paddle/  │     │  Partner earns  │
│                 │     │  Shopify/WooComm │     │  commission     │
└─────────────────┘     └──────────────────┘     └─────────────────┘
```

1. **Create a coupon** in Partnero (or sync from your payment platform)
2. **Assign promotion codes** to partners (manually or auto-generated)
3. **Partners share their codes** with potential customers
4. **Customers apply the code** during checkout
5. **Partnero detects the code** and attributes the sale to the partner
6. **Partner earns commission** based on your program settings

## Set Up Coupon Tracking

### Step 1: Connect Your Payment Platform

Connect one of the supported integrations:

<Tabs>
  <Tab title="Stripe">
    1. Go to **Program Settings → Integrations**
    2. Click **Connect** next to Stripe
    3. Authorize Partnero to access your Stripe account
    4. Enable coupon sync events:
       * `coupon.created`
       * `coupon.updated`
       * `coupon.deleted`
       * `promotion_code.created`
       * `promotion_code.updated`
  </Tab>

  <Tab title="Paddle">
    1. Go to **Program Settings → Integrations**
    2. Click **Connect** next to Paddle
    3. Enter your Paddle API credentials
    4. Enable coupon synchronization
  </Tab>

  <Tab title="WooCommerce">
    1. Install the Partnero WooCommerce plugin
    2. Connect your store to Partnero
    3. Enable coupon sync in plugin settings

    <Info>
      WooCommerce requires lowercase promotion codes.
    </Info>
  </Tab>

  <Tab title="Shopify">
    1. Install the Partnero Shopify app
    2. Connect your store to your program
    3. Coupon sync is enabled automatically
  </Tab>
</Tabs>

### Step 2: Create a Coupon

Create a coupon that will serve as the "parent" for partner-specific promotion codes:

1. Go to **Coupons** in your program
2. Click **Create Coupon**
3. Configure the discount:
   * **Name**—Internal name (e.g., "Partner Discount")
   * **Type**—Percentage or fixed amount
   * **Amount**—Discount value (e.g., 20% or \$10)
4. Enable **Sync to \[Platform]** to create it in your payment system
5. Click **Save**

### Step 3: Create Promotion Codes

Each partner needs a unique promotion code. You can create them manually or auto-generate them.

<Tabs>
  <Tab title="Manual Assignment">
    Create individual promotion codes for specific partners:

    1. Go to **Coupons → \[Your Coupon] → Promotion Codes**
    2. Click **Create Promotion Code**
    3. Enter the **Code** (e.g., `JOHN20`)
    4. Enable **Assign to specific partner**
    5. Select the partner
    6. Configure restrictions (optional):
       * First-time orders only
       * Minimum order value
       * Expiration date
       * Redemption limits
    7. Click **Save**
  </Tab>

  <Tab title="Auto-Generate">
    Automatically generate unique codes for all partners:

    1. Go to **Coupons → \[Your Coupon]**
    2. Enable **Auto-assign promotion codes**
    3. Configure the code format:
       * **Prefix**—Custom text (e.g., `PARTNER`)
       * **Include name**—Partner's first name
       * **Include surname**—Partner's last name
       * **Include email**—Email prefix
       * **Include discount**—Discount amount
       * **Random characters**—Random suffix
    4. Click **Generate for all partners**

    Example formats:

    * `JOHN20` (name + discount)
    * `PARTNER-JOHN-XY` (prefix + name + random)
    * `JOHNDOE15` (name + surname + discount)
  </Tab>
</Tabs>

<Tip>
  Auto-generated codes are created automatically for new partners when they join your program.
</Tip>

## Partner Experience

Partners can find their promotion codes in the partner portal:

1. Partners log in to their portal
2. Navigate to **Resources** or **My Codes**
3. View and copy their assigned promotion codes
4. Share with their audience

## Tracking Priority

When both a referral link cookie and a promotion code are present, Partnero uses this priority:

1. **Promotion code**—Takes precedence if used at checkout
2. **Referral cookie**—Used if no promotion code is applied

<Info>
  This means a partner's promotion code will get credit even if the customer originally clicked a different partner's referral link.
</Info>

## Best Practices

<AccordionGroup>
  <Accordion title="Use memorable codes">
    Create codes that are easy to remember and share:

    * Partner's name + discount: `JOHN20`
    * Brand + partner: `ACME-SARAH`
    * Short and simple: `SAVE15`
  </Accordion>

  <Accordion title="Consistent formatting">
    Use a consistent format across all partner codes:

    * All uppercase or lowercase
    * Same structure (prefix-name or name-discount)
    * Standard character length
  </Accordion>

  <Accordion title="Set appropriate restrictions">
    Protect your margins with sensible restrictions:

    * **First-time orders**—Prevent repeat discount abuse
    * **Minimum order value**—Ensure profitable transactions
    * **Expiration dates**—Create urgency and control campaigns
    * **Redemption limits**—Cap total discounts given
  </Accordion>

  <Accordion title="Combine with referral links">
    Use both tracking methods for maximum coverage:

    * **Referral links**—For online content, blogs, social media
    * **Promotion codes**—For podcasts, videos, offline promotion
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Codes not syncing">
    * Verify the integration is connected and active
    * Check that sync events are enabled
    * Ensure the coupon has "Sync to \[Platform]" enabled
    * Wait a few minutes—sync may have a slight delay
  </Accordion>

  <Accordion title="Sales not attributed">
    * Confirm the promotion code is assigned to a partner
    * Check that the code was actually applied at checkout
    * Verify the order was processed (not cancelled/refunded)
    * Check the transaction in your payment platform
  </Accordion>

  <Accordion title="Duplicate codes error">
    * Each promotion code must be unique across all coupons
    * Check if the code exists in your payment platform
    * Try adding a unique suffix or prefix
  </Accordion>
</AccordionGroup>

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="How is coupon tracking different from referral link tracking?">
    Referral link tracking uses cookies from clicked links. Coupon tracking uses promotion codes entered at checkout. Both attribute sales to partners, but coupons work in offline channels (podcasts, videos) where links can't be clicked. Many programs use both methods together for maximum coverage.
  </Accordion>

  <Accordion title="Which payment platforms support coupon tracking?">
    Partnero syncs coupons and promotion codes with Stripe, Paddle, WooCommerce, and Shopify. Coupons created in Partnero are automatically synced to your payment platform, and redemptions are tracked in real time.
  </Accordion>

  <Accordion title="Can I auto-generate unique codes for all partners?">
    Yes. Partnero can automatically generate unique promotion codes for every partner using customizable formats (name, discount amount, prefix, random characters). New partners automatically receive codes when they join.
  </Accordion>

  <Accordion title="What happens if a customer uses a coupon but also clicked a referral link?">
    The promotion code takes precedence. If a customer clicked Partner A's referral link but uses Partner B's coupon code at checkout, the sale is attributed to Partner B.
  </Accordion>

  <Accordion title="Can partners see their coupon codes?">
    Yes. Partners can view and copy their assigned promotion codes from the partner portal under Resources or My Codes. They can then share these codes with their audience.
  </Accordion>

  <Accordion title="How do I prevent coupon code abuse?">
    You can set restrictions on promotion codes: first-time orders only, minimum order value, expiration dates, and redemption limits. These protect your margins while still offering partner discounts.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Coupons API" icon="code" href="/api-reference/coupons/create">
    Create and manage coupons via API
  </Card>

  <Card title="Promotion Codes API" icon="ticket" href="/api-reference/promotion-codes/create">
    Create and assign promotion codes via API
  </Card>
</CardGroup>
