Update Customer Billing Settings

This function allows you to override the default customer billing settings for a specific customer.

Recommended Request: We recommend that the invoiceDay field either be omitted or the value set to null for the PUT method.

Request Parameters

PropertyTypeDescription
idIntegerThis is the Customer ID of the customer to whom these preferences apply.
invoiceDayIntegerDeprecated.
termEnum:{Net0, Net5, Net7, Net10, Net15, Net21, Net30, Net45, Net60, Net75, Net90, MFI1, DayOfMonth1, DayOfMonth2, DayOfMonth3, ... DayOfMonth29, DayOfMonth30, DayOfMonth31}This defines the Payment Terms for this Customer.
intervalEnum: {Monthly, Yearly}Deprecated.
autoCollectBooleanThis defines whether the billing system will attempt to collect from the customer's payment method on file.

The global auto collect setting is used by default and by setting this field explicitly on the Customer the setting can be overridden for this Customer. This setting can only be explicitly set to True if the customer has a Payment Method, such as a credit card of ACH account, on file.

If set to true then when charges are applied to the Customer the billing system will attempt to collect them in full form the default payment method on file. If set to false the billing system will not collect automatically. If set to null then the billing system will use the global auto collect setting.
autoCollectSettingTypeStringWhen auto collect is set to on, this defines the type of auto collect. CurrentInvoice, OutstandingBalance, or Threshold are acceptable valid strings that can be used to set auto collect behaviour.
dunningExemptBooleanControls whether this customer is exempt from your account's Dunning management settings. Dunning management settings control how and when Fusebill will automatically try to collect the outstanding balance of customers in poor standing. Relevant only for customers subject to auto collect.
rechargeTypeStringThis value should be set to "BringBalanceBackTo" in any case where you want to use the threshold billing feature.
rechargeThresholdAmountIntegerThis is the value which triggers a threshold collection. If the customer balance drops below this number when an invoice is posted the system will automatically collect enough funds to bring the balance back to the rechargeTargetAmount.
rechargeTargetAmountCurrencyThis is the customer balance which will be collected when the customer balance dips below the threshold. For example, the threshold amount could be $20 and this value set to $50. In this case, the system will collect funds if to bring the balance back to $50 if the customer drops below $20.
statusOnThresholdBooleanThis setting determines if the customer should enter poor standing if their balance dips below the set threshold and the payment to restore the balance fails.
autoPostDraftInvoiceBooleanThis defines whether the billing system will attempt to automatically post draft Invoices against the Customer's account.

The global autoPostDraftInvoice setting is used by default and by setting this field explicitly on the Customer the setting can be overridden for this Customer.

If set to true then when an Invoice is generated in Draft status the Invoice will be automatically converted to a Posted invoice and the charges from the Invoice will be applied to the Customer. If set to false the billing system will not post the Invoices automatically. If set to NULL then the billing system will use the global autoPostDraftInvoice setting.
customerGracePeriodIntegerThis filed defines the number of days that the Customer is allowed to be in a PoorStanding status before the system will automatically place the Customer account in a Suspended state. Customer's enter PoorStanding when one or more Invoices go unpaid and enter an Overdue status.
gracePeriodExtensionIntegerThis field is an add-on number of days which extends the Grace Period for this Customer. It is added to the normal Grace Period.
customerAutoCancelIntegerThe number of days after suspension before the customer is cancelled by the system.
defaultCancelOptionEnum:{Full, None, Unearned}Controls revenue recognition in the event of customer automatic cancellation. "Full" means to reverse all charges fully. "None" means earn all charges. "Unearned" means to reverse unearned amounts for all charges. NULL means to follow the default of the Fusebill account.
standingPoNumberStringThis is the PO number which will be added to this customer's invoices. [Max Length: 255 characters]
billingPeriodConfigurationsList of objects (defined below)This list is populated if the billing settings at the customer level have been overridden.
acquisitionCostDecimalThis is the cost in dollars spent to acquire this customer. This factors into the Customer Profitability metric.
showZeroDollarChargesBooleanThis defines if this customer will show or not show $0 charges on their invoices. This can be either true, which means Fusebill will show charges, or false, which means Fusebill will hide these charges, or null which means the customer is using the account level default option.
taxExemptBooleanThis defines if this customer should be charged taxes.
taxExemptCodeStringThis is the tax exemption code for this customer. If taxExempt is set to True this field must be populated.
useCustomerBillingAddressBooleanControls whether the shipping address or billing address for taxation purposes. If null, the system will use the account level tax setting configuration, if set to true the system will use the customer's billing address for taxes, and if set to false the system will use the customer's shipping address for taxes.
avalaraUsageTypeStringThis is a string sent to Alavara for determining the application of various sales taxes.
vatIdentificationNumberIntegerThe number associated with the clients EU Vat ID
customerServiceStartOptionStringThis setting allows you to specify how you would like the system to behave if a customer is automatically moved from Suspend Status back to Active status as a result of successfully auto-collecting outstanding balances.
rollUpTaxesBooleanThis option determines if the taxes on the customer's invoices will appear 'rolled up' as one line (eg: Taxes: $4.56) or if the will be broken into multiple lines (eg: State Tax: $3.45 and Federal Tax: $1.34).
rollUpDiscountsBooleanIf true, all of the discounts for all products and plans on the invoices for this customer will be rolled up into a single line item at the bottom of the invoice. Null follows the default of the Fusebill account.
rollUpPdfsByPlanProductBooleanControls how subscription charges are displayed on downloaded invoices. True means to display summarized subscription product charges. False means to display detailed charges.
rollUpPdfsDisplayNameBooleanControls whether plan names are displayed on summarized invoices
rollUpPdfsDisplayDescriptionBooleanControls whether plan descriptions are displayed on summarized invoices
rollUpPdfsDisplayAllUnitPricesBooleanControls whether all unit prices are displayed on summarized invoices
pdfInvoiceEmailAttachmentOptionEnum:{Details, Summary, Both}Controls how subscription charges are displayed on emailed invoices. "Details" means to show fully detailed charges. "Summary" means to show summarized charges. "Both" means to show both.
trackedItemDisplayObject (defined below)Controls the appearance of tracked items on invoices for the customer.
customerBillingStatementSettingObject (defined below)Controls the billing statement settings for this customer.
postReadyChargesOnRenewBooleanControls whether draft ready charges are posted on renewal. This includes new ready draft charges from renewals and any existing ready draft charges from subscriptions and purchases. Null means to follow the Fusebill account default.

