Upgrades API storefront setup

The Upgrades storefront APIs allow you to display upgrade offers to customers, track their interactions with those offers, and apply an upgrade when the customer accepts it.

Implementation

  1. Get the upgrade profile

    • Call the Get Upgrade Profile API to fetch the upgrade offer configured for the customer's subscription.
    • Use the response to display the upgrade offer on your storefront.
  2. Track customer interactions

    • Use the Upgrade profile action log API to track customer interactions with the upgrade offer.
      This is required to show accurate upgrade analytics in the Admin Portal.
    • When the upgrade banner is displayed, call the Log api with BANNER_VIEW.
    • When the customer opens the detailed upgrade view, call the Log API with DETAILED_VIEW.
    • When the customer dismisses the offer, call the Log API with DISMISSED.
  3. Apply the upgrade

    • When the customer accepts the upgrade, call the Apply Upgrade Profile API.
    • The Apply Upgrade Profile API automatically records the successful upgrade.
    • You do not need to call the Upgrade Profile Log API separately when the customer accepts the offer.

APIs Used

APIPurpose
Get Upgrade Profile APIFetches the upgrade offer details.
Upgrade Profile Action Log APITracks customer views, detailed views, and dismissals
Apply Upgrade Profile APIApplies the upgrade and automatically records the successful upgrade.

Important

The Upgrade Profile Action Log API is only required for interactions that do not result in an upgrade. If the customer accepts the offer, the Apply Upgrade Profile API handles the upgrade and logging automatically.