saveBillingStatement

Set up a recurring billing.

A recurring billing indicates that customer should get a monthly (yearly) invoice for the indicated services, at the indicated price.

After the billing has been set up, recurring invoices need to be manually created and sent from back office Sales → Recurring billing, at the beginning or at the end of a month, as appropriate.

Alternatively, invoices can also be created over API with the saveSalesDocument call, and associated with the billing via the "billingStatementID" field.

Input parameters

Parameter name Description Possible value Required
billingStatementID ID of billing statement. If this parameter is present, then the specified statement is updated. integer
customerID Customer ID.(Not required if updating an existing statement.) integer yes
customerAddressID Customer address ID. integer
payerID Payer ID. integer
payerAddressID Payer address ID. integer
employeeID ID of the employee, who is set as the creator of the billing statement. integer
startDate Start date. ISO date (yyyy-mm-dd)
endDate End date. ISO date (yyyy-mm-dd)
serviceID ID of the service. integer
productID ID of the product. integer
customerSpecialPrice Customer special price. Decimal
paymentDays Payment period. integer
vatrateID ID of VAT (tax) rate. To get the list of rates, use getVatRates.(Not required if updating an existing statement.) integer yes
warehouseID Warehouse ID. integer
currencyCode Currency code: EUR, USD. Currency must be present in the system.
If omitted, default currency will be used.
string
billingStatementPeriod Period of billing statement. Possible values: "MONTH", "QUARTER", "HALFYEAR", "YEAR", "3MONTHS", "4MONTHS".(Not required if updating an existing statement.) string yes
billingStatementTime Time of billing statement. Possible values: "WHEN_PERIOD_STARTS", "WHEN_PERIOD_ENDS", ""BASED_ON_METERED_READINGS".(Not required if updating an existing statement.) string yes
active 0 or 1, by default 1. integer
sendByEmail 0 or 1. integer
makeSeparateInvoice 0 or 1. integer
serviceNameOnInvoices Service name as displayed on invoices. string
notes Notes. string
additionalInvoiceNotes Additional text printed on invoices. string
***** Additional attributes associated with this item.
Attributes must be supplied as a flat list, each attribute defined by the following set of three parameters. Replace # with set number (1, 2, 3, ...). When updating an existing entry, API will only update the attributes specified in input data and leave all other existing attributes unchanged. To delete an attribute, set its value to 'null' or 'undefined'.
attributeName# Attribute name. Name can only contain the following symbols: A-Z, a-z, 0-9, dash and underscore. string
attributeType# Attribute type, possible types are 'text', 'int' and 'double'. By default 'text'. string
attributeValue# Value of the attribute. Set value to 'null' or 'undefined' to delete an attribute.
'text' attribute can be any string, maximum 255 characters.
'int' must be a signed 32-bit integer.
'double' must be a decimal number.
string

Response

Field name Type Description
billingStatementID integer ID of the created/updated item.