API Version
Product Catalog
Library
This resource unifies representation of a Subscription item across multiple source.
Note: This resource represents in-app subscriptions made on Apple App Store and Google Play Store.

Sample omnichannel subscription item [ JSON ]

{ "omnichannel_subscription_item_scheduled_change": { "omnichannel_subscription_item_id": "__test__osi_BXswds133lf1", "scheduled_at": 1739345778, "change_type": "downgrade", "object": "omnichannel_subscription_item_scheduled_change", "current_state": { "item_id_at_source": "com.example.landmarks.premium" }, "scheduled_state": { "item_id_at_source": "com.example.landmarks.basic" } } }

API Index URL GET

https://{site}.chargebee.com/api/v2/omnichannel_subscription_items

Model Class

chargebee.omnichannel_subscription_item
id
string, max chars=40
Uniquely identifies a omnichannel_subscription_item.
item_id_at_source
string, max chars=100
Product ID in the source.
item_parent_id_at_source
optional, string, max chars=100
The parent name of the product ID in the source.
status
enumerated string
Status of the omnichannel_subscription_item. Learn more about status and their mapping with the store's status.
Possible values are
activeWhen the subscription associated with the omnichannel_subscription_item is activeexpiredWhen the subscription associated with the omnichannel_subscription_item is expiredcancelledWhen the subscription associated with the omnichannel_subscription_item is cancelledin_dunningWhen the subscription associated with the omnichannel_subscription_item is in_dunningin_grace_periodWhen the subscription associated with the omnichannel_subscription_item is in_grace_periodpausedWhen the subscription associated with the omnichannel_subscription_item is paused
activeWhen the subscription associated with the omnichannel_subscription_item is activeexpiredWhen the subscription associated with the omnichannel_subscription_item is expiredcancelledWhen the subscription associated with the omnichannel_subscription_item is cancelledin_dunningWhen the subscription associated with the omnichannel_subscription_item is in_dunning
in_grace_periodWhen the subscription associated with the omnichannel_subscription_item is in_grace_periodpausedWhen the subscription associated with the omnichannel_subscription_item is paused
Show all values[+]
auto_renew_status
optional, enumerated string
The renewal status for the omnichannel_subscription_item.
Possible values are
offThe auto-renewal of omnichannel_subscription_item is disabled.onThe auto-renewal of omnichannel_subscription_item is enabled.
offThe auto-renewal of omnichannel_subscription_item is disabled.onThe auto-renewal of omnichannel_subscription_item is enabled.
Show all values[+]
current_term_start
optional, timestamp(UTC) in seconds
Start of the current billing period of the subscription item. It is applicable only if the status is active.
current_term_end
optional, timestamp(UTC) in seconds
End of the current billing period of the subscription item. It is applicable only if the status is active.
expired_at
optional, timestamp(UTC) in seconds
Indicates timestamp when the subscription associated with the omnichannel_subscription_item was expired in the source
expiration_reason
optional, enumerated string
Specifies the reason for the subscription expiration.
Possible values are
billing_errorIndicates a billing error, such as the customer's payment information being invalid.product_not_availableIndicates that the product was unavailable for purchase at the time of renewal.otherIndicates that the subscription associated with the item expired for an unspecified reason.
billing_errorIndicates a billing error, such as the customer's payment information being invalid.product_not_availableIndicates that the product was unavailable for purchase at the time of renewal.otherIndicates that the subscription associated with the item expired for an unspecified reason.
Show all values[+]
cancelled_at
optional, timestamp(UTC) in seconds
Indicates timestamp when the subscription associated with the omnichannel_subscription_item was cancelled in the source
cancellation_reason
optional, enumerated string
The reason of canceling the subscription.
Possible values are
customer_cancelledIndicates that the subscription was voluntarily cancelled by the customer.customer_did_not_consent_to_price_increaseIndicates that the customer did not consent to the price increase for the subscription item.refunded_due_to_app_issueIndicates that the subscription was cancelled and refunded due to the app issue.refunded_for_other_reasonIndicates that the subscription was cancelled and refunded for another reason.merchant_revoked
customer_cancelledIndicates that the subscription was voluntarily cancelled by the customer.customer_did_not_consent_to_price_increaseIndicates that the customer did not consent to the price increase for the subscription item.refunded_due_to_app_issueIndicates that the subscription was cancelled and refunded due to the app issue.refunded_for_other_reasonIndicates that the subscription was cancelled and refunded for another reason.
merchant_revoked
Show all values[+]
grace_period_expires_at
optional, timestamp(UTC) in seconds
Indicates timestamp when the grace period of subscription associated with the omnichannel_subscription_item expires in the source
resumes_at
optional, timestamp(UTC) in seconds
Indicates timestamp when the subscription automatically resumes after being set to paused.
has_scheduled_changes
boolean, default=false
Indicates whether the omnichannel_subscription_item has any scheduled changes.
resource_version
optional, long
Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource.
upcoming_renewal
Show attributes [+]
optional, upcoming_renewal
This field contains information about the upcoming renewal. It is present only if the source provides renewal information (currently available only for Google Play Store purchases) and the omnichannel_subscription_item's auto_renew_status is set to on to renew for the next term. Otherwise, this field is absent.
id id
string, max chars=40
Uniquely identifies a omnichannel_subscription_item.
item_id_at_source item_id_at_source
string, max chars=100
Product ID in the source.
item_parent_id_at_source item_parent_id_at_source
optional, string, max chars=100
The parent name of the product ID in the source.
status status
enumerated string
Status of the omnichannel_subscription_item. Learn more about status and their mapping with the store's status.
Possible values are
activeWhen the subscription associated with the omnichannel_subscription_item is activeexpiredWhen the subscription associated with the omnichannel_subscription_item is expiredcancelledWhen the subscription associated with the omnichannel_subscription_item is cancelledin_dunningWhen the subscription associated with the omnichannel_subscription_item is in_dunningin_grace_periodWhen the subscription associated with the omnichannel_subscription_item is in_grace_periodpausedWhen the subscription associated with the omnichannel_subscription_item is paused
activeWhen the subscription associated with the omnichannel_subscription_item is activeexpiredWhen the subscription associated with the omnichannel_subscription_item is expiredcancelledWhen the subscription associated with the omnichannel_subscription_item is cancelledin_dunningWhen the subscription associated with the omnichannel_subscription_item is in_dunning
in_grace_periodWhen the subscription associated with the omnichannel_subscription_item is in_grace_periodpausedWhen the subscription associated with the omnichannel_subscription_item is paused
Show all values[+]
auto_renew_status auto_renew_status
optional, enumerated string
The renewal status for the omnichannel_subscription_item.
Possible values are
offThe auto-renewal of omnichannel_subscription_item is disabled.onThe auto-renewal of omnichannel_subscription_item is enabled.
offThe auto-renewal of omnichannel_subscription_item is disabled.onThe auto-renewal of omnichannel_subscription_item is enabled.
Show all values[+]
current_term_start current_term_start
optional, timestamp(UTC) in seconds
Start of the current billing period of the subscription item. It is applicable only if the status is active.
current_term_end current_term_end
optional, timestamp(UTC) in seconds
End of the current billing period of the subscription item. It is applicable only if the status is active.
expired_at expired_at
optional, timestamp(UTC) in seconds
Indicates timestamp when the subscription associated with the omnichannel_subscription_item was expired in the source
expiration_reason expiration_reason
optional, enumerated string
Specifies the reason for the subscription expiration.
Possible values are
billing_errorIndicates a billing error, such as the customer's payment information being invalid.product_not_availableIndicates that the product was unavailable for purchase at the time of renewal.otherIndicates that the subscription associated with the item expired for an unspecified reason.
billing_errorIndicates a billing error, such as the customer's payment information being invalid.product_not_availableIndicates that the product was unavailable for purchase at the time of renewal.otherIndicates that the subscription associated with the item expired for an unspecified reason.
Show all values[+]
cancelled_at cancelled_at
optional, timestamp(UTC) in seconds
Indicates timestamp when the subscription associated with the omnichannel_subscription_item was cancelled in the source
cancellation_reason cancellation_reason
optional, enumerated string
The reason of canceling the subscription.
Possible values are
customer_cancelledIndicates that the subscription was voluntarily cancelled by the customer.customer_did_not_consent_to_price_increaseIndicates that the customer did not consent to the price increase for the subscription item.refunded_due_to_app_issueIndicates that the subscription was cancelled and refunded due to the app issue.refunded_for_other_reasonIndicates that the subscription was cancelled and refunded for another reason.merchant_revoked
customer_cancelledIndicates that the subscription was voluntarily cancelled by the customer.customer_did_not_consent_to_price_increaseIndicates that the customer did not consent to the price increase for the subscription item.refunded_due_to_app_issueIndicates that the subscription was cancelled and refunded due to the app issue.refunded_for_other_reasonIndicates that the subscription was cancelled and refunded for another reason.
merchant_revoked
Show all values[+]
grace_period_expires_at grace_period_expires_at
optional, timestamp(UTC) in seconds
Indicates timestamp when the grace period of subscription associated with the omnichannel_subscription_item expires in the source
resumes_at resumes_at
optional, timestamp(UTC) in seconds
Indicates timestamp when the subscription automatically resumes after being set to paused.
has_scheduled_changes has_scheduled_changes
boolean, default=false
Indicates whether the omnichannel_subscription_item has any scheduled changes.
resource_version resource_version
optional, long
Version number of this resource. The resource_version is updated with a new timestamp in milliseconds for every change made to the resource.
upcoming_renewal
optional, upcoming_renewal
This field contains information about the upcoming renewal. It is present only if the source provides renewal information (currently available only for Google Play Store purchases) and the omnichannel_subscription_item's auto_renew_status is set to on to renew for the next term. Otherwise, this field is absent.
Returns a list of omnichannel_subscription_item_scheduled_change associated with the specified omnichannel_subscription_item.

