How to view & export subscription status?

Modified on: Wed, 19 Apr, 2023 at 1:42 PM

Scope

How to view the list of subscriptions by status?

How to download the status of the subscription?

How to export subscription status via UI & API?

How to view the subscription status respective to the customer?

Summary

Chargebee allows you to view, and export subscriptions by status from UI (Subscription Index page, Import & Export Data) & via API. With the recent UI enhancement on PC 2.0, you can view the subscription status for a customer from Subscription Index Page. 


Solution

View Subscription Status View in Leap UI

On the customer page, the number of active and canceled subscription statuses was missing in Leap UI. With the recent UI enhancement on PC 2.0, now you can see the number of subscription statuses on the customer page.

Now you can see the active subscription information of a customer with multiple subscription statuses. This helps you and the support team to look through the details without navigating to the customer details page. We have done the following improvements.

  • On Customer Index Page, the first active subscriptions appear. This will minimize the cost of an operation such as a view subscription for a customer.

  • The subscriptions will be sorted as per the order mentioned below.
    1. Active - These subscriptions are charged based on the plan, add-ons, and billing period.
    2. Future - Subscriptions that are going to be In Trial or Active state on the specified date.
    3. In Trial - Active subscriptions that are in the In Trial state.
    4. Paused - Active subscriptions that are temporarily stopped.
    5. Non-Renewing - Subscriptions that are scheduled to cancel and will no longer renew. \
    6. Cancelled - Inactive subscriptions that will no longer renew.


Refer to this link for a quick demo video.


To know more about the recent UI enhancements on PC 2.0, refer to this link.


Export Subscription data via UI:

 I. Subscription Index Page

Go to the Subscription Index Page and you can download the report using Advanced Filter Options from 'Filter List'. Click on Filter list > Subscription > Status


You can also use multiple filters if required and then you can click on Export and download it using Export as CSV.


II. Import & Export Data:

Navigate to Settings > Import & Export Data > Export Data > Subscription > Select criteria to export.

You can download the report for current subscriptions that include the Active, Non-Renewing statuses. You can choose the subscription statuses from 'Status > Includes > Active, Non-Renewing'. You can also include other statuses such as Trial and Future as per your business requirements. 

You can 'Preview' the data and 'Export' as a CSV file. 


Export Subscription status via API

Getting status for all subscriptions (limit set as 5).

$all = ChargeBee_Subscription::all(array("limit" => 5));
foreach($all as $entry){
  $subscription = $entry->subscription();
  echo  "SubID:" . $subscription->id . " - SubStatus: " . $subscription->status . "<br />";
}

 

Getting the status of a particular subscription:

$subscription_id="<replace-with-subscription-id>";
$result = ChargeBee_Subscription::retrieve($subscription_id);
$subscription = $result->subscription();
echo "$subscription->status";


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.
×