Modern Treasury Invoice API

The Invoice API from Modern Treasury — 2 operation(s) for invoice.

Operations 4

GET /api/invoices list invoices #
POST /api/invoices create invoice #
GET /api/invoices/{id} get invoice #
PATCH /api/invoices/{id} update invoice #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/modern-treasury-invoice-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

modern-treasury-invoice-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Modern Treasury AccountCapability Invoice API
  version: v1
  contact:
    name: Modern Treasury Engineering Team
    url: https://moderntreasury.com
  description: The Modern Treasury REST API. Please see https://docs.moderntreasury.com for more details.
servers:
- url: http://localhost:3000
- url: https://app.moderntreasury.com
tags:
- name: Invoice
paths:
  /api/invoices:
    get:
      summary: list invoices
      tags:
      - Invoice
      operationId: listInvoices
      security:
      - basic_auth: []
      parameters:
      - name: after_cursor
        in: query
        schema:
          type:
          - string
          - 'null'
        required: false
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: counterparty_id
        in: query
        schema:
          type: string
        required: false
      - name: originating_account_id
        in: query
        schema:
          type: string
        required: false
      - name: payment_order_id
        in: query
        schema:
          type: string
        required: false
      - name: expected_payment_id
        in: query
        schema:
          type: string
        required: false
      - name: status
        in: query
        schema:
          type: string
          enum:
          - draft
          - paid
          - partially_paid
          - payment_pending
          - unpaid
          - voided
        required: false
      - name: number
        in: query
        schema:
          type: string
        description: A unique record number assigned to each invoice that is issued.
        required: false
      - name: due_date_start
        in: query
        schema:
          type: string
          format: date
        description: An inclusive lower bound for searching due_date
        required: false
      - name: due_date_end
        in: query
        schema:
          type: string
          format: date
        description: An inclusive upper bound for searching due_date
        required: false
      - name: created_at_start
        in: query
        schema:
          type: string
          format: date-time
        description: An inclusive lower bound for searching created_at
        required: false
      - name: created_at_end
        in: query
        schema:
          type: string
          format: date-time
        description: An inclusive upper bound for searching created_at
        required: false
      - $ref: '#/components/parameters/metadata_query'
      responses:
        '200':
          description: successful
          headers:
            X-After-Cursor:
              schema:
                type:
                - string
                - 'null'
              required: false
              description: The cursor for the next page. Including this in a call as `after_cursor` will return the next page.
            X-Per-Page:
              schema:
                type:
                - integer
                - 'null'
              description: The current `per_page`.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/invoice'
    post:
      summary: create invoice
      tags:
      - Invoice
      operationId: createInvoice
      security:
      - basic_auth: []
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: This key should be something unique, preferably something like an UUID.
        schema:
          type: string
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invoice'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/invoice_create_request'
  /api/invoices/{id}:
    parameters:
    - name: id
      in: path
      schema:
        type: string
      description: id
      required: true
    get:
      summary: get invoice
      tags:
      - Invoice
      operationId: getInvoice
      security:
      - basic_auth: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invoice'
    patch:
      summary: update invoice
      tags:
      - Invoice
      operationId: updateInvoice
      security:
      - basic_auth: []
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/invoice'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/invoice_update_request'
components:
  schemas:
    invoice_create_request:
      type: object
      properties:
        contact_details:
          type: array
          items:
            $ref: '#/components/schemas/contact_detail'
          description: The invoicer's contact details displayed at the top of the invoice.
        recipient_email:
          type:
          - string
          - 'null'
          description: The email of the recipient of the invoice. Leaving this value as null will fallback to using the counterparty's name.
        recipient_name:
          type:
          - string
          - 'null'
          description: The name of the recipient of the invoice. Leaving this value as null will fallback to using the counterparty's name.
        counterparty_id:
          type: string
          description: The ID of the counterparty receiving the invoice.
        counterparty_billing_address:
          type:
          - object
          - 'null'
          description: The counterparty's billing address.
          properties:
            line1:
              type: string
            line2:
              type: string
            locality:
              type: string
              description: Locality or City.
            region:
              type: string
              description: Region or State.
            postal_code:
              type: string
              description: The postal code of the address.
            country:
              type: string
              description: Country code conforms to [ISO 3166-1 alpha-2]
          required:
          - line1
          - locality
          - region
          - postal_code
          - country
        counterparty_shipping_address:
          type:
          - object
          - 'null'
          description: The counterparty's shipping address where physical goods should be delivered.
          properties:
            line1:
              type: string
            line2:
              type: string
            locality:
              type: string
              description: Locality or City.
            region:
              type: string
              description: Region or State.
            postal_code:
              type: string
              description: The postal code of the address.
            country:
              type: string
              description: Country code conforms to [ISO 3166-1 alpha-2]
          required:
          - line1
          - locality
          - region
          - postal_code
          - country
        currency:
          $ref: '#/components/schemas/currency'
          description: Currency that the invoice is denominated in. Defaults to `USD` if not provided.
        description:
          type: string
          description: A free-form description of the invoice.
        due_date:
          type: string
          format: date-time
          description: A future date by when the invoice needs to be paid.
        invoicer_name:
          type:
          - string
          - 'null'
          description: The name of the issuer for the invoice. Defaults to the name of the Organization.
        invoicer_address:
          type:
          - object
          - 'null'
          description: The invoice issuer's business address.
          properties:
            line1:
              type: string
            line2:
              type: string
            locality:
              type: string
              description: Locality or City.
            region:
              type: string
              description: Region or State.
            postal_code:
              type: string
              description: The postal code of the address.
            country:
              type: string
              description: Country code conforms to [ISO 3166-1 alpha-2]
          required:
          - line1
          - locality
          - region
          - postal_code
          - country
        originating_account_id:
          type: string
          description: The ID of the internal account the invoice should be paid to.
        receiving_account_id:
          type: string
          format: uuid
          description: The receiving account ID. Can be an `external_account`.
        virtual_account_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the virtual account the invoice should be paid to.
        payment_effective_date:
          type: string
          format: date
          description: 'Date transactions are to be posted to the participants'' account. Defaults to the current business day or the next business day if the current day is a bank holiday or weekend. Format: yyyy-mm-dd.'
        payment_type:
          $ref: '#/components/schemas/payment_order_type'
        payment_method:
          type: string
          enum:
          - ui
          - manual
          - automatic
          description: The method by which the invoice can be paid. `ui` will show the embedded payment collection flow. `automatic` will automatically initiate payment based upon the account details of the receiving_account id.\nIf the invoice amount is positive, the automatically initiated payment order's direction will be debit. If the invoice amount is negative, the automatically initiated payment order's direction will be credit. One of `manual`, `ui`, or `automatic`.
        fallback_payment_method:
          type:
          - string
          - 'null'
          description: When payment_method is automatic, the fallback payment method to use when an automatic payment fails. One of `manual` or `ui`.
        notifications_enabled:
          type: boolean
          description: If true, the invoice will send email notifications to the invoice recipients about invoice status changes.
        notification_email_addresses:
          type:
          - array
          - 'null'
          items:
            type: string
          description: Emails in addition to the counterparty email to send invoice status notifications to. At least one email is required if notifications are enabled and the counterparty doesn't have an email.
        remind_after_overdue_days:
          type:
          - array
          - 'null'
          items:
            type: integer
          description: Number of days after due date when overdue reminder emails will be sent out to invoice recipients.
        invoice_line_items:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/invoice_line_item_create_request'
          description: An array of invoice line items. The API supports a maximum of 50 invoice line items per invoice. If a greater number of invoice line items is required, please contact support.
        auto_advance:
          type:
          - boolean
          - 'null'
          description: When true, the invoice will progress to unpaid automatically and cannot be edited after entering that state. If the invoice fails to progress to unpaid, the errors will be returned and the invoice will not be created.
        metadata:
          type:
          - object
          - 'null'
          description: Additional data represented as key-value pairs. Both the key and value must be strings.
          additionalProperties:
            type: string
          example:
            key: value
            foo: bar
            modern: treasury
      required:
      - counterparty_id
      - due_date
      - originating_account_id
    expected_payment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
        live_mode:
          type: boolean
          description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        external_id:
          type:
          - string
          - 'null'
          description: An optional user-defined 180 character unique identifier.
        amount_upper_bound:
          type:
          - integer
          - 'null'
          description: The highest amount this expected payment may be equal to. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
        amount_lower_bound:
          type:
          - integer
          - 'null'
          description: The lowest amount this expected payment may be equal to. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
        direction:
          type:
          - string
          - 'null'
          enum:
          - credit
          - debit
          description: One of credit or debit. When you are receiving money, use credit. When you are being charged, use debit.
        internal_account_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the Internal Account for the expected payment.
        type:
          $ref: '#/components/schemas/expected_payment_type'
        currency:
          $ref: '#/components/schemas/currency'
          description: Must conform to ISO 4217. Defaults to the currency of the internal account.
        date_upper_bound:
          type:
          - string
          - 'null'
          format: date
          description: 'The latest date the payment may come in. Format: yyyy-mm-dd'
        date_lower_bound:
          type:
          - string
          - 'null'
          format: date
          description: 'The earliest date the payment may come in. Format: yyyy-mm-dd'
        description:
          type:
          - string
          - 'null'
          description: An optional description for internal use.
        statement_descriptor:
          type:
          - string
          - 'null'
          description: The statement description you expect to see on the transaction. For ACH payments, this will be the full line item passed from the bank. For wire payments, this will be the OBI field on the wire. For check payments, this will be the memo field.
        metadata:
          type: object
          description: Additional data represented as key-value pairs. Both the key and value must be strings.
          additionalProperties:
            type: string
          example:
            key: value
            foo: bar
            modern: treasury
        counterparty_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the counterparty you expect for this payment.
        remittance_information:
          type:
          - string
          - 'null'
          description: For `ach`, this field will be passed through on an addenda record. For `wire` payments the field will be passed through as the "Originator to Beneficiary Information", also known as OBI or Fedwire tag 6000.
        reconciliation_groups:
          type:
          - object
          - 'null'
          description: The reconciliation groups you have for this payment.
        reconciliation_filters:
          type:
          - object
          - 'null'
          description: The reconciliation filters you have for this payment.
        reconciliation_rule_variables:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/reconciliation_rule_variable'
          description: An array of reconciliation rule variables for this payment.
        amount_reconciled:
          type:
          - integer
          - 'null'
          description: The amount reconciled for this expected payment. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
        amount_reconciled_direction:
          type:
          - string
          - 'null'
          enum:
          - credit
          - debit
          description: One of credit or debit. Indicates whether amount_reconciled is a credit or debit amount.
        amount_unreconciled:
          type:
          - integer
          - 'null'
          description: The amount that remains unreconciled for this expected payment. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
        amount_unreconciled_direction:
          type:
          - string
          - 'null'
          enum:
          - credit
          - debit
          description: One of credit or debit. Indicates whether amount_unreconciled is a credit or debit amount.
        transaction_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the Transaction this expected payment object has been matched to.
        transaction_line_item_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the Transaction Line Item this expected payment has been matched to.
        status:
          type: string
          enum:
          - archived
          - partially_reconciled
          - reconciled
          - unreconciled
          description: One of unreconciled, partially_reconciled, reconciled, or archived.
        reconciliation_method:
          type:
          - string
          - 'null'
          enum:
          - automatic
          - manual
          description: One of manual if this expected payment was manually reconciled in the dashboard, automatic if it was automatically reconciled by Modern Treasury, or null if it is unreconciled.
        ledger_transaction_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the ledger transaction linked to the expected payment.
      additionalProperties: false
      minProperties: 31
      required:
      - id
      - object
      - live_mode
      - created_at
      - updated_at
      - external_id
      - amount_upper_bound
      - amount_lower_bound
      - direction
      - internal_account_id
      - type
      - currency
      - date_upper_bound
      - date_lower_bound
      - description
      - statement_descriptor
      - metadata
      - counterparty_id
      - remittance_information
      - reconciliation_groups
      - reconciliation_filters
      - reconciliation_rule_variables
      - amount_reconciled
      - amount_reconciled_direction
      - amount_unreconciled
      - amount_unreconciled_direction
      - transaction_id
      - transaction_line_item_id
      - status
      - reconciliation_method
      - ledger_transaction_id
    reconciliation_rule_variable:
      type: object
      properties:
        amount_upper_bound:
          type: integer
          description: The highest amount this expected payment may be equal to. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
        amount_lower_bound:
          type: integer
          description: The lowest amount this expected payment may be equal to. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
        direction:
          type: string
          enum:
          - credit
          - debit
          description: One of credit or debit. When you are receiving money, use credit. When you are being charged, use debit.
        internal_account_id:
          type: string
          format: uuid
          description: The ID of the Internal Account for the expected payment
        type:
          type:
          - string
          - 'null'
          enum:
          - ach
          - au_becs
          - bacs
          - book
          - card
          - chats
          - check
          - cross_border
          - dk_nets
          - eft
          - gb_fps
          - hu_ics
          - interac
          - masav
          - mx_ccen
          - neft
          - nics
          - nz_becs
          - pl_elixir
          - provxchange
          - ro_sent
          - rtp
          - se_bankgirot
          - sen
          - sepa
          - sg_giro
          - sic
          - signet
          - sknbi
          - stablecoin
          - wire
          - zengin
          description: One of ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen, sepa, signet wire
        currency:
          $ref: '#/components/schemas/currency'
          description: Must conform to ISO 4217. Defaults to the currency of the internal account
        date_upper_bound:
          type:
          - string
          - 'null'
          format: date
          description: The latest date the payment may come in. Format is yyyy-mm-dd
        date_lower_bound:
          type:
          - string
          - 'null'
          format: date
          description: The earliest date the payment may come in. Format is yyyy-mm-dd
        counterparty_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of the counterparty you expect for this payment
        custom_identifiers:
          type:
          - object
          - 'null'
          description: A hash of custom identifiers for this payment
          additionalProperties:
            type: string
      additionalProperties: false
      minProperties: 10
      required:
      - amount_upper_bound
      - amount_lower_bound
      - direction
      - internal_account_id
    accounting:
      type: object
      deprecated: true
      properties:
        account_id:
          type:
          - string
          - 'null'
          format: uuid
          deprecated: true
          description: The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected.
        class_id:
          type:
          - string
          - 'null'
          format: uuid
          deprecated: true
          description: The ID of one of the class objects in your accounting system. Class objects track segments of your business independent of client or project. Note that these will only be accessible if your accounting system has been connected.
    foreign_exchange_rate:
      type: object
      properties:
        base_amount:
          type: integer
          description: Amount in the lowest denomination of the `base_currency` to convert, often called the "sell" amount.
        base_currency:
          $ref: '#/components/schemas/currency'
          description: Currency to convert, often called the "sell" currency.
        exponent:
          type: integer
          description: The exponent component of the rate. The decimal is calculated as `value` / (10 ^ `exponent`).
        rate_string:
          type: string
          description: A string representation of the rate.
        target_amount:
          type: integer
          description: Amount in the lowest denomination of the `target_currency`, often called the "buy" amount.
        target_currency:
          $ref: '#/components/schemas/currency'
          description: Currency to convert the `base_currency` to, often called the "buy" currency.
        value:
          type: integer
          description: The whole number component of the rate. The decimal is calculated as `value` / (10 ^ `exponent`).
      additionalProperties: false
      required:
      - base_amount
      - base_currency
      - exponent
      - rate_string
      - target_amount
      - target_currency
      - value
    address:
      type:
      - object
      - 'null'
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
        live_mode:
          type: boolean
          description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        line1:
          type:
          - string
          - 'null'
        line2:
          type:
          - string
          - 'null'
        locality:
          type:
          - string
          - 'null'
          description: Locality or City.
        region:
          type:
          - string
          - 'null'
          description: Region or State.
        postal_code:
          type:
          - string
          - 'null'
          description: The postal code of the address.
        country:
          type:
          - string
          - 'null'
          description: Country code conforms to [ISO 3166-1 alpha-2]
      additionalProperties: false
      minProperties: 11
      required:
      - id
      - object
      - live_mode
      - created_at
      - updated_at
      - line1
      - line2
      - locality
      - region
      - postal_code
      - country
    payment_order:
      type: object
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
        live_mode:
          type: boolean
          description: This field will be true if this object exists in the live environment or false if it exists in the test environment.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        type:
          $ref: '#/components/schemas/payment_order_type'
        subtype:
          $ref: '#/components/schemas/payment_order_subtype'
        amount:
          type: integer
          description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
        direction:
          type: string
          enum:
          - credit
          - debit
          description: One of `credit`, `debit`. Describes the direction money is flowing in the transaction. A `credit` moves money from your account to someone else's. A `debit` pulls money from someone else's account to your own. Note that wire, rtp, and check payments will always be `credit`.
        priority:
          type: string
          enum:
          - high
          - normal
          description: Either `normal` or `high`. For ACH and EFT payments, `high` represents a same-day ACH or EFT transfer, respectively. For check payments, `high` can mean an overnight check rather than standard mail.
        originating_account_id:
          type: string
          format: uuid
          description: The ID of one of your organization's internal accounts.
        receiving_account_id:
          type: string
          format: uuid
          description: The receiving account ID. Can be an `external_account` or `internal_account`.
        currency:
          $ref: '#/components/schemas/currency'
          description: Defaults to the currency of the originating account.
        accounting:
          $ref: '#/components/schemas/accounting'
        accounting_category_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected.
          deprecated: true
        accounting_ledger_class_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The ID of one of your accounting ledger classes. Note that these will only be accessible if your accounting system has been connected.
          deprecated: true
        effective_date:
          type: string
          format: date
          description: 'Date transactions are to be posted to the participants'' account. Defaults to the current business day or the next business day if the current day is a bank holiday or weekend. Format: yyyy-mm-dd.'
        description:
          type:
          - string
          - 'null'
          description: An optional description for internal use.
        statement_descriptor:
          type:
          - string
          - 'null'
          description: An optional descriptor which will appear in the receiver's statement. For `check` payments this field will be used as the memo line. For `ach` the maximum length is 10 characters. Note that for ACH payments, the name on your bank account will be included automatically by the bank, so you can use the characters for other useful information. For `eft` the maximum length is 15 characters.
        remittance_information:
          type:
          - string
          - 'null'
          description: For `ach`, this field will be passed through on an addenda record. For `wire` payments the field will be passed through as the "Originator to Beneficiary Information", also known as OBI or Fedwire tag 6000.
        process_after:
          type:
          - string
          - 'null'
          format: date-time
          description: If present, Modern Treasury will not process the payment until after this time. If `process_after` is past the cutoff for `effective_date`, `process_after` will take precedence and `effective_date` will automatically update to reflect the earliest possible sending date after `process_after`. Format is ISO8601 timestamp.
        purpose:
          type:
          - string
          - 'null'
          description: For `wire`, this is usually the purpose which is transmitted via the "InstrForDbtrAgt" field in the ISO20022 file. For `eft`, this field is the 3 digit CPA Code that will be attached to the payment.
        metadata:
          type: object
          additionalProperties:
            type: string
          example:
            key: value
            foo: bar
            modern: treasury
          description: Additional data represented as key-value pairs. Both the key and value must be strings.
        charge_bearer:
          type:
          - string
          - 'null'
          enum:
          - shared
          - sender
          - receiver
          description: The party that will pay the fees for the payment order. See https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the differences between the options.
        foreign_exchange_indicator:
          type:
          - string
          - 'null'
          enum:
          - fixed_to_variable
          - variable_to_fixed
          description: Indicates the type of FX transfer to initiate, can be either `variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order currency matches the originating account currency.
        foreign_exchange_contract:
          type:
          - string
          - 'null'
          description: If present, indicates a specific foreign exchange contract number that has been generated by your financial institution.
        nsf_protected:
          type: boolean
          description: A boolean to determine if NSF Protection is enabled for this payment order. Note that this setting must also be turned on in your organization settings page.
        originating_party_name:
          type:
          - string
          - 'null'
          description: If present, this will replace your default company name on receiver's bank statement. This field can only be used for ACH payments currently. For ACH, only the first 16 characters of this string will be used. Any additional characters will be truncated.
        ultimate_originating_party_name:
          type:
          - string
          - 'null'
          description: Name of the ultimate originator of the payment order.
        ultimate_originating_party_identifier:
          type:
          - string
          - 'null'
          description: Identifier of the ultimate originator of the payment order.
        ultimate_receiving_party_name:
          type:
          - string
          - 'null'
        u

# --- truncated at 32 KB (92 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/modern-treasury/refs/heads/main/openapi/modern-treasury-invoice-api-openapi.yml