Coupon Eligibility and Recurly Subscriptions
Recurly Subscriptions does not feature a native toggle within the coupon creation interface to restrict a coupon based purely on whether a customer is defined as "new" or "existing."
The built-in coupon controls primarily restrict redemption by linking the coupon to a specific subscription plan or to a general customer account.
Enforcing New Versus Existing Customer Restriction
The recommended and most robust way to enforce this kind of restriction is through your external, front-end checkout logic or by making custom application programming interface (API) calls.
1. Validate Customer Status
Your system must first determine the customer's status before attempting to apply the coupon. Use the following methods to confirm if the customer meets your custom criteria:
Review Subscription Data: Export and review the customer's purchase history using the Subscriptions export data. Look at the $activated\_at$ and $expires\_at$ dates on past subscriptions to establish if the customer is new or existing based on your definition.
Use the Accounts API: Make an Accounts API call to retrieve the customer's record and evaluate their history.
2. Conditionally Pass the Coupon Code
Only if the customer successfully meets your defined "new" or "existing" criteria should your system pass the coupon code to the Recurly API during the transaction.
This process ensures that Recurly only attempts to apply the coupon when your external system has already validated the restriction, providing a more reliable and flexible enforcement mechanism.
Comments
0 comments
Please sign in to leave a comment.