Notes

Sample Codes
 

import {
  ChargeBee,
  _omnichannel_subscription_item
} from 'chargebee-typescript';

var chargebee = new ChargeBee();

chargebee.configure({site : "{site}",
  api_key : "{site_api_key}"});
chargebee.omnichannel_subscription_item.list_omni_sub_item_schedule_changes("{omnichannel-subscription-item-id}").request(function(error,result) {
  if(error){
    //handle error
    console.log(error);
  }else{
    for(var i = 0; i < result.list.length;i++){
        var entry=result.list[i]
        console.log(`${entry}`);
        var omnichannel_subscription_item_scheduled_change: typeof chargebee.omnichannel_subscription_item_scheduled_change = entry.omnichannel_subscription_item_scheduled_change;
      }
    }
  });
copy
Click to Copy
 

import {
  ChargeBee,
  _omnichannel_subscription_item
} from 'chargebee-typescript';

var chargebee = new ChargeBee();

chargebee.configure({site : "{site}",
  api_key : "{site_api_key}"});
chargebee.omnichannel_subscription_item.list_omni_sub_item_schedule_changes("{omnichannel-subscription-item-id}").request(function(error,result) {
  if(error){
    //handle error
    console.log(error);
  }else{
    for(var i = 0; i < result.list.length;i++){
        var entry=result.list[i]
        console.log(`${entry}`);
        var omnichannel_subscription_item_scheduled_change: typeof chargebee.omnichannel_subscription_item_scheduled_change = entry.omnichannel_subscription_item_scheduled_change;
      }
    }
  });

