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

# Subscription

If a Digital Identity Management User is associated to a Digital Identity Management Subscription entity that represents a paid streaming TV service, then this association itself can define the entitlements that user has to the service. If the service involves a variety of functional capabilities, those functions may be captured as Digital Identity Management Features associated to (i.e., contained within) the Digital Identity Management Subscription entity. For example:

* A customer's records in a billing system would be represented by a Digital Identity Management Account
* A Mobile Service Plan (MSP) under the billing account would be represented by a Digital Identity Management Subscription
* A special capability for the MSP (e.g., unlimited data) may be represented by a Digital Identity Management Feature

How the data from an external system maps to the Account/Subscription/Feature (A/S/F) hierarchy depends on the type of service, the type of service provider, the service provider's billing system, and the business needs defined during the initial integration between the service provider and Digital Identity Management. The Digital Identity Management data model is flexible enough to map most any external record data to the A/S/F hierarchy, but the needs may vary from tenant to tenant.

A Digital Identity Management Subscription is "associated" with its parent Account at the moment the Subscription is created in Digital Identity Management. A Subscription can not exist in Digital Identity Management without a parent or container Account. Conversely, Digital Identity Management Features cannot exist without a parent or container Subscription.

A Digital Identity Management Subscription entity contains the following default properties:

| Property | Definition | Type | Example |
| - | - | - | - |
| `id` | Unique internal identifier for this Subscription. | integer | `7208405` |
| `type` | Specific type of Subscription entity. | string | No default or standard. The Subscription type is pulled from the service provider's external system, through the MarketONE CSP API, and mapped within the Account/Subscription/Feature hierarchy according to a data mapping that is set during the initial onboarding and integration phase between Digital Identity Management and a service provider. |
| `displayName` | Optional display-friendly name for the Subscription. | string | `"My Streaming Service"` |
| `status` | Entity status of the Subscription. | string | `"activated"` |
| `createdDate` | Date on which this entity was created, expressed in UNIX Epoch format. | integer | `1543833950000` |
| `activatedDate` | Date on which this entity was activated, expressed in UNIX Epoch format. | integer | `1543833950000` |
| `updatedDate` | Date on which this entity was last updated, expressed in UNIX Epoch format. | integer | `1621622651675` |
| `suspendedDate` | Date on which this entity was suspended, expressed in UNIX Epoch format. | integer | `1527917430000` |
| `deactivatedDate` | Date on which this entity was deactivated, expressed in UNIX Epoch format. | integer | `1794095435804` |
| `features` | List of all Digital Identity Management Features under this Subscription. | array of Digital Identity Management Feature entities, if any | |
| `attributes` | Additional metadata about the entity. | | |

Subscription entities also contain attributes:

| Attribute | Definition | Type | Example |
| - | - | - | - |
| `subscriptionNumber` | Identifier for the subscription as stored and/or provided by a downstream B/OSS (or other integration) that provides the subscription data. | string | |
| `maxUsers` | The maximum number of users with which this subscription can be shared (i.e., associated). | integer | |
| `paymentProviderSubscriptions` | List of subscriptions as stored in (and provided by) one or more B/OSS (or other integration) that provides subscription data. Each object contains: | array of `PaymentProviderSubscription` objects | |
| `providerSubscriptionId` | Subscription identifier as defined by the service provider. | string | |
| `internalProviderSubscriptionId` | Unique reference subscription identifier generated by the payment provider client when the Subscription was created. Field is optional and only populated if Provider supports it. | string | |
| `productId` | Product unique identifier as defined by the payment provider which was purchased. | string | |
| `subscriptionStartDate` | Date when the subscription was first purchased and started, expressed in UNIX Epoch format. | integer | `1603481359` |
| `subscriptionEndDate` | Date when the subscription ends if it is not renewed, expressed in UNIX Epoch format. | integer | `1603481359` |
| `maxUser` | Maximum number of users that can consume the subscription, as defined by the payment provider. | integer | `5` |
| `productDescription` | Name of the product attached to the service. | string | |
| `billingState` | Current financial state of the subscription. | stringenum, one of: - FREE\_PERIOD - FREE, TRIAL - FREE\_TRIAL - BILLING\_COMPLETED - UNBILLED - GOOD\_STANDING - OTHER | `"UNBILLED"` |
| `serviceStatus` | Status of the subscription as defined by the payment provider. | stringenum, one of: - ACTIVE - ACTIVATION - SUSPENDED - CANCELLED - DELETED - DRYRUN - EXPIRED - INCOMPLETE - LEGACY\_SUSPENDED - TRIALING - UNPAID - PAST\_DUE - UNKNOWN - PROCESSING - PENDING\_ACTIVATION - PENDING\_CANCEL - PENDING\_PAUSE - PENDING\_RESUME - PAUSED - UPGRADED - OTHER | `"PAUSED"` |
| `nextSubscriptionBillingDate` | Date when a recurring subscription will bill the customer for their next period of service, expressed in UNIX Epoch format. | integer | `1603481359` |
| `subscriptionPrice` | Price that was charged to the customer when the subscription was last billed for the current period of service. | float | `7.99` |
| `nextSubscriptionPrice` | Price that will be charged to the customer when their subscription is billed for their next period of service. | float | `9.99` |
| `subscriptionCurrency` | Currency the customer was charged in for the current service cycle, as per [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). | string | `"CAD"` |
| `nextSubscriptionCurrency` | Currency the customer will be charged in for the next service cycle, as per [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). | string | `"CAD"` |
| `purchaseSource` | Source (or channel) of the subscription purchase. | stringenum, one of: - OPERATOR - MARKETPLACE - PUSH\_NOTIFICATION | `"OPERATOR"` |
| `serviceType` | Type of service purchase (i.e., one time purchase, or recurring payments). | stringenum, one of: - RECURRING - ONE\_TIME | `"ONE_TIME"` |
| `additionalFields` | Additional metadata accompanies this `PaymentProviderSubscription`, if any. | string | |
| `paymentMethod` | Payment method used for this subscription. | `PaymentDetail` object (see the `paymentDetail` [Account](r_connectAccountEntity) attribute above for the list of properties) | |
| **Parent topic:**[Digital Identity Management Data Model](../topics/c_connectDataModel) | | | |


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