Feature #10036
openFeature #10034: Evergreen Anniversary Sale Coupon Management in POS & Service Subscription
Coupon Validation API
100%
Description
A common Coupon Validation API should be provided for both:
POS Checkout
Service Subscription Checkout
The API must validate all coupon eligibility rules before applying the discount.
Validation Checklist
The API should verify:
Coupon exists.
Coupon status is Active.
Current date/time falls within the configured Start and End Date.
Coupon has not expired.
Coupon is applicable to the selected module (POS or Service Subscription).
If Service Subscription:
Validate the selected Service Plan (when coupon is restricted to specific plans).
Validate the customer's claim count against the configured maximum.
Validate Unlimited Claims configuration.
Calculate the discount:
Fixed Amount
Percentage
Ensure the discount does not exceed the cart/subscription total (where applicable).
API Response
If validation succeeds, the API should return:
Coupon ID
Coupon Code
Discount Type
Discount Value
Original Amount
Discount Amount
Final Payable Amount
Validation Status
Validation Message
If validation fails, the API should return an appropriate error message indicating the reason, such as:
Coupon is inactive.
Coupon has expired.
Coupon is not yet active.
Coupon is not applicable for this module.
Coupon is not applicable to the selected service plan.
Maximum redemption limit reached.
Invalid coupon code.
Subtasks
Related issues