Invoices

Finalize and send invoice

Changed on

Updates to SENT status, generates invoice PDF and sends to end-customer

post/invoices/{id}/finalize-and-send

Request

  • Base URL
    https://sandbox.sequencehq.com/api
  • URL
    https://sandbox.sequencehq.com/api/invoices/{id}/finalize-and-send
  • Auth
    none declared. Required headers: Authorization

Path parameters

idstring required

Invoice Id

Headers

Authorizationstring required

Your API credentials. Eg. Basic {credentials}.

sequence-version'2024-07-30'

Use this header to select an API version

Response

OK

idstring required

Invoice ID

sequenceAccountIdstring required

Sequence Account ID

status'IN_PROGRESS' | 'DRAFT' | 'FINAL' | 'SENT' | 'VOIDED' required
currency'AED' | 'ARS' | 'AUD' | 'BRL' | 'BGN' | 'CAD' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CZK' | 'DKK' | 'EGP' | 'EUR' | 'GBP' | 'HKD' | 'ILS' | 'INR' | 'ISK' | 'JPY' | 'KRW' | 'MXN' | 'NOK' | 'NZD' | 'PLN' | 'SAR' | 'SEK' | 'SGD' | 'THB' | 'USD' | 'UYU' | 'ZAR' required
invoiceNumberstring

Invoice number

dueDatestring

Due date

purchaseOrderNumberstring

Purchase order number

referencestring

Reference

customerEmailsstring[] required

Customer email addresses, used for sending the Invoice if provided

customerLegalCompanyNamestring required

Customer's legal company name

memostring

Invoice memo

paymentOptionsInvoicePaymentOption[]

Invoice payment options

customerIdstring required

The ID of the Customer this invoice is linked to

totalTaxstring required

Total tax, in decimal format of the Invoice's currency

netTotalstring required

Net total, in decimal format of the Invoice's currency

grossTotalstring required

Gross total, in decimal format of the Invoice's currency

paymentStatus'UNPAID' | 'PARTIALLY_PAID' | 'PAID' | 'UNCOLLECTIBLE' required
createdAtstring required

Creation time

creditNoteIdsstring[] required

IDs of linked credit notes (if any)

accountingDatestring required

Accounting date

customerTaxStatus'TAXED' | 'TAX_EXEMPT' | 'REVERSE_CHARGED'
isCustomerArchivedboolean required
updatedAtstring required

Last updated time

billingScheduleIdstring

Billing Schedule ID

issueDatestring

Issue date

customerTaxIdstring

Customer's tax ID

creditBalancesstring

Credit balances

dunningStatus'SCHEDULED' | 'OVERDUE_CHECK_SCHEDULED' | 'COMPLETED' | 'FAILED' | 'NOT_REQUIRED'
calculatedAtstring

Time this invoice was last calculated (applicable for invoices generated by billing engine only)

Example response

{
  "id": "ba37a392-7054-4dae-ab37-6fee9e23fe06",
  "sequenceAccountId": "af9b5988-1d7b-45f6-a188-326df5e59b24",
  "status": "DRAFT",
  "currency": "GBP",
  "invoiceNumber": "INV2",
  "dueDate": "2022-11-05",
  "purchaseOrderNumber": "PO123",
  "reference": "ref",
  "customerEmails": [
    "customer@example.com"
  ],
  "customerLegalCompanyName": "Facebook",
  "customerBillingAddress": {
    "line1": "Flat 1",
    "line2": "15 Yemen Road",
    "town": "Yemen",
    "state": "CA",
    "postcode": "YE1 2YE",
    "country": "YE"
  },
  "customerShippingAddress": {
    "line1": "742 Evergreen Terrace",
    "line2": "",
    "town": "Springfield",
    "state": "CA",
    "postcode": "12345",
    "country": "US"
  },
  "memo": "Thanks",
  "paymentOptions": [
    "BANK_TRANSFER"
  ],
  "billingPeriod": {
    "start": "2022-10-01",
    "endInclusive": "2022-10-30"
  },
  "customerId": "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
  "totalTax": "2",
  "netTotal": "12",
  "grossTotal": "10",
  "metadata": [
    {
      "key": "example-label",
      "value": "label-value"
    }
  ],
  "paymentStatus": "UNPAID",
  "createdAt": "2022-10-30T00:00:00Z",
  "creditNoteIds": [
    "941272d1-f840-4e16-b698-0cd455c81e0e"
  ],
  "linkedServices": [
    {
      "externalId": "ID",
      "externalService": "Xero",
      "syncTime": "2022-06-28T16:47:00Z",
      "externalUrl": "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
    }
  ],
  "merchantDetails": {
    "address": {
      "line1": "Flat 1",
      "line2": "123 Fake Street",
      "town": "New York",
      "state": "NY",
      "postcode": "AB1 2EF",
      "country": "US"
    },
    "phoneNumber": "0800001066",
    "email": "donald@example.com",
    "taxId": "TAX",
    "iban": "GB33BUKB20201555555555",
    "ukAccountDetails": {
      "sortCode": "123456",
      "accountNumber": "12345678"
    },
    "usAchDetails": {
      "accountNumber": "12345678",
      "accountName": "John Doe",
      "bankName": "Chase",
      "bankRoutingNumber": "123456789"
    },
    "usWireDetails": {
      "accountNumber": "12345678",
      "accountName": "John Doe",
      "bankName": "Chase",
      "bankRoutingNumber": "123456789",
      "swiftCode": "CHASUS33",
      "bankAddress": {
        "line1": "JP Morgan Chase",
        "town": "New York City",
        "state": "NY",
        "postcode": "10017",
        "country": "US"
      }
    },
    "swedishBankgiroDestination": {
      "bankgiroNumber": "123-4567",
      "accountName": "The Merchant"
    },
    "legalCompanyName": "The Merchant",
    "customFields": [],
    "includeBeneficiaryAddressInPaymentDetails": false
  },
  "accountingDate": "2022-10-05",
  "customerTaxStatus": "TAXED",
  "renderSettings": {
    "paymentLinkDisplay": "HIDE_PAYMENT_LINK"
  },
  "isCustomerArchived": false,
  "updatedAt": "2022-10-30T00:00:00Z"
}

Changes

    • breaking

      the // response's property type changed from no type to object for status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the required property /// to the response with the status

    • info

      added the required property /// to the response with the status

    • breaking

      the // response's property type changed from object to no type for status

    • breaking

      removed the required property /// from the response with the status

    • breaking

      removed the required property /// from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property / to the response with the status