Nami Public Documentation
Sign In
Nami Documentation
Nami Documentation
  • Get Started
    • Overview
      • Key Concepts
      • Data Collection
      • Built for Privacy
    • Evaluating Nami
    • SDKs
      • Apple Native SDK
      • Android Native SDK
      • Amazon Native SDK
      • Roku Native SDK
      • React Native Cross-Platform SDK
      • Flutter Cross-Platform SDK
      • Unity Cross-Platform SDK
      • Release Notes
        • Find Nami SDK Version
    • Quickstart Guide
  • Subscription Management
    • Overview
    • Products
      • Archive Products
      • Sync Products
    • Entitlements
    • Customer Screen
    • Accounts and Login/Logout
    • Advanced Use Cases
      • Upgrades and Downgrades
      • Supported Purchase Change States by Platform
      • Restoring Purchases
      • Working with Consumable IAPs
  • No Code Paywalls
    • Overview
    • Paywall Creator
      • Using the Creator
      • Paywall Layout
      • Components
        • Editing, Deleting, Reordering
        • Hiding Components
        • Video
        • Collapse
      • Editable Properties
        • Focused Styling
        • Safe Area
      • Conditions
        • Notched Devices
        • Product Entitlements
      • Adding Products
      • Repeating Product Group
      • Product Fields
      • Capabilities
        • Featured Styling
        • Selected Styling
        • Custom Brand Fonts
        • Carousel
        • Trial Eligibility
        • Deeplink Button
        • Introductory Offer Eligibility
        • Login Check
        • Product Groups
        • Conditional Product Groups
        • Offer Eligibility and Purchasing
        • Screenreader Text
        • Personalization Tokens
        • Custom Variables
        • Multipage
        • Custom Data Source
        • Advanced Video Features
        • Product Error States
      • ❓FAQs
        • Designing Paywalls in Figma
        • Guide to Building a Paywall from Scratch
      • 🎁Releases
        • Roadmap
    • Paywall Templates
      • Pacific
      • Pacific Premium
      • Trident
      • Starfish
      • Mantis
      • Venice
      • Venice Premium
      • Honest
      • Catalina
      • Oyster
      • Puffin
      • Marina
      • Beluga
      • Driftwood
      • Lagoon
      • Pisces
      • Aquarius
      • Conch
      • Lionfish
      • Moray
      • Tetra
      • Lighthouse
      • Puffin Tablet
    • Managing Paywalls
      • Archiving a Paywall
      • Duplicate a Paywall
    • Paywall Smart Text
    • Pricing Eligibility States
    • Pricing Eligibility by Platform
    • Nami Paywalls in Different Languages
    • Legacy Paywalls
  • Campaigns
    • Placements
      • Create a Placement
      • Deeplink Placements
      • Archiving a Placement
      • Managing Lots of Placements
      • Export Placements
    • Campaigns
      • Campaign Filters
        • Campaign Use Cases
      • Archiving a Campaign
      • Scheduling a Campaign
      • Campaign Conversion Events
      • Managing Lots of Campaigns
      • Campaign Troubleshooting
    • A/B and Multivariate Testing
      • Selecting an A/B test winner
      • A/B Test Allocation
  • Integrations
    • All Integrations
    • Billing Platforms
      • Apple Integration
        • App Store Setup
          • Privacy Details
        • Platform Integration
        • App Store Server Notifications
        • Store Credentials
          • App Store Connect Shared Secret
          • Apple App Store Connect API
          • Apple In App Purchase
        • Add a Product
        • Platform Sync
        • SDK Integration
        • Troubleshooting
        • Testing and Development
          • Apple Testing Environments
          • Setting up Device Sandbox Test Environment
          • Setting up StoreKit config in Xcode
      • Google Integration
        • Google Play Store Setup
        • Platform Integration
        • Service Account
        • Real-time Developer Notifications
        • Add a Product
        • Platform Sync
        • SDK Setup
        • Troubleshooting
          • Supporting Android minSdkVersion 25 or lower
          • Requested product is not available for purchase
          • Unsupported Version of Play Billing
      • Amazon Appstore Integration
        • Create Amazon Android App
        • Platform Integration
        • Shared Key
        • Real-time Event Notifications
        • Add a Product
        • SDK Integration
        • Testing
      • Roku Integration
        • Platform Integration
        • API Key
        • Transaction Notifications
        • Add a Product
        • SDK Integration
      • Web Integration
    • Analytics Tools
      • Adobe Analytics
      • Amplitude
      • Google Analytics
      • mParticle
      • 3rd-Party Analytics
    • Subscription Management
      • Nami Subscription Management
      • Bring your Own Payment Code
    • CDP Integrations
      • Adobe CDP Integration
      • Amplitude CDP Integration
      • Custom CDP Integration
      • Generic CDP Integration
    • Other Integrations
      • Wicket Labs
      • Webhooks
        • Introduction to the Nami ML Event System
        • Event Types
          • Purchase Status Updates
          • Events for Upgrades, Downgrades, and Crossgrades
        • Event Subscriptions
        • Understanding Transferred Events and Accounts
      • API Access
    • Events Feed
  • Analytics
    • Using Charts
    • Paywall Analytics
      • Impressions
      • Paywall Conversion Rate
      • Sessions
      • Active Devices
    • Subscription Analytics
      • Revenue
      • MRR
      • Purchases
      • Trial Starts
  • Nami Account
    • Manage your Apps
      • Find your Nami App Platform ID
      • Setting up Legal Text for your Apps
    • Organization
      • Configuring Organization Security Policies
      • Billing
    • Invite your Team
      • Roles
    • Manage your Account
      • Two-Factor Authentication (2FA)
