InvoiceAdd qbXML example

Adds an invoice for a customer, with one line per item sold.

qbXML InvoiceAddRq, version 16.0
<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="16.0"?>
<QBXML>
  <QBXMLMsgsRq onError="stopOnError">
    <InvoiceAddRq>
      <InvoiceAdd>
        <CustomerRef>
          <FullName>Acme Corp</FullName>
        </CustomerRef>
        <TxnDate>2026-01-15</TxnDate>
        <RefNumber>1001</RefNumber>
        <BillAddress>
          <Addr1>123 Main St</Addr1>
          <City>Springfield</City>
          <State>IL</State>
          <PostalCode>62701</PostalCode>
        </BillAddress>
        <Memo>Monthly service</Memo>
        <InvoiceLineAdd>
          <ItemRef>
            <FullName>Widget</FullName>
          </ItemRef>
          <Desc>Blue widget, large</Desc>
          <Quantity>2</Quantity>
          <Rate>125.00</Rate>
        </InvoiceLineAdd>
      </InvoiceAdd>
    </InvoiceAddRq>
  </QBXMLMsgsRq>
</QBXML>
Open in the validator Check it against the qbXML 16.0 schema, edit it, and run it in your own QuickBooks.

Things to know

  • Write amounts with two decimals (40.00, not 40). QuickBooks refuses a whole-number amount with status 3040, though the schema allows it.
  • A *Ref that names a record QuickBooks doesn't have answers 3120 when it gives a ListID and 3140 when it gives a FullName.
  • Elements must appear in the order the schema lists them: a valid element in the wrong place fails validation.
  • Each line needs an ItemRef and two of Quantity, Rate and Amount. QuickBooks works out the third.

The same request with QuBe Sync's API

QuBe Sync takes this JSON, writes the qbXML for you and delivers QuickBooks' answer to your webhook as JSON.

POST /api/v2/connections/{connection_id}/invoices
{
  "bill_address": {
    "addr1": "123 Main St",
    "city": "Springfield",
    "postal_code": "62701",
    "state": "IL"
  },
  "customer_ref": {
    "full_name": "Acme Corp"
  },
  "invoice_line_add": [
    {
      "desc": "Blue widget, large",
      "item_ref": {
        "full_name": "Widget"
      },
      "quantity": 2,
      "rate": 125.0
    }
  ],
  "memo": "Monthly service",
  "ref_number": "1001",
  "txn_date": "2026-01-15"
}

Every field InvoiceAdd takes is in Intuit's reference.

More requests

Customers and sales

All qbXML examples