Billing Period Configuration Object Fields

PropertyTypeDescription
typeEnum:{SpecifiedDate, CustomerActivation, FirstSubscriptionActivation}Controls when subscriptions of the configured interval are recharged
ruleEnum:{SingleInvoice, MultipleInvoices, OneInvoicePerDay, Prompt}Controls how to invoice. Single Invoice compiles subscriptions of the given interval on one invoice. Multiple Invoices separates them as one invoice per subscription. One Invoice Per Day posts an invoice every day. Prompt requires an agent to approve it each time.
intervalEnum:{Yearly, Monthly}Indicates which type of billing period this configuration applies to.
dayInteger (1-31)The day of the month to recharge. Use only if type is "SpecifiedDate"
monthInteger (1-12)The month of the year to recharge. Use only if type is "SpecifiedDate" and interval is "Yearly"

Tracked Item Display Object Fields

PropertyTypeDescription
trackedItemDisplayFormatEnum:{Inline, SeperatePage}Controls where the tracked items are displayed.
showTrackedItemNameBooleanThis controls if the tracked items names are displayed.
showTrackedItemReferenceBooleanThis controls if the tracked items' reference are displayed.
showTrackedItemDescriptionBooleanThis controls if the tracked items' description are displayed.
showTrackedItemCreatedDateBooleanThis controls if tracked items' created dates are displayed.

Customer Billing Statement Setting Object Fields