Sample Result [ JSON ]

Show more...
{
    "list": [
        {
            "omnichannel_subscription_item_scheduled_change": {
                "omnichannel_subscription_item_id": "__test__osi_BXswds133lf1",
                "scheduled_at": 1739345778,
                "change_type": "downgrade",
                "object": "omnichannel_subscription_item_scheduled_change",
                "current_state": {
                    "item_id_at_source": "com.example.landmarks.premium"
                },
                "scheduled_state": {
                    "item_id_at_source": "com.example.landmarks.basic"
                }
            }
        },
        {..}
    ]
}

URL Format GET

https://{site}.chargebee.com/api/v2/omnichannel_subscription_items/{omnichannel-subscription-item-id}/scheduled_changes

Method

chargebee.omnichannel_subscription_item.list_omni_sub_item_schedule_changes(<omnichannel_subscription_item_id>,{<param name> : <value>,<param name> : <value> ...})
limit[]
optional, integer, default=10, min=1, max=100
The number of resources to be returned.
offset[]
optional, string, max chars=1000
Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.
omnichannel_subscription_item_scheduled_change omnichannel_subscription_item_scheduled_change
always returned
Resource object representing omnichannel_subscription_item_scheduled_change
next_offset next_offset
optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.

Sample admin console URL

https://{site}.chargebee.com/admin-console/omnichannel_subscription_items/123x