v2

latestOpenAPI 3.0.12026-07-263104131.9 MB
Billing

Creates an invoice

Creates a new invoice for the specified agreement.

The invoice will be created with status PENDING unless the agreement has auto-approve enabled. If invoice number settings are enabled, a number will be automatically assigned.

post/v2/billing/invoices

Response

Invoice successfully created

idinteger

Unique identifier of the invoice.

invoiceNumberstring

Invoice number.

status'PENDING' | 'APPROVED' | 'COMPLETE' | 'EXPORTING' | 'FAILED' | 'ARCHIVED'

Invoice status.

billingPeriodStartDatestring

Billing period start date.

billingPeriodEndDatestring

Billing period end date.

invoiceDatestring

Invoice date.

dueDatestring

Due date.

subTotalnumber

Subtotal amount before discount.

discountnumber

Discount amount.

subTotalWithDiscountnumber

Subtotal after discount.

taxRatenumber

Tax rate applied.

totalTaxnumber

Total tax amount.

totalnumber

Total amount including tax.

currencystring

Currency code.

notesstring[]

Invoice notes.

invoiceNotestring

Invoice note field.

intervalstring

Billing interval.

errorDescriptionstring nullable

Error description if failed.

createTimestring

Created date.

updateTimestring

Last update date.

invoiceGenerationType'AUTOMATIC' | 'MANUAL'

Invoice generation type.

appUserNamestring

App user name who created/modified the invoice.

failureReasonstring nullable

Failure reason if invoice processing failed.

allowOnlineCreditCardPaymentsboolean

Whether online credit card payments are allowed.

allowOnlineAchPaymentsboolean

Whether online ACH payments are allowed.

hasActiveIntegrationDataboolean

Whether invoice has active integration data.

deletedboolean

Whether the invoice is deleted.

Example response

{
  "id": 123,
  "invoiceNumber": "INV-2024-001",
  "client": {
    "id": 789,
    "name": "Acme Corporation"
  },
  "status": "APPROVED",
  "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
  "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
  "invoiceDate": "2024-02-01T00:00:00.000Z",
  "dueDate": "2024-02-15T00:00:00.000Z",
  "subTotal": 1000,
  "discount": 50,
  "subTotalWithDiscount": 950,
  "taxRate": 0.1,
  "totalTax": 95,
  "total": 1045,
  "currency": "USD",
  "invoiceNote": "Additional invoice information",
  "interval": "MONTHLY",
  "errorDescription": "Failed to export to Xero",
  "createTime": "2024-01-15T10:30:00.000Z",
  "updateTime": "2024-01-20T14:45:00.000Z",
  "invoiceGenerationType": "MANUAL",
  "billContent": {
    "issuerName": "ACME Corp",
    "issuerAddress": "123 Main St, City, State 12345",
    "issuerWebPage": "https://acme.com",
    "issuerPhone": "+1-555-0123",
    "billName": "Client Company",
    "billAddress": "456 Oak Ave, City, State 67890",
    "billEmail": "billing@client.com",
    "billPhone": "+1-555-9876"
  },
  "appUserName": "john.doe@company.com",
  "agreement": {
    "id": 456,
    "name": "Annual Support Agreement"
  },
  "failureReason": "Integration sync failed",
  "allowOnlineCreditCardPayments": true,
  "products": [
    {
      "id": 1,
      "productId": 10,
      "name": "Managed Services",
      "description": "Monthly managed services for 50 devices",
      "price": 10,
      "cost": 5,
      "quantity": 50,
      "subTotal": 500,
      "discount": 25,
      "subTotalWithDiscount": 475,
      "taxRate": 0.1,
      "totalTax": 47.5,
      "total": 522.5,
      "taxable": true,
      "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
      "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
      "accountId": 5,
      "quantityType": "DEVICE_COUNTS",
      "createTime": "2024-01-15T10:30:00.000Z",
      "updateTime": "2024-01-20T14:45:00.000Z",
      "agreementProductId": 123,
      "ticketProductId": 456,
      "integrationSettings": {
        "inheritTaxRateFromAgreement": true,
        "taxRate": "INPUT"
      },
      "tax": {
        "name": "Sales Tax",
        "taxRates": [
          {
            "name": "State Tax",
            "rate": 0.08
          }
        ]
      }
    }
  ],
  "agreementProducts": [
    {
      "id": 1,
      "productId": 10,
      "name": "Managed Services",
      "description": "Monthly managed services for 50 devices",
      "price": 10,
      "cost": 5,
      "quantity": 50,
      "subTotal": 500,
      "discount": 25,
      "subTotalWithDiscount": 475,
      "taxRate": 0.1,
      "totalTax": 47.5,
      "total": 522.5,
      "taxable": true,
      "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
      "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
      "accountId": 5,
      "quantityType": "DEVICE_COUNTS",
      "createTime": "2024-01-15T10:30:00.000Z",
      "updateTime": "2024-01-20T14:45:00.000Z",
      "agreementProductId": 123,
      "ticketProductId": 456,
      "integrationSettings": {
        "inheritTaxRateFromAgreement": true,
        "taxRate": "INPUT"
      },
      "tax": {
        "name": "Sales Tax",
        "taxRates": [
          {
            "name": "State Tax",
            "rate": 0.08
          }
        ]
      }
    }
  ],
  "ticketProducts": [
    {
      "id": 1,
      "productId": 10,
      "name": "Managed Services",
      "description": "Monthly managed services for 50 devices",
      "price": 10,
      "cost": 5,
      "quantity": 50,
      "subTotal": 500,
      "discount": 25,
      "subTotalWithDiscount": 475,
      "taxRate": 0.1,
      "totalTax": 47.5,
      "total": 522.5,
      "taxable": true,
      "billingPeriodStartDate": "2024-01-01T00:00:00.000Z",
      "billingPeriodEndDate": "2024-01-31T00:00:00.000Z",
      "accountId": 5,
      "quantityType": "DEVICE_COUNTS",
      "createTime": "2024-01-15T10:30:00.000Z",
      "updateTime": "2024-01-20T14:45:00.000Z",
      "agreementProductId": 123,
      "ticketProductId": 456,
      "integrationSettings": {
        "inheritTaxRateFromAgreement": true,
        "taxRate": "INPUT"
      },
      "tax": {
        "name": "Sales Tax",
        "taxRates": [
          {
            "name": "State Tax",
            "rate": 0.08
          }
        ]
      }
    }
  ],
  "tax": {
    "name": "Sales Tax",
    "taxRates": [
      {
        "name": "State Tax",
        "rate": 0.08
      }
    ]
  }
}