PropertyTypeDescription
optionEnum:{Detailed, BySubscription, Summarized}Controls how the statement is generated.
typeEnum:{CustomerAnniversary, SpecifiedDate}The basis for when statements are generated
intervalEnum:{Monthly, Yearly}Controls frequency of statement generation.
dayIntegerThe day of the month to generate the statement if type is "SpecifiedDate"
monthIntegerThe month of the year to generate the statement if type is "SpecifiedDate" and interval is "Yearly".
trackedItemDisplayObject (defined above)Controls how tracked items are displayed on the statement.
statementActivityTypeEnum: {OnlyParentActivity, OnlyChildActivity, ParentAndChildActivity}Controls which activities to generate if customer hierarchy is being used.
Examples
curl -X PUT "https://secure.fusebill.com/v1/customerbillingsetting" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{id:{customerId},invoiceDay:null,term:'Net0',interval:'Monthly',autoCollect:null,rechargeType:'',rechargeThresholdAmount:null,rechargeTargetAmount:null,statusOnThreshold:null,autoPostDraftInvoice:null,hasPaymentMethod:false,customerGracePeriod:null,gracePeriodExtension:null,standingPoNumber:null,billingPeriodConfigurations:[],acquisitionCost:0,showZeroDollarCharges:null,taxExempt:false,useCustomerBillingAddress:true,taxExemptCode:null,avalaraUsageType:null,vatIdentificationNumber:null,customerServiceStartOption:'',rollUpTaxes:null,rollUpDiscounts:null,trackedItemDisplay:null,customerBillingStatementSetting:{option:null,type:null,interval:null,day:null,month:null,trackedItemDisplay:null}}"
//Json data
string jsonData ="{id:{{customerId},invoiceDay:null,term:'Net0',interval:'Monthly',autoCollect:null,rechargeType:'',rechargeThresholdAmount:null,rechargeTargetAmount:null,statusOnThreshold:null,autoPostDraftInvoice:null,hasPaymentMethod:false,customerGracePeriod:null,gracePeriodExtension:null,standingPoNumber:null,billingPeriodConfigurations:[],acquisitionCost:0,showZeroDollarCharges:null,taxExempt:false,useCustomerBillingAddress:true,taxExemptCode:null,avalaraUsageType:null,vatIdentificationNumber:null,customerServiceStartOption:'',rollUpTaxes:null,rollUpDiscounts:null,trackedItemDisplay:null,customerBillingStatementSetting:{option:null,type:null,interval:null,day:null,month:null,trackedItemDisplay:null}}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customerbillingsetting");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "PUT";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {"invoiceDay": None,"term": "Net10","interval": "Monthly","autoCollect": None,"rechargeType": "","rechargeThresholdAmount": 

None,"rechargeTargetAmount": None,"statusOnThreshold": None,"autoPostDraftInvoice": None,"hasPaymentMethod": "false","customerGracePeriod": 

None,"gracePeriodExtension": None,"standingPoNumber": None,"billingPeriodConfigurations": [],"acquisitionCost": 0,"showZeroDollarCharges": None,"taxExempt": 

"false","useCustomerBillingAddress": None,"taxExemptCode": None,"avalaraUsageType": None,"vatIdentificationNumber": None,"customerServiceStartOption": 

"","rollUpTaxes": None,"rollUpDiscounts": None,"trackedItemDisplay": None,"customerBillingStatementSetting": {"option": None,"type": None,"interval": 

None,"day": None,"month": None,"trackedItemDisplay": None},"defaultPaymentMethodId": None,"id": {id},"uri": None}
#Pass in your URI, Payload and Headers
r = requests.put('https://secure.fusebill.com/v1/customerBillingSetting/{id}', data=json.dumps(payload), headers=headers)
print(r.content)
{
    "term": "Net0",
    "interval": "Monthly",
    "autoCollect": true,
    "rechargeType": "",
    "rechargeThresholdAmount": 0.00,
    "rechargeTargetAmount": 0.00,
    "statusOnThreshold": false,
    "autoPostDraftInvoice": null,
    "hasPaymentMethod": true,
    "customerGracePeriod": null,
    "gracePeriodExtension": null,
    "customerAutoCancel": null,
    "defaultCancelOption": "",
    "standingPoNumber": null,
    "billingPeriodConfigurations": [
        {
            "type": "SpecifiedDate",
            "rule": "SingleInvoice",
            "interval": "Monthly",
            "day": 4,
            "month": null
        }
    ],
    "acquisitionCost": 0.00,
    "showZeroDollarCharges": null,
    "taxExempt": false,
    "useCustomerBillingAddress": null,
    "taxExemptCode": null,
    "avalaraUsageType": null,
    "vatIdentificationNumber": null,
    "customerServiceStartOption": "",
    "rollUpTaxes": null,
    "rollUpDiscounts": null,
    "rollUpPdfsByPlanProduct": false,
    "rollUpPdfsDisplayName": true,
    "rollUpPdfsDisplayDescription": true,
    "rollUpPdfsDisplayAllUnitPrices": true,
    "pdfInvoiceEmailAttachmentOption": "Details",
    "trackedItemDisplay": null,
    "customerBillingStatementSetting": {
        "option": "Disabled",
        "type": null,
        "interval": null,
        "day": null,
        "month": null,
        "trackedItemDisplay": null,
        "statementActivityType": null
    },
    "defaultPaymentMethodId": 215715,
    "postReadyChargesOnRenew": null,
    "id": 654144,
    "uri": "https://secure.fusebill.com/v1/customerbillingsetting/654144"
}
Response
{
    "invoiceDay": null,
    "term": "Net30",
    "interval": "Monthly",
    "autoCollect": true,
    "autoCollectSettingType": "OutstandingBalance",
    "dunningExempt":false,
    "rechargeType": "",
    "rechargeThresholdAmount": null,
    "rechargeTargetAmount": null,
    "statusOnThreshold": null,
    "autoPostDraftInvoice": null,
    "hasPaymentMethod": true,
    "customerGracePeriod": null,
    "gracePeriodExtension": null,
    "standingPoNumber": null,
    "billingPeriodConfigurations": [
        {
            "type": "CustomerActivation",
            "rule": "OneInvoicePerDay",
            "interval": "Monthly",
            "day": null,
            "month": null
        },
        {
            "type": "FirstSubscriptionActivation",
            "rule": "OneInvoicePerDay",
            "interval": "Yearly",
            "day": null,
            "month": null
        }
    ],
    "acquisitionCost": 0,
    "showZeroDollarCharges": null,
    "taxExempt": false,
    "useCustomerBillingAddress": null,
    "taxExemptCode": null,
    "avalaraUsageType": null,
    "vatIdentificationNumber": null,
    "customerServiceStartOption": "",
    "rollUpTaxes": null,
    "rollUpDiscounts": null,
    "trackedItemDisplay": null,
    "customerBillingStatementSetting": {
        "option": null,
        "type": null,
        "interval": null,
        "day": null,
        "month": null,
        "trackedItemDisplay": null
    },
    "defaultPaymentMethodId": 142291,
    "id": 342780,
    "uri": "https://secure.fusebill.com/v1/customerbillingsetting/342780"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 400,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Cannot set Invoice Day on Customer when Customer is Active."
        }
    ]
}
Language
Authorization