Skip to main content

Creating a promo code

Navigate to Admin → Promos → Create Promo.
FieldDescription
CodeThe discount code customers enter (e.g. WELCOME20)
Typepercentage — discount as a % of the price; fixed — flat amount off
ValueThe discount value (e.g. 20 for 20% or 5.00 for $5 off)
Max UsesTotal number of times the code can be used (blank = unlimited)
Expires AtOptional expiry date after which the code is invalid
PlansRestrict the code to specific plans (blank = valid on all plans)
ActiveEnable/disable without deleting

How customers apply promo codes

  1. Customer navigates to Order → [Plan]
  2. On the checkout page, there is a Promo Code field
  3. Customer enters the code and clicks Apply
  4. If valid, the discounted price is shown before payment
  5. The discount is applied to the generated invoice

API validation

Codes can also be validated via the API before presenting a checkout UI:
POST /v1/promos/validate
Content-Type: application/json

{
  "code": "WELCOME20",
  "plan_id": 1,
  "cycle_id": 2
}
Response:
{
  "success": true,
  "data": {
    "code": "WELCOME20",
    "type": "percentage",
    "value": 20,
    "discounted_price": 7.99,
    "original_price": 9.99
  }
}

Usage tracking

Each time a promo code is used, the usage count increments. You can view usage stats per code in Admin → Promos. When max_uses is reached, the code is automatically invalidated.