> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequencehq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an Invoice by ID

> Get an Invoice by ID



## OpenAPI

````yaml invoices.2024-07-30.product.live GET /invoices/{id}
openapi: 3.0.0
info:
  title: ''
  description: ''
  version: 0.0.1
servers:
  - url: https://dev.seqhq.io
    description: E2E
  - url: https://dev.seqhq.io
    description: DEV
  - url: https://sandbox.sequencehq.com
    description: SANDBOX
  - url: https://eu.sequencehq.com
    description: PRODUCTION
security: []
tags:
  - name: Credit Note Line Items
  - name: Credit Notes
  - name: Invoices
  - name: Invoice Settings
  - name: Invoice Line Items
paths:
  /invoices/{id}:
    servers: []
    parameters: []
    get:
      tags:
        - Invoices
      summary: Get an Invoice by ID
      description: Get an Invoice by ID
      operationId: getInvoicesById
      parameters:
        - name: id
          in: path
          description: Invoice ID
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            Your [API credentials](/reference/authentication). Eg. `Basic
            {credentials}`.
          required: true
          schema:
            type: string
        - name: sequence-version
          in: header
          description: Use this header to select an API version
          required: false
          schema:
            type: string
            enum:
              - '2024-07-30'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceResponse'
                example:
                  id: 6cedbb5e-4f77-4217-b8d4-020e7e4d33c9
                  sequenceAccountId: 68233908-402a-43b4-8952-1c2ab0ef0b25
                  billingScheduleId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                  billingRunId: 9c5fdd27-1f7a-41e7-ab67-14f65272a853
                  status: DRAFT
                  currency: GBP
                  invoiceNumber: INV00001
                  issueDate: '2022-09-15'
                  dueDate: '2022-09-30'
                  purchaseOrderNumber: PO123
                  reference: ref
                  customerEmails:
                    - customer.user.a@example.com
                    - customer.user.b@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
                    town: Springfield
                    state: CA
                    postcode: '12345'
                    country: US
                  memo: Thanks
                  paymentOptions:
                    - BANK_TRANSFER
                  billingPeriod:
                    start: '2022-10-01'
                    endInclusive: '2022-10-30'
                  customerId: 61b083e0-1faa-47ca-9aeb-6205da8f6c47
                  totalTax: '2.50'
                  netTotal: '51.20'
                  grossTotal: '101.23'
                  metadata:
                    - key: example-label
                      value: label-value
                  customerTaxId: TAX123
                  paymentStatus: UNPAID
                  createdAt: '2022-10-30T00:00:00Z'
                  updatedAt: '2022-10-30T00:00:00Z'
                  creditNoteIds:
                    - af60cab3-812d-4250-a051-0fb7133a00c7
                  linkedServices:
                    - externalId: '123'
                      externalService: Xero
                      syncTime: '2022-06-28T16:47:00Z'
                      externalUrl: >-
                        https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504
                  merchantDetails:
                    address:
                      line1: The White House
                      line2: 1600 Pennsylvania Avenue
                      town: Washington, D.C.
                      state: CA
                      postcode: '20500'
                      country: US
                    phoneNumber: '0800001066'
                    email: finance@example.com
                    taxId: TAX60
                    iban: GB33BUKB20201555555555
                    ukAccountDetails:
                      sortCode: '000000'
                      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
                    caBankAccountDetails:
                      transitNumber: '123'
                      institutionNumber: '12345'
                      accountNumber: '1234567'
                    canadianInternationalDestination:
                      legalName: John Doe
                      accountNumber: '12345678'
                      transitNumber: '12345'
                      bankName: Chase
                      bankAddress:
                        line1: JP Morgan Chase
                        town: New York City
                        state: NY
                        postcode: '10017'
                        country: US
                      institutionNumber: '123'
                      swiftCode: CHASUS33
                      intermediaryBank:
                        bankName: Chase
                        bankAddress:
                          line1: JP Morgan Chase
                          town: New York City
                          state: NY
                          postcode: '10017'
                          country: US
                        swiftCode: CHASUS33
                        routingNumber: '123456789'
                    australianDestination:
                      legalName: John Doe
                      accountNumber: '12345678'
                      swiftCode: CHASUS33
                      bsb: '123456'
                    swedishBankgiroDestination:
                      bankgiroNumber: 123-4567
                      accountName: The Merchant
                    logoUrl: logo
                    legalCompanyName: The Merchant
                    primaryColour: '#000000'
                    customFields:
                      - key: example-label
                        value: label-value
                    includeBeneficiaryAddressInPaymentDetails: false
                  creditBalances: 'Verification 2 credit balance: 7/7 (expiring on 4 May 2023)'
                  dunningStatus: SCHEDULED
                  accountingDate: '2022-09-30'
                  calculatedAt: '2022-09-30T00:00:00Z'
                  customerTaxStatus: TAXED
                  renderSettings:
                    paymentLinkDisplay: HIDE_PAYMENT_LINK
                  isCustomerArchived: false
                  attachmentAssets:
                    - id: 4b36a61e-425e-4640-aa26-6224c577b613
                      createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
                      type: DOCUMENT
                      format: PDF
                      fileName: my-document.pdf
                      fileSizeBytes: 12345
                      url: >-
                        https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf
                      createdAt: '2022-06-28T16:47:00Z'
                  balance: '1000.00'
                  balanceVersion: 0
                  integrationPaymentStatuses:
                    stripe: PAID
                    goCardless: CANCELLED
                  appliedCreditNotes:
                    - id: 8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b
                      creditNoteNumber: CN00001
                      netTotal: '41.67'
                      totalTax: '8.33'
                      grossTotal: '50.00'
                      lineItems:
                        - name: Adjustment
                          netTotal: '41.67'
                          grossTotal: '50.00'
                          invoiceLineItemIds:
                            - 2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d
                  appliedCreditGrants:
                    - creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
                      creditGrantName: Q3 prepaid credit
                      amount: '820.00'
                      taxAmount: '164.00'
                      status: APPLIED
                  projectedCreditGrants:
                    - creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
                      creditGrantName: Q3 prepaid credit
                      amount: '30.00'
                  projectedAmountDue: '71.23'
                  paymentAllocations:
                    - paymentId: 3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e
                      amount: '50.00'
                      allocatedAt: '2022-10-30T00:00:00Z'
                      paidAt: '2022-10-29T00:00:00Z'
                      origin: MANUAL
                  paymentTermDays: 30
                  dueDateSource: CALCULATED
                  dueDatePolicy:
                    paymentTermDays: 30
                    type: PAYMENT_TERMS
                  dueDateStatus: SET
              examples:
                InvoiceResponse:
                  summary: ''
                  value:
                    id: 6cedbb5e-4f77-4217-b8d4-020e7e4d33c9
                    sequenceAccountId: 68233908-402a-43b4-8952-1c2ab0ef0b25
                    billingScheduleId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                    billingRunId: 9c5fdd27-1f7a-41e7-ab67-14f65272a853
                    status: DRAFT
                    currency: GBP
                    invoiceNumber: INV00001
                    issueDate: '2022-09-15'
                    dueDate: '2022-09-30'
                    purchaseOrderNumber: PO123
                    reference: ref
                    customerEmails:
                      - customer.user.a@example.com
                      - customer.user.b@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
                      town: Springfield
                      state: CA
                      postcode: '12345'
                      country: US
                    memo: Thanks
                    paymentOptions:
                      - BANK_TRANSFER
                    billingPeriod:
                      start: '2022-10-01'
                      endInclusive: '2022-10-30'
                    customerId: 61b083e0-1faa-47ca-9aeb-6205da8f6c47
                    totalTax: '2.50'
                    netTotal: '51.20'
                    grossTotal: '101.23'
                    metadata:
                      - key: example-label
                        value: label-value
                    customerTaxId: TAX123
                    paymentStatus: UNPAID
                    createdAt: '2022-10-30T00:00:00Z'
                    updatedAt: '2022-10-30T00:00:00Z'
                    creditNoteIds:
                      - af60cab3-812d-4250-a051-0fb7133a00c7
                    linkedServices:
                      - externalId: '123'
                        externalService: Xero
                        syncTime: '2022-06-28T16:47:00Z'
                        externalUrl: >-
                          https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504
                    merchantDetails:
                      address:
                        line1: The White House
                        line2: 1600 Pennsylvania Avenue
                        town: Washington, D.C.
                        state: CA
                        postcode: '20500'
                        country: US
                      phoneNumber: '0800001066'
                      email: finance@example.com
                      taxId: TAX60
                      iban: GB33BUKB20201555555555
                      ukAccountDetails:
                        sortCode: '000000'
                        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
                      caBankAccountDetails:
                        transitNumber: '123'
                        institutionNumber: '12345'
                        accountNumber: '1234567'
                      canadianInternationalDestination:
                        legalName: John Doe
                        accountNumber: '12345678'
                        transitNumber: '12345'
                        bankName: Chase
                        bankAddress:
                          line1: JP Morgan Chase
                          town: New York City
                          state: NY
                          postcode: '10017'
                          country: US
                        institutionNumber: '123'
                        swiftCode: CHASUS33
                        intermediaryBank:
                          bankName: Chase
                          bankAddress:
                            line1: JP Morgan Chase
                            town: New York City
                            state: NY
                            postcode: '10017'
                            country: US
                          swiftCode: CHASUS33
                          routingNumber: '123456789'
                      australianDestination:
                        legalName: John Doe
                        accountNumber: '12345678'
                        swiftCode: CHASUS33
                        bsb: '123456'
                      swedishBankgiroDestination:
                        bankgiroNumber: 123-4567
                        accountName: The Merchant
                      logoUrl: logo
                      legalCompanyName: The Merchant
                      primaryColour: '#000000'
                      customFields:
                        - key: example-label
                          value: label-value
                      includeBeneficiaryAddressInPaymentDetails: false
                    creditBalances: >-
                      Verification 2 credit balance: 7/7 (expiring on 4 May
                      2023)
                    dunningStatus: SCHEDULED
                    accountingDate: '2022-09-30'
                    calculatedAt: '2022-09-30T00:00:00Z'
                    customerTaxStatus: TAXED
                    renderSettings:
                      paymentLinkDisplay: HIDE_PAYMENT_LINK
                    isCustomerArchived: false
                    attachmentAssets:
                      - id: 4b36a61e-425e-4640-aa26-6224c577b613
                        createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
                        type: DOCUMENT
                        format: PDF
                        fileName: my-document.pdf
                        fileSizeBytes: 12345
                        url: >-
                          https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf
                        createdAt: '2022-06-28T16:47:00Z'
                    balance: '1000.00'
                    balanceVersion: 0
                    integrationPaymentStatuses:
                      stripe: PAID
                      goCardless: CANCELLED
                    appliedCreditNotes:
                      - id: 8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b
                        creditNoteNumber: CN00001
                        netTotal: '41.67'
                        totalTax: '8.33'
                        grossTotal: '50.00'
                        lineItems:
                          - name: Adjustment
                            netTotal: '41.67'
                            grossTotal: '50.00'
                            invoiceLineItemIds:
                              - 2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d
                    appliedCreditGrants:
                      - creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
                        creditGrantName: Q3 prepaid credit
                        amount: '820.00'
                        taxAmount: '164.00'
                        status: APPLIED
                    projectedCreditGrants:
                      - creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
                        creditGrantName: Q3 prepaid credit
                        amount: '30.00'
                    projectedAmountDue: '71.23'
                    paymentAllocations:
                      - paymentId: 3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e
                        amount: '50.00'
                        allocatedAt: '2022-10-30T00:00:00Z'
                        paidAt: '2022-10-29T00:00:00Z'
                        origin: MANUAL
                    paymentTermDays: 30
                    dueDateSource: CALCULATED
                    dueDatePolicy:
                      paymentTermDays: 30
                      type: PAYMENT_TERMS
                    dueDateStatus: SET
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not Found
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    InvoiceResponse:
      required:
        - accountingDate
        - appliedCreditGrants
        - appliedCreditNotes
        - createdAt
        - creditNoteIds
        - currency
        - customerBillingAddress
        - customerEmails
        - customerId
        - customerLegalCompanyName
        - customerShippingAddress
        - dueDatePolicy
        - dueDateSource
        - dueDateStatus
        - grossTotal
        - id
        - integrationPaymentStatuses
        - isCustomerArchived
        - linkedServices
        - metadata
        - netTotal
        - paymentAllocations
        - paymentStatus
        - paymentTermDays
        - projectedAmountDue
        - projectedCreditGrants
        - renderSettings
        - sequenceAccountId
        - status
        - totalTax
        - updatedAt
      type: object
      example:
        id: 6cedbb5e-4f77-4217-b8d4-020e7e4d33c9
        sequenceAccountId: 68233908-402a-43b4-8952-1c2ab0ef0b25
        billingScheduleId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        billingRunId: 9c5fdd27-1f7a-41e7-ab67-14f65272a853
        status: DRAFT
        currency: GBP
        invoiceNumber: INV00001
        issueDate: '2022-09-15'
        dueDate: '2022-09-30'
        purchaseOrderNumber: PO123
        reference: ref
        customerEmails:
          - customer.user.a@example.com
          - customer.user.b@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
          town: Springfield
          state: CA
          postcode: '12345'
          country: US
        memo: Thanks
        paymentOptions:
          - BANK_TRANSFER
        billingPeriod:
          start: '2022-10-01'
          endInclusive: '2022-10-30'
        customerId: 61b083e0-1faa-47ca-9aeb-6205da8f6c47
        totalTax: '2.50'
        netTotal: '51.20'
        grossTotal: '101.23'
        metadata:
          - key: example-label
            value: label-value
        customerTaxId: TAX123
        paymentStatus: UNPAID
        createdAt: '2022-10-30T00:00:00Z'
        updatedAt: '2022-10-30T00:00:00Z'
        creditNoteIds:
          - af60cab3-812d-4250-a051-0fb7133a00c7
        linkedServices:
          - externalId: '123'
            externalService: Xero
            syncTime: '2022-06-28T16:47:00Z'
            externalUrl: >-
              https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504
        merchantDetails:
          address:
            line1: The White House
            line2: 1600 Pennsylvania Avenue
            town: Washington, D.C.
            state: CA
            postcode: '20500'
            country: US
          phoneNumber: '0800001066'
          email: finance@example.com
          taxId: TAX60
          iban: GB33BUKB20201555555555
          ukAccountDetails:
            sortCode: '000000'
            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
          caBankAccountDetails:
            transitNumber: '123'
            institutionNumber: '12345'
            accountNumber: '1234567'
          canadianInternationalDestination:
            legalName: John Doe
            accountNumber: '12345678'
            transitNumber: '12345'
            bankName: Chase
            bankAddress:
              line1: JP Morgan Chase
              town: New York City
              state: NY
              postcode: '10017'
              country: US
            institutionNumber: '123'
            swiftCode: CHASUS33
            intermediaryBank:
              bankName: Chase
              bankAddress:
                line1: JP Morgan Chase
                town: New York City
                state: NY
                postcode: '10017'
                country: US
              swiftCode: CHASUS33
              routingNumber: '123456789'
          australianDestination:
            legalName: John Doe
            accountNumber: '12345678'
            swiftCode: CHASUS33
            bsb: '123456'
          swedishBankgiroDestination:
            bankgiroNumber: 123-4567
            accountName: The Merchant
          logoUrl: logo
          legalCompanyName: The Merchant
          primaryColour: '#000000'
          customFields:
            - key: example-label
              value: label-value
          includeBeneficiaryAddressInPaymentDetails: false
        creditBalances: 'Verification 2 credit balance: 7/7 (expiring on 4 May 2023)'
        dunningStatus: SCHEDULED
        accountingDate: '2022-09-30'
        calculatedAt: '2022-09-30T00:00:00Z'
        customerTaxStatus: TAXED
        renderSettings:
          paymentLinkDisplay: HIDE_PAYMENT_LINK
        isCustomerArchived: false
        attachmentAssets:
          - id: 4b36a61e-425e-4640-aa26-6224c577b613
            createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
            type: DOCUMENT
            format: PDF
            fileName: my-document.pdf
            fileSizeBytes: 12345
            url: >-
              https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf
            createdAt: '2022-06-28T16:47:00Z'
        balance: '1000.00'
        balanceVersion: 0
        integrationPaymentStatuses:
          stripe: PAID
          goCardless: CANCELLED
        appliedCreditNotes:
          - id: 8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b
            creditNoteNumber: CN00001
            netTotal: '41.67'
            totalTax: '8.33'
            grossTotal: '50.00'
            lineItems:
              - name: Adjustment
                netTotal: '41.67'
                grossTotal: '50.00'
                invoiceLineItemIds:
                  - 2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d
        appliedCreditGrants:
          - creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
            creditGrantName: Q3 prepaid credit
            amount: '820.00'
            taxAmount: '164.00'
            status: APPLIED
        projectedCreditGrants:
          - creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
            creditGrantName: Q3 prepaid credit
            amount: '30.00'
        projectedAmountDue: '71.23'
        paymentAllocations:
          - paymentId: 3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e
            amount: '50.00'
            allocatedAt: '2022-10-30T00:00:00Z'
            paidAt: '2022-10-29T00:00:00Z'
            origin: MANUAL
        paymentTermDays: 30
        dueDateSource: CALCULATED
        dueDatePolicy:
          paymentTermDays: 30
          type: PAYMENT_TERMS
        dueDateStatus: SET
      properties:
        id:
          type: string
          description: Invoice ID
          example: 6cedbb5e-4f77-4217-b8d4-020e7e4d33c9
        sequenceAccountId:
          type: string
          description: Sequence Account ID
          example: 68233908-402a-43b4-8952-1c2ab0ef0b25
        billingScheduleId:
          type: string
          description: Billing Schedule ID
          example: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        billingRunId:
          type: string
          description: Billing Run ID
          example: 9c5fdd27-1f7a-41e7-ab67-14f65272a853
        status:
          $ref: '#/components/schemas/InvoiceStatus'
          description: Invoice status
        currency:
          $ref: '#/components/schemas/Currency'
          description: Invoice currency
        invoiceNumber:
          type: string
          description: Invoice number
          example: INV00001
        issueDate:
          type: string
          description: Issue date
          example: '2022-09-15'
        dueDate:
          type: string
          description: Due date
          example: '2022-09-30'
        purchaseOrderNumber:
          type: string
          description: Purchase order number
          example: PO123
        reference:
          type: string
          description: Reference
          example: ref
        customerEmails:
          type: array
          description: Customer email addresses, used for sending the Invoice if provided
          example:
            - customer.user.a@example.com
            - customer.user.b@example.com
          items:
            type: string
        customerLegalCompanyName:
          type: string
          description: Customer's legal company name
          example: Facebook
        customerBillingAddress:
          $ref: '#/components/schemas/Address'
        customerShippingAddress:
          $ref: '#/components/schemas/Address'
        memo:
          type: string
          description: Invoice memo
          example: Thanks
        paymentOptions:
          type: array
          description: Invoice payment options
          example:
            - BANK_TRANSFER
          items:
            $ref: '#/components/schemas/InvoicePaymentOption'
        billingPeriod:
          $ref: '#/components/schemas/InclusiveDateRange'
        customerId:
          type: string
          description: The ID of the Customer this invoice is linked to
          example: 61b083e0-1faa-47ca-9aeb-6205da8f6c47
        totalTax:
          type: string
          description: Total tax, in decimal format of the Invoice's currency
          example: '2.50'
        netTotal:
          type: string
          description: Net total, in decimal format of the Invoice's currency
          example: '51.20'
        grossTotal:
          type: string
          description: Gross total, in decimal format of the Invoice's currency
          example: '101.23'
        metadata:
          type: array
          description: >-
            Mapping of key-value pairs to attach to the Invoice. These are not
            interpreted by Sequence; they are present for your use alone.
          example:
            - key: example-label
              value: label-value
          items:
            $ref: '#/components/schemas/KeyValuePair'
        customerTaxId:
          type: string
          description: Customer's tax ID
          example: TAX123
        paymentStatus:
          $ref: '#/components/schemas/InvoicePaymentStatus'
          description: Invoice payment status
        createdAt:
          type: string
          description: Creation time
          example: '2022-10-30T00:00:00Z'
        updatedAt:
          type: string
          description: Updated time
          example: '2022-10-30T00:00:00Z'
        creditNoteIds:
          type: array
          description: IDs of linked credit notes (if any)
          example:
            - af60cab3-812d-4250-a051-0fb7133a00c7
          items:
            type: string
        linkedServices:
          type: array
          description: External services which are linked to this invoice
          example:
            - externalId: '123'
              externalService: Xero
              syncTime: '2022-06-28T16:47:00Z'
              externalUrl: >-
                https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504
          items:
            $ref: '#/components/schemas/LinkInfo'
        merchantDetails:
          $ref: '#/components/schemas/InvoiceMerchantDetails'
        creditBalances:
          type: string
          description: Credit balances
          example: 'Verification 2 credit balance: 7/7 (expiring on 4 May 2023)'
        dunningStatus:
          $ref: '#/components/schemas/InvoiceDunningStatus'
          description: Dunning status
        accountingDate:
          type: string
          description: Accounting date
          example: '2022-09-30'
        calculatedAt:
          type: string
          description: >-
            Time this invoice was last calculated (applicable for invoices
            generated by billing engine only)
          example: '2022-09-30T00:00:00Z'
        customerTaxStatus:
          $ref: '#/components/schemas/TaxStatus'
          description: Customer tax status
        renderSettings:
          $ref: '#/components/schemas/InvoiceRenderSettingsInlineAggregate'
        isCustomerArchived:
          type: boolean
          description: isCustomerArchived
          example: false
        attachmentAssets:
          type: array
          description: Assets attached to this invoice
          example:
            - id: 4b36a61e-425e-4640-aa26-6224c577b613
              createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
              type: DOCUMENT
              format: PDF
              fileName: my-document.pdf
              fileSizeBytes: 12345
              url: >-
                https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf
              createdAt: '2022-06-28T16:47:00Z'
          items:
            $ref: '#/components/schemas/AssetResponse'
        balance:
          type: string
          description: Outstanding amount owed on this invoice
          example: '1000.00'
        balanceVersion:
          type: integer
          description: >-
            Ledger version of the balance. Advances each time the balance
            changes; null when the invoice has no ledger balance.
          format: int64
          example: 0
        integrationPaymentStatuses:
          $ref: '#/components/schemas/IntegrationPaymentStatuses'
        appliedCreditNotes:
          type: array
          description: >-
            Credit notes applied to this invoice, with per-credit-note totals
            and line items
          example:
            - id: 8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b
              creditNoteNumber: CN00001
              netTotal: '41.67'
              totalTax: '8.33'
              grossTotal: '50.00'
              lineItems:
                - name: Adjustment
                  netTotal: '41.67'
                  grossTotal: '50.00'
                  invoiceLineItemIds:
                    - 2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d
          items:
            $ref: '#/components/schemas/AppliedCreditNoteResponse'
        appliedCreditGrants:
          type: array
          description: >-
            Credit grants applied to this invoice, with the total credit each
            grant contributed
          example:
            - creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
              creditGrantName: Q3 prepaid credit
              amount: '820.00'
              taxAmount: '164.00'
              status: APPLIED
          items:
            $ref: '#/components/schemas/AppliedCreditGrantResponse'
        projectedCreditGrants:
          type: array
          description: >-
            Credit grants expected to reduce this invoice when it is finalised,
            one row per grant. An estimate that is only locked in at
            finalisation, and empty once the invoice has been finalised.
          example:
            - creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
              creditGrantName: Q3 prepaid credit
              amount: '30.00'
          items:
            $ref: '#/components/schemas/ProjectedCreditGrantResponse'
        projectedAmountDue:
          type: string
          description: >-
            What this invoice is expected to owe once projectedCreditGrants is
            applied to it, and grossTotal itself where nothing is projected,
            rounded to the currency's scale. An estimate that is only locked in
            at finalisation.
          example: '71.23'
        paymentAllocations:
          type: array
          description: >-
            Payments allocated to this invoice, with per-payment amounts and
            dates
          example:
            - paymentId: 3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e
              amount: '50.00'
              allocatedAt: '2022-10-30T00:00:00Z'
              paidAt: '2022-10-29T00:00:00Z'
              origin: MANUAL
          items:
            $ref: '#/components/schemas/PaymentAllocationResponse'
        paymentTermDays:
          type: integer
          description: Payment terms in days. The due date is computed from these terms.
          nullable: true
          example: 30
        dueDateSource:
          $ref: '#/components/schemas/DueDateSource'
          description: >-
            How the due date was determined: MANUAL when set to a fixed date,
            CALCULATED when computed from payment terms.
        dueDatePolicy:
          description: >-
            How the due date is set: MANUAL for a date chosen by hand,
            PAYMENT_TERMS for a number of days after the due date anchor. Null
            when the invoice has neither a due date nor payment terms. Send the
            same value back to keep the policy, a different one to change it.
          nullable: true
          example:
            paymentTermDays: 30
            type: PAYMENT_TERMS
          oneOf:
            - $ref: '#/components/schemas/DueDatePolicyManual'
            - $ref: '#/components/schemas/DueDatePolicyPaymentTerms'
          discriminator:
            propertyName: type
            mapping:
              MANUAL:
                $ref: '#/components/schemas/DueDatePolicyManual'
              PAYMENT_TERMS:
                $ref: '#/components/schemas/DueDatePolicyPaymentTerms'
        dueDateStatus:
          $ref: '#/components/schemas/DueDateStatus'
          description: >-
            Whether the invoice has its due date yet. PENDING means it has none:
            an account that anchors due dates to the issue date fills the due
            date in when the invoice is issued.
    InvoiceStatus:
      type: string
      example: DRAFT
      enum:
        - IN_PROGRESS
        - DRAFT
        - FINAL
        - SENT
        - VOIDED
    Currency:
      type: string
      example: GBP
      enum:
        - 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
    Address:
      required:
        - country
        - line1
        - postcode
        - town
      type: object
      description: Customer's billing address
      example:
        line1: Flat 1
        line2: 15 Yemen Road
        town: Yemen
        state: CA
        postcode: YE1 2YE
        country: YE
      properties:
        line1:
          type: string
          description: Address line 1
          example: Flat 1
        line2:
          type: string
          description: Address line 2
          example: 15 Yemen Road
        town:
          type: string
          description: Town or city
          example: Yemen
        state:
          $ref: '#/components/schemas/State'
          description: State or province (required for USA and Canada)
        postcode:
          type: string
          description: Postal code
          example: YE1 2YE
        country:
          $ref: '#/components/schemas/CountryCode'
          description: >-
            Country code ([ISO 3166-1
            alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))
    InvoicePaymentOption:
      type: string
      example: BANK_TRANSFER
      enum:
        - BANK_TRANSFER
        - LINK
    InclusiveDateRange:
      required:
        - endInclusive
        - start
      type: object
      description: Service Period
      example:
        start: '2025-10-01'
        endInclusive: '2025-10-30'
      properties:
        start:
          type: string
          description: Start date, included in the whole range
          example: '2025-10-01'
        endInclusive:
          type: string
          description: End date, included in the whole range
          example: '2025-10-30'
    KeyValuePair:
      required:
        - key
        - value
      type: object
      example:
        key: example-label
        value: label-value
      properties:
        key:
          type: string
          example: example-label
        value:
          type: string
          example: label-value
    InvoicePaymentStatus:
      type: string
      example: UNPAID
      enum:
        - UNPAID
        - PARTIALLY_PAID
        - PAID
        - UNCOLLECTIBLE
    LinkInfo:
      required:
        - externalId
        - externalService
        - syncTime
      type: object
      example:
        externalId: '123'
        externalService: Xero
        syncTime: '2022-06-28T16:47:00Z'
        externalUrl: https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504
      properties:
        externalId:
          type: string
          description: The ID of the related entity in external system
          example: '123'
        externalService:
          $ref: '#/components/schemas/IntegrationService'
          description: The connected service
        syncTime:
          type: string
          description: The time that this was synced from the connected integration
          example: '2022-06-28T16:47:00Z'
        externalUrl:
          type: string
          description: External URL
          example: https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504
    InvoiceMerchantDetails:
      required:
        - address
        - customFields
        - email
        - includeBeneficiaryAddressInPaymentDetails
        - legalCompanyName
      type: object
      description: Merchant details
      example:
        address:
          line1: The White House
          line2: 1600 Pennsylvania Avenue
          town: Washington, D.C.
          state: CA
          postcode: '20500'
          country: US
        phoneNumber: '0800001066'
        email: donald@example.com
        taxId: TAX60
        iban: GB33BUKB20201555555555
        ukAccountDetails:
          sortCode: '000000'
          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
        caBankAccountDetails:
          transitNumber: '123'
          institutionNumber: '12345'
          accountNumber: '1234567'
        canadianInternationalDestination:
          legalName: John Doe
          accountNumber: '12345678'
          transitNumber: '12345'
          bankName: Chase
          bankAddress:
            line1: JP Morgan Chase
            town: New York City
            state: NY
            postcode: '10017'
            country: US
          institutionNumber: '123'
          swiftCode: CHASUS33
          intermediaryBank:
            bankName: Chase
            bankAddress:
              line1: JP Morgan Chase
              town: New York City
              state: NY
              postcode: '10017'
              country: US
            swiftCode: CHASUS33
            routingNumber: '123456789'
        australianDestination:
          legalName: John Doe
          accountNumber: '12345678'
          swiftCode: CHASUS33
          bsb: '123456'
        swedishBankgiroDestination:
          bankgiroNumber: 123-4567
          accountName: '12345678'
        logoUrl: logo
        legalCompanyName: The Merchant
        primaryColour: '#000000'
        customFields:
          - key: example-label
            value: label-value
        includeBeneficiaryAddressInPaymentDetails: true
      properties:
        address:
          $ref: '#/components/schemas/Address'
        phoneNumber:
          type: string
          description: Merchant's phone number
          example: '0800001066'
        email:
          type: string
          description: Merchant's email
          example: donald@example.com
        taxId:
          type: string
          description: Merchant's tax ID
          example: TAX60
        iban:
          type: string
          description: Merchant's IBAN, for receiving payment by bank transfer
          example: GB33BUKB20201555555555
        ukAccountDetails:
          $ref: '#/components/schemas/SortCodeAccountNumber'
        usAchDetails:
          $ref: '#/components/schemas/UsAchDestination'
        usWireDetails:
          $ref: '#/components/schemas/UsWireDestination'
        caBankAccountDetails:
          $ref: '#/components/schemas/CanadianBankAccountDestination'
        canadianInternationalDestination:
          $ref: '#/components/schemas/CanadianInternationalDestination'
        australianDestination:
          $ref: '#/components/schemas/AustralianBankAccountDestination'
        swedishBankgiroDestination:
          $ref: '#/components/schemas/SwedishBankgiroDestination'
        logoUrl:
          type: string
          description: Merchant's logo image URL
          example: logo
        legalCompanyName:
          type: string
          description: Merchant's legal company name
          example: The Merchant
        primaryColour:
          type: string
          description: Merchant's primary colour (for invoice rendering)
          example: '#000000'
        customFields:
          type: array
          description: merchantCustomFields
          example:
            - key: example-label
              value: label-value
          items:
            $ref: '#/components/schemas/KeyValuePair'
        includeBeneficiaryAddressInPaymentDetails:
          type: boolean
          description: Include beneficiary address in payment details on invoice
          example: true
    InvoiceDunningStatus:
      type: string
      example: SCHEDULED
      enum:
        - SCHEDULED
        - OVERDUE_CHECK_SCHEDULED
        - COMPLETED
        - FAILED
        - NOT_REQUIRED
    TaxStatus:
      type: string
      example: TAXED
      enum:
        - TAXED
        - TAX_EXEMPT
        - REVERSE_CHARGED
    InvoiceRenderSettingsInlineAggregate:
      required:
        - paymentLinkDisplay
      type: object
      description: Settings that control how the invoice is rendered.
      example:
        paymentLinkDisplay: HIDE_PAYMENT_LINK
      properties:
        paymentLinkDisplay:
          $ref: '#/components/schemas/PaymentLinkDisplayOption'
          description: >-
            Payment link display preference. By default, the payment link is
            shown.
    AssetResponse:
      required:
        - createdAt
        - createdBy
        - fileName
        - fileSizeBytes
        - format
        - id
        - type
        - url
      type: object
      example:
        id: 4b36a61e-425e-4640-aa26-6224c577b613
        createdBy: 94703530-1293-479b-bd37-ccad42fd9c8b
        type: DOCUMENT
        format: PDF
        fileName: my-document.pdf
        fileSizeBytes: 12345
        url: >-
          https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf
        createdAt: '2022-06-28T16:47:00Z'
      properties:
        id:
          type: string
          description: Unique ID
          example: 4b36a61e-425e-4640-aa26-6224c577b613
        createdBy:
          type: string
          description: The Sequence user who created this asset
          example: 94703530-1293-479b-bd37-ccad42fd9c8b
        type:
          $ref: '#/components/schemas/AssetType'
          description: Either image or document
        format:
          $ref: '#/components/schemas/AssetFormat'
          description: >-
            Identifies the intended data format. Allowed formats are: jpg, jpeg,
            png, and pdf
        fileName:
          type: string
          description: Filename of the uploaded file
          example: my-document.pdf
        fileSizeBytes:
          type: integer
          description: Size of the uploaded file in bytes
          format: int32
          example: 12345
        url:
          type: string
          description: URL to download the asset
          example: >-
            https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf
        createdAt:
          type: string
          description: Creation timestamp. Formatted as an ISO 8601 timestamp.
          example: '2022-06-28T16:47:00Z'
    IntegrationPaymentStatuses:
      type: object
      description: Payment or sync status per integration service
      example:
        stripe: PAID
        goCardless: CANCELLED
      properties:
        stripe:
          $ref: '#/components/schemas/IntegrationPaymentStatus'
          description: Payment status for Stripe integration
        goCardless:
          $ref: '#/components/schemas/IntegrationPaymentStatus'
          description: Payment status for GoCardless integration
    AppliedCreditNoteResponse:
      required:
        - grossTotal
        - id
        - lineItems
        - netTotal
        - totalTax
      type: object
      example:
        id: 8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b
        creditNoteNumber: CN00001
        netTotal: '41.67'
        totalTax: '8.33'
        grossTotal: '50.00'
        lineItems:
          - name: Adjustment
            netTotal: '41.67'
            grossTotal: '50.00'
            invoiceLineItemIds:
              - 2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d
      properties:
        id:
          type: string
          description: The applied credit note's ID
          example: 8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b
        creditNoteNumber:
          type: string
          description: The applied credit note's number
          example: CN00001
        netTotal:
          type: string
          description: >-
            Net total of the credit note, in decimal format of the Invoice's
            currency
          example: '41.67'
        totalTax:
          type: string
          description: >-
            Total tax of the credit note, in decimal format of the Invoice's
            currency
          example: '8.33'
        grossTotal:
          type: string
          description: >-
            Gross total of the credit note, in decimal format of the Invoice's
            currency
          example: '50.00'
        lineItems:
          type: array
          description: The applied credit note's line items
          example:
            - name: Adjustment
              netTotal: '41.67'
              grossTotal: '50.00'
              invoiceLineItemIds:
                - 2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d
          items:
            $ref: '#/components/schemas/AppliedCreditNoteLineItemResponse'
    AppliedCreditGrantResponse:
      required:
        - amount
        - status
      type: object
      example:
        creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
        creditGrantName: Q3 prepaid credit
        amount: '820.00'
        taxAmount: '164.00'
        status: APPLIED
      properties:
        creditGrantId:
          type: string
          description: >-
            The applied credit grant's ID. Null when the grant behind the credit
            could not be identified.
          example: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
        creditGrantName:
          type: string
          description: >-
            The applied credit grant's name. Null when the grant could not be
            identified or its name could not be read.
          example: Q3 prepaid credit
        amount:
          type: string
          description: >-
            Credit applied from this grant, in decimal format of the Invoice's
            currency. Net of tax; tax credited alongside it is reported
            separately in `taxAmount`.
          example: '820.00'
        taxAmount:
          type: string
          description: >-
            Tax credited alongside this grant's net amount, in decimal format of
            the Invoice's currency. Absent where no tax was credited; treat
            absent as zero when reconciling.
          example: '164.00'
        status:
          $ref: '#/components/schemas/AppliedCreditGrantStatus'
          description: >-
            Whether this credit has been applied to the invoice or is only
            projected.
    ProjectedCreditGrantResponse:
      required:
        - amount
      type: object
      example:
        creditGrantId: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
        creditGrantName: Q3 prepaid credit
        amount: '30.00'
      properties:
        creditGrantId:
          type: string
          description: >-
            The credit grant's ID. Null where the expected credit cannot be
            attributed to one grant.
          example: 0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13
        creditGrantName:
          type: string
          description: >-
            The credit grant's name. Null where the grant could not be
            identified or its name could not be read.
          example: Q3 prepaid credit
        amount:
          type: string
          description: >-
            Credit this grant is expected to contribute, in decimal format of
            the Invoice's currency. Net of tax; tax on projected credit is not
            reported.
          example: '30.00'
    PaymentAllocationResponse:
      required:
        - allocatedAt
        - amount
        - origin
        - paidAt
        - paymentId
      type: object
      example:
        paymentId: 3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e
        amount: '50.00'
        allocatedAt: '2022-10-30T00:00:00Z'
        paidAt: '2022-10-29T00:00:00Z'
        origin: MANUAL
      properties:
        paymentId:
          type: string
          description: The ID of the payment allocated to the invoice
          example: 3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e
        amount:
          type: string
          description: >-
            Amount allocated to the invoice, in decimal format of the Invoice's
            currency
          example: '50.00'
        allocatedAt:
          type: string
          description: Time the allocation was recorded
          example: '2022-10-30T00:00:00Z'
        paidAt:
          type: string
          description: Time the payment was made
          example: '2022-10-29T00:00:00Z'
        origin:
          $ref: '#/components/schemas/Origin'
          description: >-
            Where the payment came from: recorded manually, or reported by a
            payment provider such as Stripe
    DueDateSource:
      type: string
      example: CALCULATED
      enum:
        - MANUAL
        - CALCULATED
    DueDatePolicyManual:
      required:
        - date
        - type
      type: object
      example:
        date: '2022-10-30'
        type: MANUAL
      properties:
        date:
          type: string
          description: >-
            The due date. The invoice keeps this exact date until it is
            explicitly changed.
          example: '2022-10-30'
        type:
          $ref: '#/components/schemas/DueDatePolicyType'
          description: >-
            Whether the due date is a hand-picked date or is computed from
            payment terms.
    DueDatePolicyPaymentTerms:
      required:
        - paymentTermDays
        - type
      type: object
      example:
        paymentTermDays: 30
        type: PAYMENT_TERMS
      properties:
        paymentTermDays:
          type: integer
          description: >-
            The number of days after the due date anchor that the invoice
            becomes due. The anchor is the invoice date or the issue date
            according to your account settings; with an issue date anchor the
            due date stays empty until the invoice is issued.
          example: 30
        type:
          $ref: '#/components/schemas/DueDatePolicyType'
          description: >-
            Whether the due date is a hand-picked date or is computed from
            payment terms.
    DueDateStatus:
      type: string
      example: SET
      enum:
        - SET
        - PENDING
    State:
      type: string
      example: CA
      enum:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DC
        - DE
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
        - AB
        - BC
        - MB
        - NB
        - NL
        - NS
        - NT
        - NU
        - 'ON'
        - PE
        - QC
        - SK
        - YT
    CountryCode:
      type: string
      example: YE
      enum:
        - AD
        - AE
        - AF
        - AG
        - AI
        - AL
        - AM
        - AO
        - AQ
        - AR
        - AS
        - AT
        - AU
        - AW
        - AX
        - AZ
        - BA
        - BB
        - BD
        - BE
        - BF
        - BG
        - BH
        - BI
        - BJ
        - BL
        - BM
        - BN
        - BO
        - BQ
        - BR
        - BS
        - BT
        - BV
        - BW
        - BY
        - BZ
        - CA
        - CC
        - CD
        - CF
        - CG
        - CH
        - CI
        - CK
        - CL
        - CM
        - CN
        - CO
        - CR
        - CU
        - CV
        - CW
        - CX
        - CY
        - CZ
        - DE
        - DJ
        - DK
        - DM
        - DO
        - DZ
        - EC
        - EE
        - EG
        - EH
        - ER
        - ES
        - ET
        - FI
        - FJ
        - FK
        - FM
        - FO
        - FR
        - GA
        - GB
        - GD
        - GE
        - GF
        - GG
        - GH
        - GI
        - GL
        - GM
        - GN
        - GP
        - GQ
        - GR
        - GS
        - GT
        - GU
        - GW
        - GY
        - HK
        - HM
        - HN
        - HR
        - HT
        - HU
        - ID
        - IE
        - IL
        - IM
        - IN
        - IO
        - IQ
        - IR
        - IS
        - IT
        - JE
        - JM
        - JO
        - JP
        - KE
        - KG
        - KH
        - KI
        - KM
        - KN
        - KP
        - KR
        - KW
        - KY
        - KZ
        - LA
        - LB
        - LC
        - LI
        - LK
        - LR
        - LS
        - LT
        - LU
        - LV
        - LY
        - MA
        - MC
        - MD
        - ME
        - MF
        - MG
        - MH
        - MK
        - ML
        - MM
        - MN
        - MO
        - MP
        - MQ
        - MR
        - MS
        - MT
        - MU
        - MV
        - MW
        - MX
        - MY
        - MZ
        - NA
        - NC
        - NE
        - NF
        - NG
        - NI
        - NL
        - 'NO'
        - NP
        - NR
        - NU
        - NZ
        - OM
        - PA
        - PE
        - PF
        - PG
        - PH
        - PK
        - PL
        - PM
        - PN
        - PR
        - PS
        - PT
        - PW
        - PY
        - QA
        - RE
        - RO
        - RS
        - RU
        - RW
        - SA
        - SB
        - SC
        - SD
        - SE
        - SG
        - SH
        - SI
        - SJ
        - SK
        - SL
        - SM
        - SN
        - SO
        - SR
        - SS
        - ST
        - SV
        - SX
        - SY
        - SZ
        - TC
        - TD
        - TF
        - TG
        - TH
        - TJ
        - TK
        - TL
        - TM
        - TN
        - TO
        - TR
        - TT
        - TV
        - TW
        - TZ
        - UA
        - UG
        - UM
        - US
        - UY
        - UZ
        - VA
        - VC
        - VE
        - VG
        - VI
        - VN
        - VU
        - WF
        - WS
        - XK
        - YE
        - YT
        - ZA
        - ZM
        - ZW
    IntegrationService:
      type: string
      example: Xero
      enum:
        - Amazon_Redshift
        - GoCardless
        - Google_BigQuery
        - Google_Sheets
        - HubSpot
        - NetSuite
        - QuickBooks_Online
        - Salesforce
        - Slack
        - Snowflake
        - Stripe
        - Xero
        - Avalara
        - Anrok
        - Attio
        - Numeral
        - Rillet
        - Sphere
    SortCodeAccountNumber:
      required:
        - accountNumber
        - sortCode
      type: object
      description: >-
        Merchant's UK bank account details, for receiving payment by UK bank
        transfer
      example:
        sortCode: '000000'
        accountNumber: '12345678'
      properties:
        sortCode:
          type: string
          description: UK sort code. 6 digits.
          example: '000000'
        accountNumber:
          type: string
          description: UK account number. 8 digits.
          example: '12345678'
    UsAchDestination:
      required:
        - accountName
        - accountNumber
        - bankName
        - bankRoutingNumber
      type: object
      description: Merchant's US account details, for receiving payment by ACH
      example:
        accountNumber: '12345678'
        accountName: John Doe
        bankName: Chase
        bankRoutingNumber: '123456789'
      properties:
        accountNumber:
          type: string
          example: '12345678'
        accountName:
          type: string
          example: John Doe
        bankName:
          type: string
          example: Chase
        bankRoutingNumber:
          type: string
          example: '123456789'
    UsWireDestination:
      required:
        - accountName
        - accountNumber
        - bankAddress
        - bankName
        - bankRoutingNumber
        - swiftCode
      type: object
      description: Merchant's US account details, for receiving payment by wire transfer
      example:
        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
      properties:
        accountNumber:
          type: string
          example: '12345678'
        accountName:
          type: string
          example: John Doe
        bankName:
          type: string
          example: Chase
        bankRoutingNumber:
          type: string
          example: '123456789'
        swiftCode:
          type: string
          example: CHASUS33
        bankAddress:
          $ref: '#/components/schemas/Address'
    CanadianBankAccountDestination:
      required:
        - accountNumber
        - institutionNumber
        - transitNumber
      type: object
      description: >-
        Merchant's Canadian account details, for receiving payment by Canadian
        bank transfer
      example:
        transitNumber: '123'
        institutionNumber: '12345'
        accountNumber: '1234567'
      properties:
        transitNumber:
          type: string
          example: '123'
        institutionNumber:
          type: string
          example: '12345'
        accountNumber:
          type: string
          example: '1234567'
    CanadianInternationalDestination:
      required:
        - accountNumber
        - bankAddress
        - bankName
        - institutionNumber
        - legalName
        - swiftCode
        - transitNumber
      type: object
      description: >-
        Merchant's account details, for receiving payment to a Canadian bank via
        Wire transfer
      example:
        legalName: John Doe
        accountNumber: '12345678'
        transitNumber: '12345'
        bankName: Chase
        bankAddress:
          line1: JP Morgan Chase
          town: New York City
          state: NY
          postcode: '10017'
          country: US
        institutionNumber: '123'
        swiftCode: CHASUS33
        intermediaryBank:
          bankName: Chase
          bankAddress:
            line1: JP Morgan Chase
            town: New York City
            state: NY
            postcode: '10017'
            country: US
          swiftCode: CHASUS33
          routingNumber: '123456789'
      properties:
        legalName:
          type: string
          example: John Doe
        accountNumber:
          type: string
          example: '12345678'
        transitNumber:
          type: string
          example: '12345'
        bankName:
          type: string
          example: Chase
        bankAddress:
          $ref: '#/components/schemas/Address'
        institutionNumber:
          type: string
          example: '123'
        swiftCode:
          type: string
          example: CHASUS33
        intermediaryBank:
          $ref: '#/components/schemas/IntermediaryBank'
    AustralianBankAccountDestination:
      required:
        - accountNumber
        - bsb
        - legalName
        - swiftCode
      type: object
      description: >-
        Merchant's account details, for receiving payment to a Canadian bank via
        Australian bank transfer
      example:
        legalName: John Doe
        accountNumber: '12345678'
        swiftCode: CHASUS33
        bsb: '123456'
      properties:
        legalName:
          type: string
          example: John Doe
        accountNumber:
          type: string
          example: '12345678'
        swiftCode:
          type: string
          example: CHASUS33
        bsb:
          type: string
          example: '123456'
    SwedishBankgiroDestination:
      required:
        - accountName
        - bankgiroNumber
      type: object
      description: >-
        Merchant's Swedish Bankgiro account details, for receiving payment by
        Swedish Bankgiro
      example:
        bankgiroNumber: 123-4567
        accountName: '12345678'
      properties:
        bankgiroNumber:
          type: string
          description: >-
            Swedish Bankgiro number. 7-8 digits, formatted as 123-4567 or
            1234-5678.
          example: 123-4567
        accountName:
          type: string
          description: Account holder name
          example: '12345678'
    PaymentLinkDisplayOption:
      type: string
      example: HIDE_PAYMENT_LINK
      enum:
        - SHOW_PAYMENT_LINK
        - HIDE_PAYMENT_LINK
    AssetType:
      type: string
      example: DOCUMENT
      enum:
        - IMAGE
        - DOCUMENT
        - BINARY
    AssetFormat:
      type: string
      example: PDF
      enum:
        - JPEG
        - JPG
        - PNG
        - PDF
        - CSV
        - TXT
        - RTF
        - MD
        - XLS
        - XLSX
        - XLSM
        - DOC
        - DOCX
        - ZIP
        - ODT
        - ODS
    IntegrationPaymentStatus:
      type: string
      example: PAID
      enum:
        - PENDING
        - IN_PROGRESS
        - PAID
        - FAILED
        - CANCELLED
        - REFUNDED
    AppliedCreditNoteLineItemResponse:
      required:
        - grossTotal
        - invoiceLineItemIds
        - name
        - netTotal
      type: object
      example:
        name: Adjustment
        netTotal: '41.67'
        grossTotal: '50.00'
        invoiceLineItemIds:
          - 2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d
      properties:
        name:
          type: string
          description: Line item name
          example: Adjustment
        netTotal:
          type: string
          description: >-
            Net total of the line item, in decimal format of the Invoice's
            currency
          example: '41.67'
        grossTotal:
          type: string
          description: >-
            Gross total of the line item, in decimal format of the Invoice's
            currency
          example: '50.00'
        invoiceLineItemIds:
          type: array
          description: >-
            IDs of the invoice line item(s) to which this credit note line item
            relates
          example:
            - 2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d
          items:
            type: string
    AppliedCreditGrantStatus:
      type: string
      example: APPLIED
      enum:
        - APPLIED
        - PROJECTED
    Origin:
      type: string
      example: MANUAL
      enum:
        - MANUAL
        - STRIPE
    DueDatePolicyType:
      type: string
      example: MANUAL
      enum:
        - MANUAL
        - PAYMENT_TERMS
    IntermediaryBank:
      required:
        - bankAddress
        - bankName
        - routingNumber
        - swiftCode
      type: object
      example:
        bankName: Chase
        bankAddress:
          line1: JP Morgan Chase
          town: New York City
          state: NY
          postcode: '10017'
          country: US
        swiftCode: CHASUS33
        routingNumber: '123456789'
      properties:
        bankName:
          type: string
          example: Chase
        bankAddress:
          $ref: '#/components/schemas/Address'
        swiftCode:
          type: string
          example: CHASUS33
        routingNumber:
          type: string
          example: '123456789'

````