ChargebeeAPI

Charge Future Renewals

Idempotency Supported
Try in API Explorer

Creates an advance invoice or an advance invoicing schedule. When an advance invoice is generated, and auto_collection is on for the subscription, the payment_source associated with the subscription is charged. Any changes scheduled for the subscription are taken into account automatically while generating an advance invoice. Advance invoices are not generated for a subscription when it is in the paused status. Advance invoices are generated only for non-metered items in a subscription.

  • This operation is supported only on select plans. To know more, take a look at our plans and pricing page.
  • This operation is not supported for non_renewing and cancelled subscriptions.
  • This operation is not supported if an advance invoice is already present. You could void/delete that invoice and try creating another advance invoice.
  • For subscription with ramps, this API will return error for the following scenarios
    • If the subscription has more than 12 ramps for the terms being invoiced.
    • If schedule_type is specific_dates or fixed_intervals
    • If subscription contains ramps scheduled for middle of the subscription term.
  • This API will return an error when multi-frequency billing is enabled.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/subscriptions/{subscription-id}/charge_future_renewals

Input Parameters

terms_to_charge
optional, integer, default=1, min=1
  • For schedule_type = immediate: the number of future billing cycles to be invoiced in advance. The invoicing is done for the remaining_billing_cycles of the subscription if that is less than terms_to_charge.
  • For schedule_type = fixed_intervals: The number of future billing cycles in one interval. The schedule is created such that the total number of billing cycles in the schedule does not exceed the remaining_billing_cycles of the subscription. .
invoice_immediately
optional, boolean

Whether the charge should be invoiced immediately or added to unbilled_charges. Applicable only when schedule_type is immediate .

schedule_type
optional, enumerated string

The type of advance invoice or advance invoicing schedule.

Possible Enum Values
immediate

Charge immediately for the number of billing cycles specified by terms_to_charge .

specific_dates

Charge on specific dates. For each date, specify the number of billing cycles to charge for. Up to 5 dates can be configured.

fixed_intervals

Charge at fixed intervals of time. Specify the number of billing cycles that constitute an interval and the number of days before each interval that the invoice should be generated. Also specify when the schedule should end .

fixed_interval_schedule
optional, integer

Parameters for fixed_interval_schedule

specific_dates_schedule
optional, integer

Parameters for specific_dates_schedule

Returns

subscriptionSubscription object

Resource object representing subscription

customerCustomer object

Resource object representing customer

cardCard object

Resource object representing card

invoiceInvoice object

Resource object representing invoice

Resource object representing advance_invoice_schedule