Subscriptions
Entitlements
An example of what an active subscription entitlement might look like:
{
"id": "6082986545bb91774914a5ad",
"userId": "60817e436b2f070007e55d79",
"source": "appStore",
"sourceProductId": "60745ea1b1a935bd02567a59",
"subscriptionGroup": "fibricheck",
"subscriptionTier": "essential",
"statusCategory": "engaged",
"status": "active_with_renewal",
"expireTimestamp": "2021-04-22T16:50:38.000Z",
"creationTimestamp": "2021-04-23T09:50:29.078Z"
}A brief explanation of the fields:
userIdThe id of the user the subscription entitlement belongs to.
sourceThe source of the subscription entitlement. The name of a payment vendor unless otherwise defined.
sourceProductIdThe id of the product as defined by the payment vendor specific implementation.
subscriptionGroupThe name of the subscription group which could contain multiple subscription tiers.
subscriptionTierThe name of subscription tier which could represent multiple different products in the same tier within a subscription group.
statusCategoryThe name of the category the entitlement status belongs to. More information is found in the Entitlement Statuses and Status Categories section.
statusThe name of the status the subscription entitlement is in. More information is found in the Entitlement Statuses and Status Categories section.
Entitlement Statuses and Status Categories
Each Entitlement Status belongs to a Status Category. A list of each category and the statuses that belong to them:
acquiringusing_free_trialusing_introductory_pricingusing_promotion
engagedactive_with_renewal
active_but_losingactive_without_renewalswitching_productawaiting_price_change_confirmationin_grace_period
inactive_and_losingin_billing_retry
lostexpired_voluntarilyswitched_productexpired_from_billingfailed_to_confirm_price_changerevokedrefundedrefunded_for_issue
In the next section the specific Status Categories and their statuses are explained in more detail.
The acquiring Status Category
acquiring Status CategoryStatuses in this category indicate the subscription is active but using a free trial or reduced pricing.
The
using_free_trialStatus.An active subscription using a free trial.
The
using_introductory_pricingStatus.An active subscription using a reduced introductory pricing.
The
using_promotionStatus.An active subscription using a reduced pricing by offer code or other promotion mechanism.
The engaged Status Category
engaged Status CategoryStatuses in this category indicate the subscription is active and will automatically renew at the end of the current subscription period.
The
active_with_renewalStatus.An active subscription which will automatically renew at the end of the current subscription period.
The active_but_losing Status Category
active_but_losing Status CategoryStatuses in this category indicate the subscription is active but will not automatically renew at the end of the current subscription period.
The
active_without_renewalStatus.An active subscription for which the user chose to no longer automatically renew after the current subscription period.
The
switching_productStatus.An active subscription for which the user chose to switch to another product at the end of the current subscription period.
The
awaiting_price_change_confirmationStatus.An active subscription where the product changed its price. Confirmation by the user is required before the subscription can be automatically renewed.
The
in_grace_periodStatus.An active subscription for which automatic renew failed. Automatic renewal is retried but user action may be required to resolve the reason the renewal failed.
The inactive_and_losing Status Category
inactive_and_losing Status CategoryStatuses in this category indicate the subscription is no longer active but automatic attempts are performed to reactivate the subscription.
The
in_billing_retryStatus.An inactive subscription for which automatic renewal failed. Automatic renewal is retried but user action may be required to resolve the reason the renewal failed.
The lost Status Category
lost Status CategoryStatuses in this category indicate the subscription is no longer active and no automatic attempts will be performed to reactivate the subscription.
The
expired_voluntarilyStatus.An inactive subscription for which the user chose to no longer automatically renew.
The
switched_productStatus.An inactive subscription for which the user chose to change to another product.
The
expired_from_billingStatus.An inactive subscription for which automatic renewal failed and is no longer retried.
The
failed_to_confirm_price_changeStatus.An inactive subscription where the product changed its price. The user did not perform the required confirmation.
The
revokedStatus.An inactive subscription for which the payment provider decided to revoke access to.
The
refundedStatus.An inactive subscription for which the user was refunded.
The
refunded_for_issueStatus.An inactive subscription for which the user was refunded after reporting an issue.
Events
All subscription events are also published to the Events Service. The type of the published Events Service event is prefixed with payments.subscriptions. So, for the started_with_free_trial subscription event, an event in the Events Service is published with "type": "payments.subscriptions.started_with_free_trial".
For example a started_with_free_trial Event might look like this:
{
"id": "608036c95fd8eaae0f83bdc0",
"userId": "6080362459080100071a3da2",
"source": "appStore",
"sourceProductId": "60745e99b1a9352cbd567a58",
"subscriptionGroup": "fibricheck",
"subscriptionTier": "essential",
"type": "started_with_free_trial",
"expireTimestamp": "2021-04-21T14:31:26.000Z",
"creationTimestamp": "2021-04-21T14:29:29.882Z"
}The following fields are common for all events:
userIdThe id of the user the subscription event belongs to.
sourceThe source of the subscription event. The name of a payment vendor unless otherwise defined.
sourceProductIdThe id of the product as defined by the payment vendor specific implementation.
subscriptionGroupThe name of the subscription group which could contain multiple subscription tiers.
subscriptionTierThe name of subscription tier which could represent multiple different products in the same tier within a subscription group.
eventTimestampThe moment the event happened, as reported by the payment vendor.
creationTimestampThe moment the event was created in our system.
Fields specific to their event type are documented together with the event types below.
Event Types
A list of all event types, a brief description and the event specific fields:
The
startedEvent.The user its first subscription started.
The subscription will be active until the date reported by the
expireTimestampfield.The
started_with_free_trialEvent.The user its first subscription started using a free trial.
The subscription will be active until the date reported by the
expireTimestampfield.The
started_with_introductory_pricingEvent.The user its first subscription started using a reduced introductory pricing.
The subscription will be active until the date reported by the
expireTimestampfield.The
started_with_promotionEvent.The user its first subscription started by using an offer code (App Store) or other promotion mechanism.
The subscription will be active until the date reported by the
expireTimestampfield.The
promotionReferencefield contains a reference to the relevant promotion campaign.The
renewedEvent.Time was added to the subscription.
The subscription will be active until the date reported by the
expireTimestampfield.The
renewed_with_free_trialEvent.The user renewed its subscription using a free trial.
The subscription will be active until the date reported by the
expireTimestampfield.The
renewed_with_introductory_pricingEvent.The user renewed its subscription using a reduced introductory pricing.
The subscription will be active until the date reported by the
expireTimestampfield.The
renewed_with_promotionEvent.The user renewed its subscription using an offer code (App Store) or other promotion mechanism.
The subscription will be active until the date reported by the
expireTimestampfield.The
promotionReferencefield contains a reference to the relevant promotion campaign.The
renewal_disabledEvent.The user chose to disable automatic renewal of their subscription.
If set, the date reported by the
expireTimestampfield indicates the adjusted moment of expiry.The
renewal_enabledEvent.The user chose to enable automatic renewal of their subscription.
If set, the date reported by the
expireTimestampfield indicates the adjusted moment of expiry.The
expired_voluntarilyEvent.The user chose to disable automatic renewal and the active subscription period ended.
The
switching_productEvent.The user requested to switch to another product at the end of the current active subscription period.
The product the user requested to switch to is reported by the
newProductIdfield.The
switched_productEvent.The subscription for this product ended because the user switched to another product.
The product the user switched to is reported by the
newProductIdfield.The
grace_period_startedEvent.Automatic renewal failed but the subscription is still active and other automatic renewal attempts will be made.
If set, the date reported by the
expireTimestampfield indicates the adjusted moment of expiry.The
billing_retry_startedEvent.Automatic renewal failed and the subscription is no longer active. Other automatic renewal attempts will still be made.
The
expired_from_billingEvent.Automatic renewal failed and the subscription is no longer active. No automatic renewal attempts will be performed.
The
price_change_confirmation_requestedEvent.The price of the subscription product changed. Confirmation from the user is required to continue automatic renewal of the subscription.
The
failed_to_confirm_price_changeEvent.The user did not perform the required price change confirmation and the active subscription period expired.
The
revokedEvent.The payment provider decided to revoke access from this user for this subscription.
The
refundedEvent.The user was refunded for this subscription and no longer has access.
The subscription will be active until the date reported by the
expireTimestampfield.The
refunded_for_issueEvent.The user was refunded after reporting an issue for this subscription and no longer has access.
The subscription will be active until the date reported by the
expireTimestampfield.
Last updated