Billing Account
A billing account is a record used to show all billing information for a customer or subcustomer. A billing account contains billing-specific information, including billing schedule, default payment terms, bill-to address, and currency.
For details about working with billing accounts in the UI, see Creating Billing Accounts.
The billing account record is defined in the relationships XSD, where it is represented as the BillingAccount complex type.
To enable Billing Accounts, you must first enable:
-
Consolidate Projects on Sales Transactions (Setup > Accounting > Preferences > Accounting Preferences. On the Items/Transactions subtab > Sales & Pricing > Consolidate Projects on Sales Transactions).
-
Charge Based Billing (Setup > Company > Setup Tasks > Enable Features. On the Transactions subtab> Billing > Charge Based Billing).
After enabling both prerequisites, enable Billing Accounts by going to Setup > Company > Setup Tasks > Enable Features. On the Transactions subtab select Billing and then Billing Accounts.
Access Billing accounts from Lists > Relationships > Billing Accounts or by clicking New on the Billing Account subtab on the Customer record.
If you have multiple billing accounts for a customer, the billing account marked as customer default is used when creating transactions, for example a new invoice.
For more on using SOAP web services to interact with billing account, see the following topics:
Billing Account Supported Operations
add | addList | delete | deleteList | get | | getList | search | searchMoreWithId | getSavedSearch |update | updateList | upsert | upsertList |
You can also use the asynchronous equivalents of SOAP web services list operations. For information about asynchronous operations, see SOAP Web Services Asynchronous Operations. For more information about request processing, see Synchronous Versus Asynchronous Request Processing.
Billing Account Body Fields
When creating a usage record, you are required to define the following body fields:
Field Name |
Label in UI |
Description/Type |
---|---|---|
|
Customer |
The customer associated with the billing account. This is a RecordRef field. |
|
Currency |
The currency associated with the billing account. This is a RecordRef field. |
|
Billing Schedule |
The billing account schedule. This is a RecordRef field. |
|
Start Date |
The date on which the billing account starts. This is a dateTime field. You can only change the start date of a billing account if it is not yet tied to a subscription. |
The SOAP Schema Browser includes definitions for all body fields, search filters, and search joins available to this record. For details, see the SOAP Schema Browser’s billing account reference page.
For information on using the SOAP Schema Browser, see SOAP Schema Browser.
Billing Account Code Samples
For examples of how to work with billing account records using SOAP, refer to the following sections:
Adding a Standard Billing Account
This example shows how to add a standard billing account record.
Java
//Create the record
BillingAccount record = new BillingAccount();
//Set fields on the billing account record
record.setName("Benbow Billing Account");
record.setCustomer(createRR("305"));
record.set_class(createRR("1"));
record.setBillingSchedule(createRR("2"));
record.setFrequency(BillingAccountFrequency._monthly)
//Set Start Date field using the Gregorian Calendar
Calendar startDate = new GregorianCalendar();
startDate.set(Calendar.YEAR, 2017);
startDate.set(Calendar.MONTH, 0);
startDate.set(Calendar.DAY_OF_MONTH, 15);
record.setStartDate(startDate);
//Add the record
c.addRecord(record);
SOAP Request
<soapenv:Body>
<add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
<record xsi:type="ns8:BillingAccount" xmlns:ns8="urn:relationships_2017_1.lists.webservices.netsuite.com">
<ns8:customer xsi:type="ns9:RecordRef" internalId="305" xmlns:ns9="urn:core_2017_1.platform.webservices.netsuite.com"/>
<ns8:name xsi:type="xsd:string">Benbow Billing Account</ns8:name>
<ns8:class xsi:type="ns10:RecordRef" internalId="1" xmlns:ns10="urn:core_2017_1.platform.webservices.netsuite.com"/>
<ns8:billingSchedule xsi:type="ns11:RecordRef" internalId="2" xmlns:ns11="urn:core_2017_1.platform.webservices.netsuite.com"/>
<ns8:frequency xsi:type="ns12:BillingAccountFrequency" xmlns:ns12="urn:types.relationships_2017_1.lists.webservices.netsuite.com">_monthly</ns8:frequency>
<ns8:startDate xsi:type="xsd:dateTime">2017-01-15T14:37:49.519Z</ns8:startDate>
</record>
</add>
</soapenv:Body>
Adding a Billing Account With Preferences
The following example adds a billing account record that specifies the invoice form.
Java
//Create the record
BillingAccount record = new BillingAccount();
//Set fields on the billing account record
record.setName("FedEx Billing Account");
record.setCustomer(createRR("305"));
record.set_class(createRR("1"));
record.setBillingSchedule(createRR("2"));
record.setFrequency(BillingAccountFrequency._monthly)
//set the Invoice Form field
record.setInvoiceForm(createRR("69");
//Set Start Date field using the Gregorian Calendar
Calendar startDate = new GregorianCalendar();
startDate.set(Calendar.YEAR, 2017);
startDate.set(Calendar.MONTH, 0);
startDate.set(Calendar.DAY_OF_MONTH, 15);
record.setStartDate(startDate);
//Add the record
c.addRecord(record);
SOAP Request
<soapenv:Body>
<add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
<record xsi:type="ns8:BillingAccount" xmlns:ns8="urn:relationships_2017_1.lists.webservices.netsuite.com">
<ns8:customer xsi:type="ns9:RecordRef" internalId="305" xmlns:ns9="urn:core_2017_1.platform.webservices.netsuite.com"/>
<ns8:name xsi:type="xsd:string">FedEx Account</ns8:name>
<ns8:class xsi:type="ns10:RecordRef" internalId="1" xmlns:ns10="urn:core_2017_1.platform.webservices.netsuite.com"/>
<ns8:billingSchedule xsi:type="ns11:RecordRef" internalId="2" xmlns:ns11="urn:core_2017_1.platform.webservices.netsuite.com"/>
<ns8:frequency xsi:type="ns12:BillingAccountFrequency" xmlns:ns12="urn:types.relationships_2017_1.lists.webservices.netsuite.com">_monthly</ns8:frequency>
<ns8:startDate xsi:type="xsd:dateTime">2017-01-16T02:43:47.987Z</ns8:startDate>
<ns8:invoiceForm xsi:type="ns13:RecordRef" internalId="69" xmlns:ns13="urn:core_2017_1.platform.webservices.netsuite.com"/>
</record>
</add>
</soapenv:Body>
Related Topics
- Enabling Advanced Billing
- Project Billing
- Projects and Time and Materials Billing
- Projects and Interval Billing
- Projects and Milestone Billing
- Lists
- Other Lists
- How to Use the SOAP Web Services Records Help
- SOAP Web Services Supported Records
- SOAP Schema Browser
- SuiteTalk SOAP Web Services Platform Overview