---
title: Invoice
slug: quickbooks/invoice
description: Learn how to create a new invoice with a custom URL using this comprehensive guide. Highlighting required fields in red, it provides the URL structure and lists all available fields. Discover separate instructions for creating invoices with or without chi
docTags: 
createdAt: 2021-11-05T07:45:24.000Z
---

### All Fields that are available for a New Invoice

:::hint{type="info"}
You can also create a SalesReceipt using the same button.
:::

The structure of a Custom URL creating a new Invoice is below, with all possible fields shown. Required fields are in red. All other fields are optional.

:::CodeblockTabs
Button URL

```css
/apex/breadwinner_qbo__NewInvoicePage
?originating_record={!salesforce_record_ID}
&parent_account=api_field_name__c
&invoice_date=invoice_date_api_field__c
&due_date=invoice_date_api_field__c
&invoice_custom_field_1=api_field__c
&invoice_custom_field_2=api_field__c
&invoice_custom_field_3=api_field__c
&invoice_location_field=api_field__c
&invoice_class_field=api_field__c
&invoice_message_field=api_field__c
&invoice_memo_field=api_field__c
&invoice_term=field_api_name__c
&testing=true
```
:::

### All Fields that are available for a New Invoice with Child Records

The list and structure of a Custom URL with all possible fields, including those for Line Items that are drawn from Child Records, utilized is below. Required fields are in red. All other fields are optional. Please note that many of these fields will not work unless the corresponding field is setup in the accounting system.&#x20;

:::CodeblockTabs
Button URL

```css
/apex/breadwinner_qbo__NewInvoicePage
?originating_record={!salesforce_record_ID}
&parent_account=api_field_name__c
&invoice_date=invoice_date_api_field__c
&due_date=invoice_date_api_field__c
&invoice_custom_field_1=api_field__c
&invoice_custom_field_2=api_field__c
&invoice_custom_field_3=api_field__c
&invoice_location_field=api_field__c
&invoice_class_field=api_field__c
&invoice_term=field_api_name__c
&child_relationship_name=child_name__r
&child_object_inventory_name=name_field__c
&child_object_description=description__c
&child_object_service_date=service_date__c
&child_object_quantity=quantity_field
&child_object_unit_price=unit_price_field__c
&child_object_class=class_field__c
&child_object_taxable=is_taxable_field__c
&testing=true
```
:::

*Please note that&#x20;*&#x51;uickBooks *only allows you to have a Class at the Invoice or Line Item level, not both. This must be set in&#x20;*&#x51;uickBooks'*&#x20;settings. Thus, the URL above will not work as it specifies the Class at the Invoice AND Line Item level. A working URL would require removing at least one of these.*

### Applying Payments

It is possible to specify a payment at the time of Invoice creation.

You need to specify these fields

- Amount Paid
- Paid To

And you can optionally specify

- Reference

This can only be done at the time of Invoice creation.&#x20;

:::CodeblockTabs
Button URL

```css
/apex/breadwinner_qbo__NewInvoicePage
?originating_record={!salesforce_record_ID}
&parent_account=api_field_name__c
&payment_amount=payment_amount__c
&payment_method=payment_date__c
&payment_reference=ar_account_field__c
&payment_deposit_to=reference__c
```
:::