Powered by GitBook
On this page
  • Purchase Platforms
  • Events
  • Common Scenarios
  1. Integrations
  2. Other Integrations
  3. Webhooks
  4. Event Types

Events for Upgrades, Downgrades, and Crossgrades

Last updated 1 year ago

Subscriptions that support upgrades, downgrades, and cross-grades can be tricky to understand. Different purchase platforms handle these events in different ways, creating more potential for confusion.

Adding yet another layer of complexity is that apps themselves may wish to handle these events differently than the default behaviors implemented by the purchase platform.

For example, an app that offers a monthly and yearly subscription for the same features works differently than an app selling different quantities of items with their subscription products.

Let's start by looking at some information about how specific purchase platforms handle this and then we'll jump into the events Nami produces and how to use them.

Purchase Platforms

Apple

Apple determines whether a change in the purchased product SKU is an upgrade, downgrade, or cross-grade based on the Subscription Group.

SKUs that should be able to be switched between must be in the same Subscription Group, otherwise, Apple will consider it to be a purchase of a new product.

SKU Change Type
Definition
When does it take effect?

Upgrade

The subscription product is at a higher level (lower number) in the subscription group

Immediately

Downgrade

The subscription product is at a lower level (higher number) in the subscription group

At the start of the next bill term

Crossgrade

The subscription product is at the same level and number in the subscription group

Immediately if bill terms are the same. If they are different, at the next bill term.

Free Trials

Apple always completes the free trial of any purchased product SKU in a subscription group before executing an upgrade, downgrade, or crossgrade.

For some apps, this can result in unexpected behavior if you want to affect a SKU change immediately.

Apple's official documentation:

Events

It is not always possible to determine if an upgrade, downgrade, or crossgrade occurred. The rules are not consistent cross-platform, and the purchase platforms do not always provide enough context around what occurred to enable Nami to apply these labels directly.

The Nami platform handles reporting reliably on these changes by providing 2 events:

Event Name
Description

user.subscription.sku_change

The active purchased SKU for a subscription has changed.

user.subscription.pending_sku_change

The active purchase SKU will change at the start of the next bill term. This event is produced at the time when the customer requests the SKU change.

Additionally, every Nami event produced that contains a list of the current Active Entitlements, will include a field pending_sku_ref_id. This field contains the SKU reference ID (set in the Nami Control Center) for the SKU that will be active after the next renewal occurs.

The list of Active Entitlements is provided in every user.subscription.* event. Below is an example payload.

{
  ...
  "active_entitlements": [
    {
      "name": "Tiered Access",
      "expiration": "2021-08-30T22:58:34+00:00",
      "sku_ref_id": "tier_gold",
      "description": null,
      "last_verified": "2021-08-30T22:55:34.464481+00:00",
      "purchase_platform": "apple",
      "entitlement_ref_id": "tiered_access",
      "pending_sku_ref_id": "tier_bronze"
    }
  ]
  ...
}

Common Scenarios

Pending Downgrade

In this example payload, you can see that the current active SKU is tier_gold but at the start of the next bill term, the customer will be downgraded to tier_bronze.

{
  ...
  "active_entitlements": [
    {
      "name": "Tiered Access",
      "expiration": "2021-08-30T22:58:34+00:00",
      "sku_ref_id": "tier_gold",
      "description": null,
      "last_verified": "2021-08-30T22:55:34.464481+00:00",
      "purchase_platform": "apple",
      "entitlement_ref_id": "tiered_access",
      "pending_sku_ref_id": "tier_bronze"
    }
  ]
  ...
}

Renewal for the same Product SKU

{
  ...
  "active_entitlements": [
    {
      "name": "Tiered Access",
      "expiration": "2021-08-30T22:58:34+00:00",
      "sku_ref_id": "tier_gold",
      "description": null,
      "last_verified": "2021-08-30T22:55:34.464481+00:00",
      "purchase_platform": "apple",
      "entitlement_ref_id": "tiered_access",
      "pending_sku_ref_id": "tier_gold"
    }
  ]
  ...
}

Enabling access to a Pending SKU Change

Apps that sell access to a quantity of items each month may want to grant access to that new quantity immediately on the SKU change, even if the purchase platform has not charged the user and made the change.

When you see the new SKU in the pending_sku_ref_id field, you may optionally use this to change the access tier in your app, even if the purchase platform has not made the change yet.

https://developer.apple.com/app-store/subscriptions/