Discount Codes
1. Overview
Discount Codes are a flexible marketing tool in UniBee designed to help you drive sales, acquire new customers, and improve retention. You can create codes that customers enter during checkout to redeem specific offers, such as a percentage off or a fixed amount deduction. Key Capabilities:- Flexible Duration: Set discounts for a single payment, a specific number of months, or forever.
- Granular Control: Limit codes to specific products, plans, or set redemption limits.
- Batch Generation: Create and manage thousands of unique discount codes from a single template for targeted marketing campaigns.
- Analytics: Track who used which code and the total revenue impact.
1.1 Types of Discount Codes
UniBee supports three types of discount codes to suit different business needs:Standard Discount Codes
Create individual discount codes with specific rules in the admin portal. Perfect for general promotions, affiliate tracking, or single-campaign discounts. Features:- Created and managed in the admin dashboard
- Custom discount code names
- Usage limits and restrictions
- Can be reused by multiple customers
Batch Discount Codes
Create a template with unified discount rules and automatically generate up to 10,000 unique discount codes. Ideal for:- Targeted Marketing: Send unique codes to specific users via email campaigns
- Partner Distribution: Pre-generate codes for partners to distribute
- Large-Scale Campaigns: Create massive promotional events with thousands of unique codes
- Limited Distribution: Generate a fixed number of codes to control campaign scale
External Discount Codes ⭐
Dynamically create discounts programmatically via API without pre-configuration. Ideal for:- API Integration: Third-party systems that need to apply discounts
- Dynamic Pricing: Real-time pricing adjustments based on user attributes
- Personalized Offers: Custom discounts for specific users
- A/B Testing: Programmatic discount strategy testing
- Created automatically via API (no admin portal setup needed)
- System-generated unique codes
- Supports one-time or recurring discounts
- Perfect for programmatic discount management
💡 Looking for programmatic discount creation? See the External Discount Codes guide for API-based discount management.
2. Creating a Discount Code
To create a new discount code, navigate to the Discount Code section in the UniBee Dashboard and click New Discount.Configuration Guide
When configuring a discount, you will define the following parameters:| Field | Description | Example |
|---|---|---|
| Name | An internal name for tracking the campaign. This is not visible to customers. | Summer Sale 2024 |
| Code | The actual string the customer enters at checkout. You can customize this or auto-generate it. | SUMMER20 |
| Discount Type | Percentage: Discounts a specific % off the total. Fixed Amount: Deducts a specific currency amount. | 20% off $10.00 off |
| Applies to | All Products: Valid for any purchase. Specific Products/Plans: The code only works if the cart contains specific items. | Premium Plan - Yearly |
| Redemption Limits | Total Limit: Total times the code can be used globally. Per User: How many times a single customer can use this code. | First 100 users 1 per customer |
| Valid Date | Set a start date and an expiration date for the campaign. | Nov 1st to Nov 30th |
3. Understanding Duration (For Subscriptions)
For recurring subscriptions, the Duration setting determines how long the discount applies to the user’s billing cycle.-
One-time:
The discount applies only to the first invoice. Subsequent renewals will be charged at the full price.
- Best for: Sign-up bonuses.
-
Forever:
The discount applies to every invoice indefinitely, as long as the subscription is active.
- Best for: Employee discounts, “Grandfathered” pricing, or special partner rates.
-
Repeating:
The discount applies for a specific number of billing cycles (e.g., 3 months) and then expires.
- Best for: Retention campaigns (e.g., “50% off for the first 3 months”).
4. Best Practice Use Cases
Here are common scenarios you can implement using UniBee Discount Codes:Scenario A: New User Acquisition (The “Welcome Offer”)
Encourage visitors to sign up by offering a discount on their first payment.- Type: Fixed Amount ($10 off) or Percentage (10% off).
- Duration: One-time.
- Limit: 1 per user.
Scenario B: Long-term Plan Conversion
Incentivize users to switch from a Monthly plan to a Yearly plan.- Type: Percentage (e.g., 15% off).
- Duration: Forever (Applied to the yearly subscription).
- Applies to: Specific Plan (Yearly Plan only).
Scenario C: Churn Reduction / Win-back
When a user attempts to cancel, or for users who churned recently, offer a temporary discount to win them back.- Type: High Percentage (e.g., 50% off).
- Duration: Repeating (e.g., 2-3 months).
- Strategy: Gives the user a lower price point to re-experience the value of your product.
Scenario D: Affiliate/KOL Tracking
Create unique codes for partners or influencers to track their performance.- Code:
MIKE_YOUTUBE - Tracking: Use the “View Usage” feature in the dashboard to see how many transactions were generated by this specific code.
Scenario E: Batch Targeted Campaign
Use Batch Discount Codes for large-scale targeted marketing campaigns.- Method: Create a batch template with unified discount rules
- Generation: Automatically generate thousands of unique codes
- Distribution: Send individual codes to specific users (e.g., via email)
- Tracking: Monitor usage of each individual code to track campaign effectiveness
- Example: Generate 1,000 unique 20% off codes for a VIP customer email campaign
5. How Customers Use Codes
On Hosted Checkout
If you are using UniBee’s Hosted Checkout Page, the “Add promotion code” field is built-in.- The customer clicks “Add promotion code”.
- enters the code (e.g.,
SAVE20). - The system validates the code and instantly updates the Total amount.
Via API
If you use a custom frontend, you can apply discounts programmatically or via user input.- API Parameter: Pass the
discountCodefield when creating aSubscriptionorCheckout Session. - Validation: The API will return an error if the code is expired, invalid, or not applicable to the selected plan.
6. Management & Reporting
- View Usage: Click on any active discount code to see a detailed log of every redemption, including the User ID, Transaction ID, and Date.
- Archive: When a campaign ends, you can Archive the code. This prevents new users from redeeming it, but does not affect existing subscriptions that have already applied the code (e.g., a user in month 2 of a 3-month repeating discount will still get their discount).

