> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Subscribers to Upgrade Subscriptions Using a Coupon

You can enable subscribers to redeem a coupon for a discounted upgrade to a superior subscription (as defined by you) using your self-care portal, with the upgrade taking effect immediately. To enable this functionality, you must use the Subscribe APIs.

* **Use Case Number:** 2-4-11
* **Completed By:** Software Developer
* **Estimated Completion Time:** 1 day

## Basic Scenario

An eligible subscriber logs in to your self-care portal and enters a Coupon Code to upgrade their Subscription at a discount. The subscriber's existing Subscription must be in Good Standing, or in Soft or Hard Error, and the Subscription end date must not be in the past.

## Design Approach

As shown in the following diagram, you must post the change and coupon campaign code to the subscription endpoint, indicating which products/items on the subscription are to be replaced, and optionally providing a new billing plan if the billing frequency is also going to change.

If the upgrade fails due to an inability to collect funds, you must request a new payment method using PMT and resubmit the subscription upgrade with Coupon with a new payment method.

<img src="https://mintcdn.com/amdocs-slm/ifa3y22T11JlqvtT/portal/vindiciaSubscribeAndNewRetain/subscribeUseCases/images/2411_upgradeWithCampaignWithImmediateEffect.png?fit=max&auto=format&n=ifa3y22T11JlqvtT&q=85&s=36bd23a5b0f5b9fb6259cc6f5ff6f578" alt="" width="1189" height="625" data-path="portal/vindiciaSubscribeAndNewRetain/subscribeUseCases/images/2411_upgradeWithCampaignWithImmediateEffect.png" />

* **[Upgrade Subscriptions with Coupons Using Subscribe APIs](../topics/2411_r_upgradeSubscriptionCoupon#)**

**Parent topic:**[Subscription Upgrades & Downgrades](../topics/r_subscriptionUpgradesDowngrades)

## Upgrade Subscriptions with Coupons Using Subscribe APIs

Set up a Coupon Code for the upgrade (see [Set Up Coupon Codes](2110_r_configureCouponCodes#)).

To enable your subscribers to upgrade their Subscriptions using Coupon Codes:

1. POST the subscription change to the subscriptions endpoint.

   You must provide Subscribe with the following information to perform the upgrade through the API:

   * The item ID on the subscription that you wish to replace/upgrade. (An item represents a current product on the subscription.)
   * The old Product ID for the item being upgraded.
   * The new Product ID for the upgrade.
   * A new item ID for the item being created (this identifies the new product being added to the subscription).
   * (optional) The new Billing Plan ID. (Only required if you wish to change to a new Billing Plan.)
   * The date when the upgrade is effective. (options: `effective_date=today` or `effective_date=nextBill`)
     * This use case specifies today to have an immediate effect.
   * Whether the upgrade is prorated. (options: `billing_prorated_period=true` or `false`)
   * The campaign code to use for the coupon.
     **Sample Code**

   [https://github.com/Vindicia/SubscribeRESTCodeSamples/blob/master/Autobill/subscription\_modify\_monthly\_to\_annual\_with\_coupon.txt](https://github.com/Vindicia/CashBoxRESTCodeSamples/blob/master/Autobill/subscription_modify_monthly_to_annual_with_coupon.txt)

2. If the upgrade fails due to inability to collect funds, request a new payment method from the subscriber using PMT and resubmit the change with the new Payment Method VID.

* The Subscription contains the new product and the old one has been marked as removed.
* The new Billing Plan is in place (if applicable).
* Future billings are correctly predicted.
* The Account has been granted appropriate Entitlements.
* A Transaction is generated if applicable, including any applicable taxation.
* The Promotional rate is reflected in current and future transactions, if applicable.
* The Coupon Code has been marked as redeemed.

**Parent topic:**[Enable Subscribers to Upgrade Subscriptions Using a Coupon](../topics/2411_r_upgradeSubscriptionCoupon#)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.