Invoice Creation (POST)
Create an invoice for an account, order, or a list of billing schedules.
This API request creates billing period items for the matching billing schedules. The billing period items are created for the period between the next charge date of the billing schedule and the specified target date. Invoice lines are created by processing these billing period items. These invoice lines are then grouped into invoices based on the defined grouping criteria on the billing schedule.
This API also applies any available credits on an account to settle an invoice and to reduce it’s balance. To apply available credits, ensure the Apply Credits to Posted Invoices setting from Billing Settings is turned on.
You need the Generate Invoices From Billing Schedule API, Billing Operations User, or Billing Customer Service permission set to use this API.
62.0
POST
Note: The billingTransactionId property takes precedence over the accountId property followed by the billingScheduleIds property when values for these properties are specified in the input request.
JSON Example
Properties
| Name | Type | Description | Required or Optional | Available Version |
|---|---|---|---|---|
accountId | String | ID of the account record to create the invoices for. | Required if the billingScheduleIds or billingTransactionId property isn’t specified. | 63.0 |
action | String | Required | 62.0 | |
billingScheduleIds | String[] | List of billing schedule IDs that’s used to create the invoices. You can specify a maximum of 200 billing schedules. | Required if the accountId or billingTransactionId property isn’t specified. | 62.0 |
billingTransactionId | String | ID of the billing transaction record, which is the order ID, to create the invoices for. | Required if the accountId or billingScheduleIds property isn’t specified. | 63.0 |
correlationId | String | Property that’s tagged against the published InvoiceProcessedEvent event, if specified. | Optional | 62.0 |
invoiceDate | String | Stamping date of the invoice in ISO 8601 format. | Required | 62.0 |
targetDate | String | Date in ISO 8601 format used to decide the billing periods that are included to create invoices. | Required | 62.0 |
Supported values:
DraftPosted