> ## 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.

# Patch a sent invoice

> Patch fields on a SENT invoice. Supports updating the purchase order number, customer legal company name, customer billing address, memo, reference, and due date. Setting a due date records it as manually chosen and clears the invoice's stored payment terms, so it will not be recomputed from them later. Neither the due date nor the customer legal company name can be cleared: sending an explicit null for either is rejected.



## OpenAPI

````yaml invoices.latest.product.live PATCH /invoices/{id}/sent
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}/sent:
    servers: []
    parameters: []
    patch:
      tags:
        - Invoices
      summary: Patch a sent invoice
      description: >-
        Patch fields on a SENT invoice. Supports updating the purchase order
        number, customer legal company name, customer billing address, memo,
        reference, and due date. Setting a due date records it as manually
        chosen and clears the invoice's stored payment terms, so it will not be
        recomputed from them later. Neither the due date nor the customer legal
        company name can be cleared: sending an explicit null for either is
        rejected.
      operationId: patchInvoicesByIdSent
      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'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PatchSentInvoiceEndpointPatchSentInvoiceRequest
              example:
                purchaseOrderNumber: PO-12345
                customerLegalCompanyName: Acme Corporation Ltd
                dueDate: '2026-09-29'
            examples:
              PatchSentInvoiceEndpointPatchSentInvoiceRequest:
                summary: ''
                value:
                  purchaseOrderNumber: PO-12345
                  customerLegalCompanyName: Acme Corporation Ltd
                  dueDate: '2026-09-29'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
                example:
                  id: 6cedbb5e-4f77-4217-b8d4-020e7e4d33c9
                  sequenceAccountId: 68233908-402a-43b4-8952-1c2ab0ef0b25
                  billingScheduleId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                  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'
                  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'
                    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
                  updatedAt: '2022-09-30T00:00:00Z'
              examples:
                Invoice:
                  summary: ''
                  value:
                    id: 6cedbb5e-4f77-4217-b8d4-020e7e4d33c9
                    sequenceAccountId: 68233908-402a-43b4-8952-1c2ab0ef0b25
                    billingScheduleId: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
                    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'
                    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'
                      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
                    updatedAt: '2022-09-30T00:00:00Z'
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    PatchSentInvoiceEndpointPatchSentInvoiceRequest:
      type: object
      example:
        purchaseOrderNumber: PO-12345
        customerLegalCompanyName: Acme Corporation Ltd
        dueDate: '2026-09-29'
      properties:
        purchaseOrderNumber:
          type: string
          example: PO-12345
        customerLegalCompanyName:
          type: string
          example: Acme Corporation Ltd
        dueDate:
          type: string
          example: '2026-09-29'
    Invoice:
      required:
        - accountingDate
        - createdAt
        - creditNoteIds
        - currency
        - customerBillingAddress
        - customerEmails
        - customerId
        - customerLegalCompanyName
        - customerShippingAddress
        - grossTotal
        - id
        - isCustomerArchived
        - linkedServices
        - metadata
        - netTotal
        - paymentStatus
        - renderSettings
        - sequenceAccountId
        - status
        - totalTax
        - updatedAt
      type: object
      example:
        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'
      properties:
        id:
          type: string
          description: Invoice ID
          example: ba37a392-7054-4dae-ab37-6fee9e23fe06
        sequenceAccountId:
          type: string
          description: Sequence Account ID
          example: af9b5988-1d7b-45f6-a188-326df5e59b24
        status:
          $ref: '#/components/schemas/InvoiceStatus'
          description: Invoice status
        currency:
          $ref: '#/components/schemas/Currency'
          description: Invoice currency
        invoiceNumber:
          type: string
          description: Invoice number
          example: INV2
        dueDate:
          type: string
          description: Due date
          example: '2022-11-05'
        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@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: b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a
        totalTax:
          type: string
          description: Total tax, in decimal format of the Invoice's currency
          example: '2'
        netTotal:
          type: string
          description: Net total, in decimal format of the Invoice's currency
          example: '12'
        grossTotal:
          type: string
          description: Gross total, in decimal format of the Invoice's currency
          example: '10'
        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'
        paymentStatus:
          $ref: '#/components/schemas/InvoicePaymentStatus'
          description: Invoice payment status
        createdAt:
          type: string
          description: Creation time
          example: '2022-10-30T00:00:00Z'
        creditNoteIds:
          type: array
          description: IDs of linked credit notes (if any)
          example:
            - 941272d1-f840-4e16-b698-0cd455c81e0e
          items:
            type: string
        linkedServices:
          type: array
          description: External services which are linked to this invoice
          example:
            - externalId: ID
              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'
        accountingDate:
          type: string
          description: Accounting date
          example: '2022-10-05'
        customerTaxStatus:
          $ref: '#/components/schemas/TaxStatus'
          description: Customer tax status
        renderSettings:
          $ref: '#/components/schemas/InvoiceRenderSettingsInlineAggregate'
        isCustomerArchived:
          type: boolean
          example: false
        updatedAt:
          type: string
          description: Last updated time
          example: '2022-10-30T00:00:00Z'
        billingScheduleId:
          type: string
          description: Billing Schedule ID
          example: fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95
        issueDate:
          type: string
          description: Issue date
          example: '2022-09-15'
        customerTaxId:
          type: string
          description: Customer's tax ID
          example: TAX123
        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
        calculatedAt:
          type: string
          description: >-
            Time this invoice was last calculated (applicable for invoices
            generated by billing engine only)
          example: '2022-09-30T00:00:00Z'
    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
    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.
    InvoiceDunningStatus:
      type: string
      example: SCHEDULED
      enum:
        - SCHEDULED
        - OVERDUE_CHECK_SCHEDULED
        - COMPLETED
        - FAILED
        - NOT_REQUIRED
    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
    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'

````