When selling subscriptions across platforms such as the Apple App Store, Google Play Store, or the web, it’s essential to track subscription changes in your backend. This ensures accurate provisioning of content and timely communication with end users.
Billing platforms use webhook notifications or events to communicate subscription state changes to external systems. However, each platform manages subscription states and events differently, adding complexity to handling these events.
Chargebee’s Omnichannel events simplify this process by providing a unified event representation. This allows you to integrate as though you are working with a single billing system while Chargebee handles platform-specific complexities for you.
Events from various billing platforms are consumed by Chargebee through the webhook notification URL configured in each respective platform.
When a purchase is recorded in Chargebee using the Record a Purchase API, Chargebee initiates a background job to process that purchase. Upon successful completion of this job, Chargebee returns the following event:
Chargebee Event |
Description |
|
omnichannel_subscription_created will be triggered when an omnichannel subscription is successfully created in Chargebee. If there are any transactions (purchases or renewals) recorded after the initial transaction, we emit the omnichannel_subscription_imported event instead of omnichannel_subscription_created . In this scenario, the imported omnichannel subscription resource will include only two transactions: the initial_purchase_transaction and the most recent transaction. Note:
|
The record_purchase_failed event will be triggered when recording a purchase fails to create an omnichannel subscription in Chargebee.
The status of the recorded purchase will be changed to failed , and the error details will be available in the error_detail field.
|
The table below outlines various scenarios in which the Apple App Store triggers notifications or events. It details the types and sub-types of these notifications and the corresponding omnichannel subscription events triggered by Chargebee.
ignored
, even if we support those event types.
Notification Type |
Subtype |
Chargebee’s Response |
|
|
Scenario: When a subscription item successfully auto-renews. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
Scenario: When a subscription item successfully auto-renews with a different product ID. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When the subscription that is in the Description: A subscription that is in the Subscription item status:
Chargebee webhooks triggered:
|
|
|
|
Scenario: When a customer resubscribes to any subscription item from the same subscription group as their expired subscription. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When a customer upgrades to a subscription item that has a higher level than the currently subscribed item from the same subscription group. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
Scenario: When a customer downgrades to a subscription item that has a lower level than the currently subscribed item from the same subscription group. Description: The subscription is scheduled for change with The Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When a customer reverts to the previous subscription, effectively canceling their downgrade. Description: The subscription scheduled for change is removed. The ID of the Subscription item status:
Chargebee webhooks triggered:
|
|
|
|
Scenario: When a subscription item fails to renew due to a billing issue, the subscription enters into a grace period. Description: An item's subscription has failed to renew due to a billing issue, and the subscription is in the grace period. The grace period is decided based on the configuration in the App Store for a maximum of 28 days. Continue to provide service through the grace period while billing is retried. Subscription item status:
Chargebee webhooks triggered:
|
Scenario: When a subscription item fails to renew due to a billing issue, the subscription enters a billing retry period. Description: An item's subscription has failed to renew due to a billing issue, and the subscription is in a dunning period. The App Store continues to retry billing for 60 days, or until the customer resolves their billing issue or cancels their subscription, whichever comes first. You can stop providing the subscription service upon receiving this notification. Subscription item status:
Chargebee webhooks triggered:
|
||
|
|
Scenario: When the grace period of the subscription item expires, and the subscription continues in billing retry. Description: The grace period of an item's subscription is over and billing retry is still attempted. Upon receiving this notification, the omnichannel subscription state is changed from The App Store continues to retry billing for the remaining days after the grace period, up to a maximum of 60 days, or until the customer resolves their billing issue or cancels their subscription, whichever comes first. Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When the subscription of an item expires because the customer chooses to cancel it. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
Scenario: When the subscription for an item expires if the customer does not consent to a price increase for the subscribed item that requires their approval. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When the subscription for an item expires if the developer removes the associated subscription item from sale, causing the renewal to fail. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When the subscription for an item expires if the billing retry period ends without successfully recovering the subscription. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When a subscription to an item expires without any specific reason. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
|
|
Scenario: When a customer cancel the subscription Description: The subscription is cancelled at the Subscription item status:
Chargebee webhooks triggered:
|
|
Scenario: When a customer subscribes again after canceling a subscription. Description: The cancellation is removed for the subscription and it is auto renewed at the Subscription item status:
Chargebee webhooks triggered:
|
|
|
|
Scenario: When the subscription for an item is refunded. Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When a refund for a subscription is reversed. Description: The refund for the subscription is reversed. The subscription becomes Subscription item status:
Chargebee webhooks triggered:
|
The table below outlines various scenarios in which the Google Play Store triggers notifications or events. It details the types of these notifications and the corresponding omnichannel subscription events triggered by Chargebee.
Here is the link to Google's Real Time Developer Notifications.
Chargebee will process the events associated with a subscription purchase only if they are recorded with Chargebee. Otherwise, incoming events will be marked as ignored, even if we support those event types.
Chargebee currently ignores notification types not listed in the following table. Support for these will be included in future releases.
While changing the subscription, Google provides multiple replacement modes. Currently, Chargebee only handles CHARGE_PRORATED_PRICE
and DEFERRED
modes.
Notification Type |
Chargebee’s Response |
|
Scenario: When a subscription item successfully auto-renews. Description: The Subscription item status:
Chargebee webhooks triggered:
|
Scenario: When a subscription item successfully auto-renews with a different product ID Description: The Subscription item status:
Chargebee webhooks triggered:
|
|
|
Scenario: When a customer changes the subscription from the currently subscribed item to a different item with the Description: When the replacement mode is Subscription item status:
Chargebee webhooks triggered:
|
Scenario: When a customer changes the subscription from the currently subscribed item to a different item with the Description: When the replacement mode is Subscription item status:
Chargebee webhooks triggered: |
|
|
Scenario: When a customer cancels the subscription. Description: The subscription is canceled at the Subscription item status: The Chargebee webhooks triggered:
|
|
Scenario: When the subscription of an item expires because the customer chooses to cancel it. Description: The Subscription item status:
Chargebee webhooks triggered:
|