Invoice

Version: 1.33

Parameters

Extends: TractObject

Elements
Element Type Required? Description

CHOICE:

  • dailyBillCycle

  • monthlyBillCycle

  • quarterlyBillCycle

  • yearlyBillCycle

  • segmentedMonthlyBillCycle

  • dailyBillCycle

  • monthlyBillCycle

  • quarterlyBillCycle

  • yearlyBillCycle

  • segmentedMonthlyBillCycle

Y

The bill cycle that generated this invoice.

billingAccount

billingAccount

The account being invoiced.

invoiceItems

invoiceItems

Order, tax, and other items that make up the invoice amount.

billingStatement

billingsgate

The account's billing statement.

 Attributes
Attribute Required? Datatype Description

invoiceNum

string

The TRACT invoice number.

amount

decimal

The invoice total.

description

string

The invoice description.

pdfPath

string

The URL to download the invoice. Users must have TRACT credentials to access the path.

occurredOn

dateTime

The time the invoice was generated.

dueDate

date

The invoice due date.

paidDate

date

The date the invoice was paid.

amountToPay

decimal

The total due.

lateFeeCharged

boolean

Was a late fee charged?

staus

InvoiceStatus

 

usageCsvPath

string

The path to the usage file containing usage billed on this invoice, if applicable. Users must have TRACT credentials to access the path.

externalInvoiceNum

 

string

The external or 3rd party invoice number, if applicable.

Querying Invoice

For paged results, use the plural of the entity name (for example, billingAccounts, productCategories). For more information, refer to Understanding Queries.

Query Keys
Key Type

eid

Long

invoiceNum

String

billingAccountEid

Long

accountNum

String

occurredOn

Timestamp

status

InvoiceStatus

eventEid

Long

adjustmentEid

Long

billCycleRunEid

Long

discountCodeServiceEid

Long

externalInvoiceNum

String

dueDate

Timestamp

REST Endpoints

/invoices

getInvoices

GET

https://my.tractbilling.com/t/s/r/1.33/invoices

applyPayment

POST

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/applyPayment

applyRemainingPaymentToInvoice

POST

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/applyRemainingPaymentToInvoice

applyRemainingPaymentToInvoice

POST

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/applyRemainingPayment

cancelPayment

POST

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/cancel

getInvoice

GET

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}

getInvoiceJson

GET

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/json

getInvoiceCsv

GET

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/csv

addContentCsv

POST

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/csv

updateContentCsv

PUT

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/csv

addContentPdf

POST

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/pdf

updateContentPdf

PUT

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/pdf

getInvoicePdf

GET

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/pdf

getInvoiceXml

GET

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/xml

resendNotification

POST

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/resend

reverseInvoice

POST

https://my.tractbilling.com/t/s/r/1.33/invoices/{eid}/reverse

/invoiceItemCharges

getInvoiceItems

GET

https://my.tractbilling.com/t/s/r/1.33/invoiceItemCharges

getInvoiceItemCharge

GET

https://my.tractbilling.com/t/s/r/1.33/invoiceItemCharges/{eid}

/invoiceItems

getInvoiceItems

GET

https://my.tractbilling.com/t/s/r/1.33/invoiceItems

getInvoiceItem

GET

https://my.tractbilling.com/t/s/r/1.33/invoiceItems/{eid}

/additionalFeeInvoiceItems

getAdditionalFeeInvoiceItems

GET

https://my.tractbilling.com/t/s/r/1.33/additionalFeeInvoiceItems

getAdditionalFeeInvoiceItem

GET

https://my.tractbilling.com/t/s/r/1.33/additionalFeeInvoiceItems/{eid}

/productInvoiceItems

getProductInvoiceItems

GET

https://my.tractbilling.com/t/s/r/1.33/productInvoiceItems

getProductInvoiceItem

GET

https://my.tractbilling.com/t/s/r/1.33/productInvoiceItems/{eid}

/adjustmentInvoiceItems

getAdjustmentInvoiceItems

GET

https://my.tractbilling.com/t/s/r/1.33/adjustmentInvoiceItems

getAdjustmentInvoiceItem

GET

https://my.tractbilling.com/t/s/r/1.33/adjustmentInvoiceItems/{eid}

/serviceInvoiceItems

getServiceInvoiceItems

GET

https://my.tractbilling.com/t/s/r/1.33/serviceInvoiceItems

getServiceInvoiceItem

GET

https://my.tractbilling.com/t/s/r/1.33/serviceInvoiceItems/{eid}

/taxInvoiceItems

getServiceInvoiceItems

GET

https://my.tractbilling.com/t/s/r/1.33/taxInvoiceItems

getServiceInvoiceItem

GET

https://my.tractbilling.com/t/s/r/1.33/taxInvoiceItems/{eid}

Sample Requests and Responses

SOAP

Example Query

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <ns2:query xmlns="http://www.tractbilling.com/billing/1_31/domain" xmlns:ns2="http://www.tractbilling.com/billing/1_28/service">
            <ns2:queryRequest>
                <simpleDataQuery startIndex="0" size="50">
                    <type>Invoice</type>
                    <parameter parameter="billingAccountEid" parameterValue="19663"/>
                </simpleDataQuery>
            </ns2:queryRequest>
        </ns2:query>
    </soap:Body>
</soap:Envelope>

Resend Invoice

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.tractbilling.com/billing/1_31/service" xmlns:dom="http://www.tractbilling.com/billing/1_31/domain">
<soapenv:Header/>
<soapenv:Body>
<ser:command>
<!-Optional:->
<ser:commandRequest>
<resendInvoice xmlns="http://www.tractbilling.com/billing/1_31/domain">
<invoice eid="514"/>
</resendInvoice>
</ser:commandRequest>
</ser:command>
</soapenv:Body>
</soapenv:Envelope>

REST

Example Query

  • GET https://my.tractbilling.com/t/s/r/1.33/invoices/<eid>

Apply a Payment to Specific Invoice

Apply a Payment to a Specific Invoice on a Billing Account
POST https://my.tractbilling.com/t/s/r/1.33/billingAccounts/240680/applyPayment

<applyPayment xmlns="http://www.tractbilling.com/billing/1_31/domain">
    <billingAccount eid="240680"/>
    <invoice eid="602814"/>
    <payment amount="1" useRecurringPayment="false">
        <creditCardPayment cardType="VISA" cardHolderFirstName="Jennifer" 
cardHolderLastName="Smith" cardIdentifierNumber="4111111111111111" 
cardVerificationNumber="123" cardExpiration="12/2016" description="Test Desc"/>
    </payment>
</applyPayment>

Resend Invoice

  • REST command HTTP POST /tract/s/r/1.32/invoices/514/resend

<resendInvoice xmlns="http://www.tractbilling.com/billing/1_31/domain"> <invoice eid="514"/> </resendInvoice>