Menu
Edit Advance Invoice Schedule
Edit advance invoice schedule
/subscriptions/{subscription-id}/edit_advance_invoice_scheduleUse it in a workflow
- Add a step and choose the Chargebee connector.
- Pick the Edit Advance Invoice Schedule action (under Chargebee API).
- Fill in the fields below, then reference the result from later steps as
{{editAdvanceInvoiceSchedule.response.data}}.
Request
Path parameters
subscription-idstringrequiredHeaders
chargebee-request-origin-devicestringThe device from which the customer has made the request
chargebee-request-origin-userstring (email)The email address of your customer/user. Use this when the email address has only ASCII characters.
chargebee-request-origin-user-encodedstring (email)The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.
chargebee-request-origin-ipstringThe IP address of the customer where the request originated
chargebee-event-actionsstringskip all actions to be done on the events
One ofall-disabled
chargebee-event-emailstringskip only emails
One ofall-disabled
chargebee-event-webhookstringskip only webhooks
One ofall-disabled
chargebee-business-entity-idstringIf the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.
Request body
Enter the body as JSON in the step's Body field.
terms_to_chargeinteger (int32)The number of billing cycles in one interval.
schedule_typestringThe type of advance invoice or advance invoicing schedule. \* specific_dates - Charge on [specific dates](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_date). For each date, specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#specific_dates_schedule_terms_to_charge) to charge for. Up to 5 dates can be configured. \* fixed_intervals - Charge at fixed intervals of time. Specify the [number of billing cycles](/docs/api/subscriptions/charge-future-renewals#terms_to_charge) that constitute an interval and the number of [days before each interval](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_days_before_renewal) that the invoice should be generated. Also specify [when the schedule should end](/docs/api/subscriptions/charge-future-renewals#fixed_interval_schedule_end_schedule_on) .
One ofspecific_datesfixed_intervals
fixed_interval_scheduleobjectParameters for fixed_interval_schedule
number_of_occurrencesinteger (int32)<p class="mb-2">The number of advance invoices to generate. The schedule is created such that the total number of billing cycles in the schedule does not exceed the <a href="/docs/api/subscriptions/subscription-object#remaining_billing_cycles"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">remaining_billing_cycles</code></a> of the subscription. This parameter is applicable only when <a href="/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_end_schedule_on"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">fixed_interval_schedule[end_schedule_on]</code></a> = <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">after_number_of_intervals</code></p>
days_before_renewalinteger (int32)The number of days before each interval that advance invoices are generated.
end_schedule_onstring<p class="mb-2">Specifies when the schedule should end.</p> * after_number_of_intervals - <p class="mb-2">Advance invoices are generated a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">specified number of times</code></p> * subscription_end - <p class="mb-2">Advance invoices are generated for as long as the subscription is active.</p> * specific_date - <p class="mb-2">End the advance invoicing schedule on a <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">specific date</code> .</p>
One ofafter_number_of_intervalsspecific_datesubscription_end
end_dateinteger (unix-time)<p class="mb-2">The date when the schedule should end. Advance invoices are not generated beyond this date. It must be at least 1 day before the start of the last billing cycle of the subscription and also within 5 years from the current date. This parameter is only applicable when <a href="/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_end_schedule_on"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">fixed_interval_schedule[end_schedule_on]</code></a> = <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">specific_date</code> .</p>
specific_dates_scheduleobjectParameters for specific_dates_schedule
idarray<string>The [unique id](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#id) of the member of the [advance_invoice_schedule](/docs/api/advance_invoice_schedules) array which corresponds to the [specific_dates_schedule](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule) that you intend to modify. Only applicable when [schedule_type](/docs/api/subscriptions/edit-advance-invoice-schedule#schedule_type) is specific_dates.
terms_to_chargearray<integer (int32)><p class="mb-2">The number of billing cycles to charge for, on the date specified. Applicable only when <a href="/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#schedule_type"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">schedule_type</code></a> is specific_dates.</p>
datearray<integer (unix-time)><p class="mb-2">The unique id of the member of the advance_invoice_schedule array which corresponds to the specific_dates_schedule that you intend to modify. Only applicable when <a href="/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#schedule_type"><code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">schedule_type</code></a> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">specific_dates</code> .</p>
{
"terms_to_charge": null,
"schedule_type": null,
"fixed_interval_schedule": null,
"specific_dates_schedule": null
}
Response
Returns 200 with an object. Read it in later steps with {{editAdvanceInvoiceSchedule.response.data.<field>}}.
advance_invoice_schedulesarray<object><p class="mb-2">Resource object representing advance_invoice_schedule</p>
idstringrequired<p class="mb-2">System-generated and immutable unique Id for the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">advance_invoice_schedule</code> .</p>
schedule_typestringThe type of advance invoice or advance invoicing schedule. \* specific_dates - The advance charges occur on specific dates. For each date, [a fixed number of billing cycles](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured. \* fixed_intervals - The advance charges occur at [fixed intervals of time](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#fixed_interval_schedule_terms_to_charge) .
One offixed_intervalsspecific_dates
fixed_interval_scheduleobject6 fields<p class="mb-2">When the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">schedule_type</code> is <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">fixed_intervals</code> , this object gives further details of the schedule.</p>
specific_dates_scheduleobject3 fieldsThe advance charges occur on specific dates. For each date, \[a fixed number of billing cycles\](/docs/api/advance_invoice_schedules/advance_invoice_schedule-object#specific_dates_schedule_terms_to_charge) is charged for. There can be up to 5 dates configured.
{
"advance_invoice_schedules": null
}
Need more? See the Chargebee guide for connection setup and behaviour shared by every action.