Docs

Log into read the version of docs relevant to your site.

I want to create an advance invoice on a recurring basis via bulk operation. what are the values that I need to pass in the bulk operation CSV?

Problem Statement

You want to create advance invoices in bulk on a recurring basis at fixed intervals. You need the CSV columns and values for the bulk operation.

Solution

Use the Charge Future renewals bulk operation. Advance invoices are scheduled at fixed intervals based on billing cycles. Each invoice is generated a specified number of days before the renewal. The first interval starts at the next renewal or the renewal after that, depending on how many days remain until the next renewal. See days_before_interval for details.

Steps to Set It Up

Include these columns in the bulk operation CSV:

  1. subscription[id] – Subscription ID
  2. schedule_typefixed_intervals
  3. fixed_interval_schedule[days_before_renewal] – Days before renewal to create the invoice (e.g., 30 for 30 days before a yearly renewal)
  4. fixed_interval_schedule[end_schedule_on] – When the schedule ends:
    • after_number_of_intervals – After a set number of invoices
    • specific_date – On a specific date
    • subscription_end – While the subscription is active
  5. fixed_interval_schedule[number_of_occurrences] – Number of advance invoices (only when end_schedule_on = after_number_of_intervals)
  6. fixed_interval_schedule[end_date] – End date (only when end_schedule_on = specific_date). Must be at least 1 day before the last billing cycle and within 5 years from today.

Important Notes

Note:

The maximum days before renewal depends on billing frequency. See Advance invoices FAQ.

  • Weekly: ≤ 5 days
  • Monthly: ≤ 25 days
  • Yearly: ≤ 363 days

Was this article helpful?