Skip to main content

Configure retainable discounts

Retainable discounts are discounts that are retained when you change the payment plan of a product or edition of a product. For example, when you change the number of users of an edition or product, or if you change the type of product edition, the payment plan changes.

You set the retainable property when you create a discount for a product. See Create discounts.

Discounts apply to the subscription that is created when someone purchases a product and enters a discount code, or if you set the discount to automatically apply during checkout.

Set retainable = true to keep the discount when payment plans change. The discount is only retainable if the discount is still in effect for the product, edition, and payment plan.

The retainable property has no effect on the following:

  • If you change only the number of units in an edition, the retainable property does not affect the discount because the payment plan does not change.
  • When you extend a contract that has a discount that is still in effect, the discount is retained regardless of how the retainable property is set.

You can have only one discount on an edition at a time. If you enter a discount on an edition that already has a retainable discount, the second discount replaces the first. You must configure the second discount to be retainable to keep it if you change the payment plan or edition.

To configure retainable discounts, set the retainable property to true in one of the following API requests:

Example: Create a retainable discount

    curl -X post \
https://example.byappdirect.com/api/channel/v1/discounts
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"code": "Holiday12345",
"type": "FIXED_PRICE",
"price": 25,
"description": "$25 holiday discount",
"expirationDate": 1551330000000,
"autoApply": false,
"retainable": true
}'

Response

    {
"id": 822,
"code": "Holiday12345",
"redemptions": 0,
"maxRedemptions": null,
"createdOn": 1548943564888,
"startDate": null,
"expirationDate": 1551330000000,
"type": "FIXED_PRICE",
"percentage": null,
"price": 25,
"description": "$25 holiday discount",
"applicationName": null,
"applicationId": null,
"editionId": null,
"paymentPlanId": null,
"autoApply": false,
"billingCycles": null,
"retainable": true,
"redemptionRestriction": "NONE",
"vendorSharePercentage": 0,
"partnerSharePercentage": 100,
"basePartnerSharePercentage": 0,
"unit": null,
"minUnits": 0,
"maxUnits": 0,
"resellerCompanyId": null,
"industryId": null
}

Was this page helpful?