application/jsonregistered_before, first_purchase_only, applicable_slugs) are composable, so a single coupon can combine them. sticky_for_renewal + razorpay_offer_id apply to recurring plans only - razorpay_offer_id must be created in the Razorpay Dashboard first (Razorpay Offers cannot be created via API) and pasted in here.code, discount_type, discount_value, valid_from, valid_till, plus optional eligibility/scope fields200 - coupon created403 - not an admin | 409 - code already existsAuthorization: Bearer ********************{
"applicable_slugs": [
"sage-monthly",
"sage-quarterly",
"sage-half-yearly",
"sage-yearly",
"guru-monthly",
"guru-quarterly",
"guru-half-yearly",
"guru-yearly"
],
"campaign_tag": "first_purchase_plan",
"code": "FIRSTPLAN20",
"description": "20% off your first Sage or Guru \n subscription (capped at Rs 200), locked in for renewals",
"discount_type": "percent",
"discount_value": 20,
"first_purchase_only": true,
"is_active": true,
"max_discount_amount": 200,
"max_redemptions_per_user": 1,
"sticky_for_renewal": true,
"valid_from": 1752739200000,
"valid_till": 1760688000000
}curl --location 'https://uat-api.hastaai.in/api/v1/admin/coupons' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"applicable_slugs": [
"sage-monthly",
"sage-quarterly",
"sage-half-yearly",
"sage-yearly",
"guru-monthly",
"guru-quarterly",
"guru-half-yearly",
"guru-yearly"
],
"campaign_tag": "first_purchase_plan",
"code": "FIRSTPLAN20",
"description": "20% off your first Sage or Guru \n subscription (capped at Rs 200), locked in for renewals",
"discount_type": "percent",
"discount_value": 20,
"first_purchase_only": true,
"is_active": true,
"max_discount_amount": 200,
"max_redemptions_per_user": 1,
"sticky_for_renewal": true,
"valid_from": 1752739200000,
"valid_till": 1760688000000
}'{
"success": true,
"message": "Coupon created successfully"
}