Modern Treasury PaymentOrder API
The PaymentOrder API from Modern Treasury — 4 operation(s) for paymentorder.
The PaymentOrder API from Modern Treasury — 4 operation(s) for paymentorder.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/modern-treasury-paymentorder-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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: 3.2.0
info:
title: Modern Treasury AccountCapability Payment Order 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: PaymentOrder
paths:
/api/invoices/{id}/payment_orders/{payment_order_id}:
parameters:
- name: id
in: path
description: id
required: true
schema:
type: string
- name: payment_order_id
in: path
description: payment_order_id
required: true
schema:
type: string
put:
summary: add payment_order_id to invoice
tags:
- PaymentOrder
operationId: addPaymentOrderToInvoice
description: Add a payment order to an invoice.
security:
- basic_auth: []
responses:
'200':
description: successful
'404':
description: not found
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'422':
description: not unsuccessful
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/api/payment_orders/create_async:
post:
summary: create async payment order
tags:
- PaymentOrder
description: Create a new payment order asynchronously
operationId: createAsyncPaymentOrder
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:
'202':
description: successful
content:
application/json:
schema:
$ref: '#/components/schemas/async_response'
'403':
description: forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/payment_order_async_create_request'
/api/payment_orders:
get:
summary: list payment orders
tags:
- PaymentOrder
description: Get a list of all payment orders
operationId: listPaymentOrders
security:
- basic_auth: []
parameters:
- name: after_cursor
in: query
schema:
type:
- string
- 'null'
required: false
- name: per_page
in: query
schema:
type: integer
required: false
- name: type
in: query
schema:
type: string
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
required: false
- name: priority
in: query
schema:
type: string
enum:
- high
- normal
required: false
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.
- name: counterparty_id
in: query
schema:
type: string
required: false
- name: originating_account_id
in: query
schema:
type: string
required: false
- name: transaction_id
in: query
schema:
type: string
description: The ID of a transaction that the payment order has been reconciled to.
required: false
- name: external_id
in: query
schema:
type: string
required: false
- name: status
in: query
schema:
type: string
enum:
- approved
- cancelled
- completed
- denied
- failed
- held
- needs_approval
- pending
- processing
- returned
- reversed
- sent
- stopped
required: false
- name: direction
in: query
schema:
type: string
enum:
- credit
- debit
_x-stainless-modelDefPath: $shared.transaction_direction
required: false
- name: reference_number
in: query
schema:
type: string
description: Query for records with the provided reference number
required: false
- name: effective_date_start
in: query
schema:
type: string
format: date
required: false
description: An inclusive lower bound for searching effective_date
- name: effective_date_end
in: query
schema:
type: string
format: date
required: false
description: An inclusive upper bound for searching effective_date
- name: created_at_start
in: query
schema:
type: string
format: date
required: false
description: An inclusive lower bound for searching created_at
- name: created_at_end
in: query
schema:
type: string
format: date
required: false
description: An inclusive upper bound for searching created_at
- name: process_after_start
in: query
schema:
type: string
format: date-time
required: false
description: An inclusive lower bound for searching process_after
- name: process_after_end
in: query
schema:
type: string
format: date-time
required: false
description: An inclusive upper bound for searching process_after
- $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/payment_order'
post:
summary: create payment order
tags:
- PaymentOrder
description: Create a new Payment Order
operationId: createPaymentOrder
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:
'201':
description: successful
content:
application/json:
schema:
$ref: '#/components/schemas/payment_order'
'400':
description: parameter_invalid
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'401':
description: unsuccessful
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'403':
description: forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'409':
description: conflict
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'422':
description: unsuccessful
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/payment_order_create_request'
multipart/form-data:
schema:
$ref: '#/components/schemas/payment_order_create_request'
/api/payment_orders/{id}:
parameters:
- name: id
in: path
schema:
type: string
required: true
get:
summary: get payment order
tags:
- PaymentOrder
description: Get details on a single payment order
operationId: getPaymentOrder
security:
- basic_auth: []
responses:
'200':
description: successful
content:
application/json:
schema:
$ref: '#/components/schemas/payment_order'
'404':
description: not found
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
patch:
summary: update payment order
tags:
- PaymentOrder
description: Update a payment order
operationId: updatePaymentOrder
security:
- basic_auth: []
parameters: []
responses:
'200':
description: successful
content:
application/json:
schema:
$ref: '#/components/schemas/payment_order'
'404':
description: not found
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'409':
description: conflict
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
'422':
description: parameter_invalid
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/payment_order_update_request'
components:
schemas:
contact_detail_create_request:
type: object
properties:
contact_identifier:
type: string
contact_identifier_type:
type: string
enum:
- email
- phone_number
- website
line_item_request:
type: object
properties:
amount:
type: integer
description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.
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
description:
type:
- string
- 'null'
description: A free-form description of the line item.
accounting_category_id:
type:
- string
- 'null'
description: The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected.
required:
- amount
payment_order_async_create_request:
type: object
properties:
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: Either `receiving_account` or `receiving_account_id` must be present. When using `receiving_account_id`, you may pass the id of an external account or an 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'
description: Name of the ultimate funds recipient.
ultimate_receiving_party_identifier:
type:
- string
- 'null'
description: Identifier of the ultimate funds recipient.
send_remittance_advice:
type:
- boolean
- 'null'
description: Send an email to the counterparty when the payment order is sent to the bank. If `null`, `send_remittance_advice` on the Counterparty is used.
expires_at:
type:
- string
- 'null'
format: date-time
description: RFP payments require an expires_at. This value must be past the effective_date.
reconciliation_status:
type: string
enum:
- unreconciled
- tentatively_reconciled
- reconciled
description: One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
external_id:
type:
- string
- 'null'
description: An optional user-defined 180 character unique identifier.
fallback_type:
type: string
enum:
- ach
description: A payment type to fallback to if the original type is not valid for the receiving account. Currently, this only supports falling back from RTP to ACH (type=rtp and fallback_type=ach)
receiving_account:
type: object
properties:
account_type:
$ref: '#/components/schemas/external_account_type'
party_type:
type:
- string
- 'null'
enum:
- business
- individual
description: Either `individual` or `business`.
party_address:
$ref: '#/components/schemas/address_request'
description: Required if receiving wire payments.
name:
type:
- string
- 'null'
description: A nickname for the external account. This is only for internal usage and won't affect any payments
account_details:
type: array
items:
type: object
properties:
account_number:
type: string
account_number_type:
type: string
enum:
- au_number
- base_address
- card_token
- clabe
- ethereum_address
- hk_number
- iban
- id_number
- nz_number
- other
- pan
- polygon_address
- sg_number
- solana_address
- wallet_address
required:
- account_number
routing_details:
type: array
items:
type: object
properties:
routing_number:
type: string
routing_number_type:
type: string
enum:
- aba
- au_bsb
- br_codigo
- ca_cpa
- chips
- cnaps
- dk_interbank_clearing_code
- gb_sort_code
- hk_interbank_clearing_code
- hu_interbank_clearing_code
- id_sknbi_code
- il_bank_code
- in_ifsc
- jp_zengin_code
- my_branch_code
- mx_bank_identifier
- nz_national_clearing_code
- pl_national_clearing_code
- se_bankgiro_clearing_code
- sg_interbank_clearing_code
- swift
- za_national_clearing_code
payment_type:
type: string
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
required:
- routing_number
- routing_number_type
external_id:
type:
- string
- 'null'
description: An optional user-defined 180 character unique identifier.
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.
party_name:
type: string
description: If this value isn't provided, it will be inherited from the counterparty's name.
party_identifier:
type: string
ledger_account:
$ref: '#/components/schemas/ledger_account_create_request'
description: Specifies a ledger account object that will be created with the external account. The resulting ledger account is linked to the external account for auto-ledgering Payment objects. See https://docs.moderntreasury.com/docs/linking-to-other-modern-treasury-objects for more details.
plaid_processor_token:
type: string
description: If you've enabled the Modern Treasury + Plaid integration in your Plaid account, you can pass the processor token in this field.
contact_details:
type: array
items:
$ref: '#/components/schemas/contact_detail_create_request'
description: Either `receiving_account` or `receiving_account_id` must be present. When using `receiving_account_id`, you may pass the id of an external account or an internal account.
ledger_transaction:
$ref: '#/components/schemas/ledger_transaction_create_request'
description: Specifies a ledger transaction object that will be created with the payment order. If the ledger transaction cannot be created, then the payment order creation will fail. The resulting ledger transaction will mirror the status of the payment order.
ledger_transaction_id:
type: string
format: uuid
description: Either ledger_transaction or ledger_transaction_id can be provided. Only a pending ledger transaction can be attached upon payment order creation. Once the payment order is created, the status of the ledger transaction tracks the payment order automatically.
line_items:
type: array
items:
$ref: '#/components/schemas/line_item_request'
description: An array of line items that must sum up to the amount of the payment order.
transaction_monitoring_enabled:
type: boolean
deprecated: true
description: A flag that determines whether a payment order should go through transaction monitoring.
ultimate_originating_account_id:
type: string
format: uuid
description: The ultimate originating account ID. Can be a `virtual_account` or `internal_account`.
ultimate_originating_party_address:
type:
- object
- 'null'
description: Address of the ultimate originator of the payment order.
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]
vendor_attributes:
type: object
description: Additional vendor specific fields for this payment. Data must be represented as key-value pairs.
required:
- type
- amount
- direction
- originating_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.
ledger_entry_create_request:
type: object
properties:
amount:
type: integer
description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. Can be any integer up to 36 digits.
effective_at:
type: string
format: date-time
description: The timestamp (ISO8601 format) at which the ledger transaction happened for reporting purposes.
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`.
_x-stainless-modelDefPath: $shared.transaction_direction
ledger_account_id:
type: string
format: uuid
description: The ledger account that this ledger entry is associated with.
lock_version:
type:
- integer
- 'null'
description: Lock version of the ledger account. This can be passed when creating a ledger transaction to only succeed if no ledger transactions have posted since the given version. See our post about Designing the Ledgers API with Optimistic Locking for more details.
pending_balance_amount:
type:
- object
- 'null'
additionalProperties:
type: integer
description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s pending balance. If any of these conditions would be false after the transaction is created, the entire call will fail with error code 422.
posted_balance_amount:
type:
- object
- 'null'
additionalProperties:
type: integer
description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s posted balance. If any of these conditions would be false after the transaction is created, the entire call will fail with error code 422.
available_balance_amount:
type:
- object
- 'null'
additionalProperties:
type: integer
description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to lock on the account’s available balance. If any of these conditions would be false after the transaction is created, the entire call will fail with error code 422.
show_resulting_ledger_account_balances:
type:
- boolean
- 'null'
description: If true, response will include the balance of the associated ledger account for the entry.
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
required:
- amount
- direction
- ledger_account_id
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 represent
# --- truncated at 32 KB (118 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/modern-treasury/refs/heads/main/openapi/modern-treasury-paymentorder-api-openapi.yml