Imports a subscription into Chargebee.
Sample Request
Sample Result[JSON]
URL Format
Input Parameters
Specifies the IDs of coupons
to be marked as exhausted. This parameter accepts a list of IDs, which must correspond to coupons with a duration_type
of one_time.
Ensure that the IDs included in this parameter do not match any IDs provided in the coupon_ids
parameter.
The number of billing cycles the subscription runs before canceling. If not provided, then the billing cycles set for the plan-item price is used.
Defines Net D for the subscription. Net D is the number of days within which any invoice raised for the subscription must be paid.
- If a value is provided: Net D is set explicitly for the subscription to the value provided. The value must be one among those defined in the site configuration.
- If not provided: The attribute is not set and therefore not returned by the API. In this case, when an invoice is raised - whether now or later - the
net_term_daysdefined at the customer level is considered. .
Defines whether payments need to be collected automatically for this subscription. Overrides customer's auto-collection property.
Whenever an invoice is created for this subscription, an automatic charge will be attempted on the payment method available.
Automatic collection of charges will not be made for this subscription. Use this for offline payments.
List of coupons to be applied to this subscription. You can provide coupon ids or coupon codes .
Current state of the subscription.
The subscription is scheduled to start at a future date.
The subscription is in trial.
The subscription is active and will be charged for automatically based on the items in it.
The subscription will be canceled at the end of the current term.
The subscription is paused. The subscription will not renew while in this state.
The subscription has been canceled and is no longer in service.
The subscription has been transferred to another business entity within the organization.
The time at which the subscription was activated. A subscription is "activated" when its status changes from any other, to either active or non_renewing.
The following conditions must be satisfied when passing this parameter:
- When
statusisactive,non_renewing, orpaused,activated_atmust be on or aftertrial_endorstarted_at. Additionally,activated_atmust be on or beforecurrent_term_start. - When
statusisin_trial,activated_atmust precedetrial_start
Note:
This parameter should not be provided when passing status as future or cancelled.
Number of billing cycles the new contract term should run for, on contract renewal. The default value is the same as billing_cycles
or a custom value depending on the site configuration
.
Set as true
if you want an invoice to be created for the subscription.
- The invoice will be created for the subscription only if it has an
activeornon_renewingstatus. - The period of the invoice is from
current_term_starttocurrent_term_end. - The invoice will not be generated if the subscription amount is zero dollars (for that period) and 'Hide Zero Value Line Items' option is enabled in site settings.
A customer-facing note added to all invoices associated with this subscription. This note is one among all the notes displayed on the invoice PDF.
A set of key-value pairs stored as additional information for the subscription. Learn more .
Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in Settings > Configure Chargebee > Reason Codes > Subscriptions > Subscription Cancellation. Must be passed if set as mandatory in the app. The codes are case-sensitive.
Indicates whether the invoices for this subscription are generated with a pending status. This attribute is set to true automatically when the subscription has item prices that belong to metered items.
You can also set this to true explicitly using the create/update subscription operations. This is useful in the following scenarios:
- When tracking usages and calculating usage-based charges on your end. You can then add them to the subscription as a one-time charge at the end of the billing term.
- When you need to inspect all charges before closing invoices for this subscription. Applicable only when Metered Billing is enabled for the site .
Set to false
to override for this subscription, the site-level setting
for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the customer level
.