openapi: 3.0.1 info: title: Modern Treasury 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. paths: /api/ledger_account_balance_monitors: get: summary: list ledger_account_balance_monitors tags: - LedgerAccountBalanceMonitor operationId: listLedgerAccountBalanceMonitors description: Get a list of ledger account balance monitors. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - $ref: '#/components/parameters/metadata_query' - $ref: '#/components/parameters/bulk_id' - name: ledger_account_id in: query schema: type: string description: Query the balance monitors for a single ledger account. required: false responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger_account_balance_monitor' post: summary: create ledger_account_balance_monitor tags: - LedgerAccountBalanceMonitor operationId: createLedgerAccountBalanceMonitor description: Create a ledger account balance monitor. 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/ledger_account_balance_monitor' '403': description: forbidden 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/ledger_account_balance_monitor_create_request' /api/ledger_account_balance_monitors/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get ledger_account_balance_monitor tags: - LedgerAccountBalanceMonitor operationId: getLedgerAccountBalanceMonitor description: Get details on a single ledger account balance monitor. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_balance_monitor' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update ledger_account_balance_monitor tags: - LedgerAccountBalanceMonitor operationId: updateLedgerAccountBalanceMonitor description: Update a ledger account balance monitor. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_balance_monitor' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found 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/ledger_account_balance_monitor_update_request' delete: summary: delete ledger_account_balance_monitor tags: - LedgerAccountBalanceMonitor operationId: deleteLedgerAccountBalanceMonitor description: Delete a ledger account balance monitor. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_balance_monitor' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_account_categories: get: summary: list ledger_account_categories tags: - LedgerAccountCategory operationId: listLedgerAccountCategories description: Get a list of ledger account categories. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - $ref: '#/components/parameters/metadata_query' - $ref: '#/components/parameters/bulk_id' - name: name in: query required: false schema: type: string - $ref: '#/components/parameters/bulk_name' - name: ledger_id in: query schema: type: string required: false - name: currency in: query required: false schema: type: string - name: external_id in: query schema: type: string required: false - name: parent_ledger_account_category_id in: query schema: type: string required: false description: Query categories that are nested underneath a parent category - name: ledger_account_id in: query schema: type: string required: false description: Query categories which contain a ledger account directly or through child categories. - name: balances in: query schema: type: object properties: effective_at: type: string format: date-time additionalProperties: false style: deepObject required: false description: >- For example, if you want the balances as of a particular time (ISO8601), the encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`. The balances as of a time are inclusive of entries with that exact time, but with respect to the ledger accounts that are currently present in the category. explode: true responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger_account_category' post: summary: create ledger_account_category tags: - LedgerAccountCategory operationId: createLedgerAccountCategory description: Create a ledger account category. 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/ledger_account_category' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found 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/ledger_account_category_create_request' /api/ledger_account_categories/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get ledger_account_category tags: - LedgerAccountCategory operationId: getLedgerAccountCategory description: Get the details on a single ledger account category. security: - basic_auth: [] parameters: - name: balances in: query schema: type: object properties: as_of_date: type: string format: date effective_at: type: string format: date-time additionalProperties: false style: deepObject required: false description: >- For example, if you want the balances as of a particular time (ISO8601), the encoded query string would be `balances%5Beffective_at%5D=2000-12-31T12:00:00Z`. The balances as of a time are inclusive of entries with that exact time, but with respect to the ledger accounts that are currently present in the category. explode: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_category' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update ledger_account_category tags: - LedgerAccountCategory operationId: updateLedgerAccountCategory description: Update the details of a ledger account category. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_category' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '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: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/ledger_account_category_update_request' delete: summary: delete ledger_account_category tags: - LedgerAccountCategory operationId: deleteLedgerAccountCategory description: Delete a ledger account category. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_category' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_account_categories/{id}/ledger_accounts/{ledger_account_id}: parameters: - name: id in: path schema: type: string description: id required: true - name: ledger_account_id in: path schema: type: string description: ledger_account_id required: true put: summary: add ledger_account to ledger_account_category tags: - LedgerAccountCategory operationId: addLedgerAccountToLedgerAccountCategory description: Add a ledger account to a ledger account category. security: - basic_auth: [] responses: '200': description: successful '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' delete: summary: remove ledger_account from ledger_account_category tags: - LedgerAccountCategory operationId: removeLedgerAccountFromLedgerAccountCategory description: Remove a ledger account from a ledger account category. security: - basic_auth: [] responses: '200': description: successful '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_account_categories/{id}/ledger_account_categories/{sub_category_id}: parameters: - name: id in: path schema: type: string description: id required: true - name: sub_category_id in: path schema: type: string description: sub_category_id required: true put: summary: add ledger_account_category to ledger_account_category tags: - LedgerAccountCategory operationId: addLedgerAccountCategoryToLedgerAccountCategory description: Add a ledger account category to a ledger account category. security: - basic_auth: [] responses: '200': description: successful '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' delete: summary: delete ledger_account_category from ledger_account_category tags: - LedgerAccountCategory operationId: deleteLedgerAccountCategoryFromLedgerAccountCategory description: Delete a ledger account category from a ledger account category. security: - basic_auth: [] responses: '200': description: successful '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_account_settlements/{id}/ledger_entries: parameters: - name: id in: path description: id required: true schema: type: string patch: summary: patch ledger_account_settlement_entries tags: - LedgerAccountSettlement operationId: patchLedgerAccountSettlementEntries description: Add ledger entries to a draft ledger account settlement. security: - basic_auth: [] parameters: [] responses: '200': description: successful '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful requestBody: content: application/json: schema: $ref: '#/components/schemas/ledger_account_settlement_entries_patch_request' delete: summary: delete ledger_account_settlement_entries tags: - LedgerAccountSettlement operationId: deleteLedgerAccountSettlementEntries description: Remove ledger entries from a draft ledger account settlement. security: - basic_auth: [] parameters: [] responses: '200': description: successful '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful requestBody: content: application/json: schema: $ref: '#/components/schemas/ledger_account_settlement_entries_delete_request' /api/ledger_account_settlements: post: summary: create ledger_account_settlement tags: - LedgerAccountSettlement operationId: createLedgerAccountSettlement description: Create a ledger account settlement. 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/ledger_account_settlement' '403': description: forbidden 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/ledger_account_settlement_create_request' get: summary: list ledger_account_settlements tags: - LedgerAccountSettlement operationId: listLedgerAccountSettlements description: Get a list of ledger account settlements. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - $ref: '#/components/parameters/metadata_query' - $ref: '#/components/parameters/bulk_id' - name: settled_ledger_account_id in: query schema: type: string required: false - name: settlement_entry_direction in: query schema: type: string required: false - name: ledger_transaction_id in: query schema: type: string required: false - name: ledger_id in: query schema: type: string required: false - name: created_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use created_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true - name: updated_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the updated at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use updated_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger_account_settlement' /api/ledger_account_settlements/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get ledger_account_settlement tags: - LedgerAccountSettlement operationId: getLedgerAccountSettlement description: Get details on a single ledger account settlement. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_settlement' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update ledger_account_settlement tags: - LedgerAccountSettlement operationId: updateLedgerAccountSettlement description: Update the details of a ledger account settlement. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_settlement' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found 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/ledger_account_settlement_update_request' /api/ledger_account_statements: post: summary: create ledger_account_statement tags: - LedgerAccountStatement operationId: createLedgerAccountStatement description: Create a ledger account statement. 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/ledger_account_statement' '403': description: forbidden 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/ledger_account_statement_create_request' /api/ledger_account_statements/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get ledger_account_statement tags: - LedgerAccountStatement operationId: getLedgerAccountStatement description: Get details on a single ledger account statement. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account_statement' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_accounts: get: summary: list ledger_accounts tags: - LedgerAccount operationId: listLedgerAccounts description: Get a list of ledger accounts. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - $ref: '#/components/parameters/metadata_query' - $ref: '#/components/parameters/bulk_id' - $ref: '#/components/parameters/bulk_name' - name: ledger_id in: query schema: type: string required: false - name: external_id in: query schema: type: string required: false - name: currency in: query required: false schema: type: string - name: balances in: query schema: type: object properties: as_of_date: type: string format: date effective_at: type: string format: date-time effective_at_lower_bound: type: string format: date-time effective_at_upper_bound: type: string format: date-time additionalProperties: false style: deepObject required: false description: >- Use `balances[effective_at_lower_bound]` and `balances[effective_at_upper_bound]` to get the balances change between the two timestamps. The lower bound is inclusive while the upper bound is exclusive of the provided timestamps. If no value is supplied the balances will be retrieved not including that bound. explode: true - name: pending_balance_amount in: query schema: type: object properties: gt: type: integer lt: type: integer gte: type: integer lte: type: integer eq: type: integer not_eq: type: integer additionalProperties: false style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. explode: true - name: posted_balance_amount in: query schema: type: object properties: gt: type: integer lt: type: integer gte: type: integer lte: type: integer eq: type: integer not_eq: type: integer additionalProperties: false style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. explode: true - name: available_balance_amount in: query schema: type: object properties: gt: type: integer lt: type: integer gte: type: integer lte: type: integer eq: type: integer not_eq: type: integer additionalProperties: false style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. explode: true - name: normal_balance in: query schema: type: string enum: - credit - debit _x-stainless-modelDefPath: $shared.transaction_direction - name: created_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use created_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true - name: updated_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the updated at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use updated_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true - name: ledger_account_category_id in: query schema: type: string required: false responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger_account' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create ledger_account tags: - LedgerAccount operationId: createLedgerAccount description: Create a ledger account. 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/ledger_account' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found 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/ledger_account_create_request' /api/ledger_accounts/{id}: parameters: - name: id in: path schema: type: string description: The ledger account id (UUID) required: true get: summary: get ledger_account tags: - LedgerAccount operationId: getLedgerAccount description: Get details on a single ledger account. security: - basic_auth: [] parameters: - name: id in: path schema: type: string description: The ledger account id (UUID) or external_id required: true - name: balances in: query schema: type: object properties: as_of_date: type: string format: date effective_at: type: string format: date-time effective_at_lower_bound: type: string format: date-time effective_at_upper_bound: type: string format: date-time as_of_lock_version: type: integer additionalProperties: false style: deepObject required: false description: >- Use `balances[effective_at_lower_bound]` and `balances[effective_at_upper_bound]` to get the balances change between the two timestamps. The lower bound is inclusive while the upper bound is exclusive of the provided timestamps. If no value is supplied the balances will be retrieved not including that bound. Use `balances[as_of_lock_version]` to retrieve a balance as of a specific Ledger Account `lock_version`. explode: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update ledger_account tags: - LedgerAccount operationId: updateLedgerAccount description: Update the details of a ledger account. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '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: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/ledger_account_update_request' delete: summary: delete ledger_account tags: - LedgerAccount operationId: deleteLedgerAccount description: Delete a ledger account. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_account' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_entries: get: summary: list ledger_entries tags: - LedgerEntry operationId: listLedgerEntries description: Get a list of all ledger entries. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - $ref: '#/components/parameters/bulk_id' - name: ledger_account_id in: query schema: type: string required: false - name: ledger_transaction_id in: query schema: type: string required: false - name: ledger_account_payout_id in: query schema: type: string required: false - name: ledger_account_settlement_id in: query schema: type: string required: false - name: effective_date in: query schema: type: object additionalProperties: type: string format: date style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the transaction's effective date. Format YYYY-MM-DD explode: true - name: effective_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the transaction's effective time. Format ISO8601 explode: true - name: updated_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the posted at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use updated_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true - name: as_of_lock_version in: query schema: type: integer required: false description: >- Shows all ledger entries that were present on a ledger account at a particular `lock_version`. You must also specify `ledger_account_id`. - name: ledger_account_lock_version in: query schema: type: object additionalProperties: type: integer style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the lock_version of a ledger account. For example, for all entries created at or before before lock_version 1000 of a ledger account, use `ledger_account_lock_version%5Blte%5D=1000`. explode: true - name: ledger_account_category_id in: query schema: type: string required: false description: Get all ledger entries that match the direction specified. One of `credit`, `debit`. - name: ledger_account_statement_id in: query schema: type: string required: false description: Get all ledger entries that are included in the ledger account statement. - name: show_deleted in: query required: false description: >- If true, response will include ledger entries that were deleted. When you update a ledger transaction to specify a new set of entries, the previous entries are deleted. schema: type: boolean - name: direction in: query schema: type: string enum: - credit - debit _x-stainless-modelDefPath: $shared.transaction_direction required: false description: >- If true, response will include ledger entries that were deleted. When you update a ledger transaction to specify a new set of entries, the previous entries are deleted. - name: status in: query schema: type: string enum: - pending - posted - archived required: false description: >- Get all ledger entries that match the status specified. One of `pending`, `posted`, or `archived`. For multiple statuses, use `status[]=pending&status[]=posted`. - name: status[] in: query schema: type: array items: type: string enum: - pending - posted - archived required: false description: >- Get all ledger entries that match the status specified. One of `pending`, `posted`, or `archived`. For multiple statuses, use `status[]=pending&status[]=posted`. explode: true - name: order_by in: query schema: type: object properties: created_at: type: string enum: - asc - desc effective_at: type: string enum: - asc - desc additionalProperties: false style: deepObject required: false description: >- Order by `created_at` or `effective_at` in `asc` or `desc` order. For example, to order by `effective_at asc`, use `order_by%5Beffective_at%5D=asc`. Ordering by only one field at a time is supported. explode: true - name: amount in: query schema: type: object properties: gte: type: integer lte: type: integer gt: type: integer lt: type: integer eq: type: integer style: deepObject required: false description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by amount. explode: true - name: show_balances in: query required: false description: >- If true, response will include the balances attached to the ledger entry. If there is no balance available, null will be returned instead. schema: type: boolean - $ref: '#/components/parameters/metadata_query' responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger_entry' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_entries/{id}: parameters: - name: id in: path schema: type: string description: id required: true patch: summary: update ledger_entry tags: - LedgerEntry operationId: updateLedgerEntry description: Update the details of a ledger entry. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_entry' requestBody: content: application/json: schema: $ref: '#/components/schemas/ledger_entry_update_request' get: summary: get ledger_entry tags: - LedgerEntry operationId: getLedgerEntry description: Get details on a single ledger entry. security: - basic_auth: [] parameters: - name: show_balances in: query required: false description: >- If true, response will include the balances attached to the ledger entry. If there is no balance available, null will be returned instead. schema: type: boolean responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_entry' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_transactions/{id}/partial_post: post: summary: create ledger_transaction partial post tags: - LedgerTransaction operationId: CreateLedgerTransactionPartialPost description: Create a ledger transaction that partially posts another ledger transaction. security: - basic_auth: [] parameters: - name: id in: path schema: type: string description: The ID of the ledger transaction to partially post. required: true responses: '201': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_transaction' '404': description: not found 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/ledger_transaction_partial_post_create_request' /api/ledger_transactions/{id}/reversal: post: summary: create ledger_transaction reversal tags: - LedgerTransaction operationId: CreateLedgerTransactionReversal description: Create a ledger transaction reversal. security: - basic_auth: [] parameters: - name: id in: path schema: type: string description: The id of ledger transaction to reverse. required: true responses: '201': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_transaction' '404': description: not found 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/ledger_transaction_reversal_create_request' /api/ledger_transaction_versions: get: summary: list ledger_transaction_versions tags: - LedgerTransaction operationId: listLedgerTransactionVersions description: Get a list of ledger transaction versions. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - name: created_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created_at timestamp. For example, for all dates after Jan 1 2000 12:00 UTC, use created_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true - name: version in: query schema: type: object additionalProperties: type: integer style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the version. For example, for all versions after 2, use version%5Bgt%5D=2. explode: true - name: ledger_transaction_id in: query schema: type: string required: false description: Get all the ledger transaction versions corresponding to the ID of a ledger transaction. - name: ledger_account_statement_id in: query schema: type: string required: false description: Get all ledger transaction versions that are included in the ledger account statement. responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger_transaction_version' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledger_transactions: get: summary: list ledger_transactions tags: - LedgerTransaction operationId: listLedgerTransactions description: Get a list of ledger transactions. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - $ref: '#/components/parameters/metadata_query' - $ref: '#/components/parameters/bulk_id' - name: ledger_id in: query schema: type: string required: false - name: ledger_account_id in: query schema: type: string required: false - name: effective_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use "gt" (>), "gte" (>=), "lt" (<), "lte" (<=), or "eq" (=) to filter by effective at. For example, for all transactions after Jan 1 2000, use effective_at%5Bgt%5D=2000-01-01T00:00:00:00.000Z. explode: true - name: effective_date in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by effective date. For example, for all dates after Jan 1 2000, use effective_date%5Bgt%5D=2000-01-01. explode: true - name: posted_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the posted at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use posted_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true - name: updated_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the posted at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use updated_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true - name: order_by in: query schema: type: object properties: created_at: type: string enum: - asc - desc effective_at: type: string enum: - asc - desc additionalProperties: false style: deepObject required: false description: >- Order by `created_at` or `effective_at` in `asc` or `desc` order. For example, to order by `effective_at asc`, use `order_by%5Beffective_at%5D=asc`. Ordering by only one field at a time is supported. explode: true - name: amount in: query schema: type: object properties: gte: type: integer lte: type: integer gt: type: integer lt: type: integer eq: type: integer style: deepObject required: false description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by amount. explode: true - name: status in: query schema: anyOf: - type: string enum: - pending - posted - archived - type: array items: type: string enum: - pending - posted - archived required: false - name: external_id in: query required: false schema: type: string - name: ledger_account_category_id in: query schema: type: string required: false - name: ledger_account_settlement_id in: query schema: type: string required: false - name: reverses_ledger_transaction_id in: query schema: type: string required: false - name: partially_posts_ledger_transaction_id in: query schema: type: string required: false - name: ledgerable_id in: query schema: type: string required: false - name: ledgerable_type in: query schema: type: string enum: - expected_payment - incoming_payment_detail - payment_order - return - reversal required: false responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger_transaction' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: parameter invalid content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create ledger_transaction tags: - LedgerTransaction operationId: createLedgerTransaction description: Create a ledger transaction. 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/ledger_transaction' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '429': description: too many requests content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/ledger_transaction_create_request' /api/ledger_transactions/{id}: get: summary: get ledger_transaction tags: - LedgerTransaction operationId: getLedgerTransaction description: Get details on a single ledger transaction. security: - basic_auth: [] parameters: - name: id in: path schema: type: string description: >- The ledger transaction id (UUID) or external_id. If using external_id, only non-archived Ledger Transactions will be returned. required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_transaction' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '409': description: conflict when two ledger transactions in the organization have the same external_id content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update ledger_transaction tags: - LedgerTransaction operationId: updateLedgerTransaction description: Update the details of a ledger transaction. security: - basic_auth: [] parameters: - name: id in: path schema: type: string description: The ledger transaction id (UUID) required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger_transaction' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '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: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '429': description: too many requests content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/ledger_transaction_update_request' /api/ledger_transactions/{id}/versions: parameters: - name: id in: path schema: type: string description: id required: true get: summary: list ledger_transaction versions tags: - LedgerTransaction operationId: listLedgerTransactionVersionsNested description: Get a list of ledger transaction versions. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - $ref: '#/components/parameters/bulk_id' - name: created_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created_at timestamp. For example, for all dates after Jan 1 2000 12:00 UTC, use created_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true - name: version in: query schema: type: object additionalProperties: type: integer style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the version. For example, for all versions after 2, use version%5Bgt%5D=2. explode: true responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger_transaction_version' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' /api/ledgers: get: summary: list ledgers tags: - Ledger operationId: listLedgers description: Get a list of ledgers. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - $ref: '#/components/parameters/metadata_query' - $ref: '#/components/parameters/bulk_id' - name: updated_at in: query schema: type: object additionalProperties: type: string format: date-time style: deepObject required: false description: >- Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the posted at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use updated_at%5Bgt%5D=2000-01-01T12:00:00Z. explode: true responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/ledger' post: summary: create ledger tags: - Ledger operationId: createLedger description: Create a ledger. 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/ledger' '403': description: forbidden 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/ledger_create_request' /api/ledgers/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get ledger tags: - Ledger operationId: getLedger description: Get details on a single ledger. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update ledger tags: - Ledger operationId: updateLedger description: Update the details of a ledger. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found 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/ledger_update_request' delete: summary: delete ledger tags: - Ledger operationId: deleteLedger description: Delete a ledger. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ledger' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/connection_legal_entities: get: summary: list connection_legal_entities tags: - ConnectionLegalEntity operationId: listConnectionLegalEntities description: Get a list of all connection legal entities. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: connection_id in: query schema: type: string required: false - name: legal_entity_id in: query schema: type: string required: false - name: status in: query schema: type: string enum: - completed - denied - failed - processing - suspended required: false responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/connection_legal_entity' post: summary: create connection_legal_entity tags: - ConnectionLegalEntity operationId: createConnectionLegalEntity description: Create a connection legal entity. 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/connection_legal_entity' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/connection_legal_entity_create_request' /api/connection_legal_entities/{id}: parameters: - name: id in: path description: The id of an existing connection legal entity. required: true schema: type: string get: summary: get connection_legal_entity tags: - ConnectionLegalEntity operationId: getConnectionLegalEntity description: Get details on a single connection legal entity. 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/connection_legal_entity' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update connection_legal_entity tags: - ConnectionLegalEntity operationId: updateConnectionLegalEntity description: Update a connection legal entity. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/connection_legal_entity' '404': description: not found 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/connection_legal_entity_update_request' /api/connections: get: summary: list connections tags: - Connection operationId: listConnections description: Get a list of all connections. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: vendor_customer_id in: query schema: type: string required: false description: An identifier assigned by the vendor to your organization. - name: entity in: query schema: type: string required: false description: A string code representing the vendor (i.e. bank). responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/connection' /api/legal_entities: get: summary: list legal_entities tags: - LegalEntity operationId: listLegalEntities description: Get a list of all legal entities. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: legal_entity_type in: query schema: type: string enum: - business - individual required: false - name: status in: query schema: type: string enum: - pending - active - suspended - denied required: false - name: show_deleted in: query required: false schema: type: string - name: external_id in: query schema: type: string required: false description: An optional user-defined 180 character unique identifier. - $ref: '#/components/parameters/metadata_query' responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/legal_entity' post: summary: create legal_entity tags: - LegalEntity operationId: createLegalEntity 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/legal_entity' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/legal_entity_create_request' /api/legal_entities/{id}: parameters: - name: id in: path description: id required: true schema: type: string get: summary: get legal_entity tags: - LegalEntity operationId: getLegalEntity description: Get details on a single legal entity. 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/legal_entity' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update legal entity tags: - LegalEntity operationId: updateLegalEntity description: Update a legal entity. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/legal_entity' '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: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/legal_entity_update_request' /api/journal_entries: get: summary: list journal_entries tags: - JournalEntry operationId: listJournalEntries description: Retrieve a list of journal entries security: - basic_auth: [] parameters: - name: journal_report_id in: query schema: type: string required: true description: The ID of the journal report - name: page in: query schema: type: integer required: false description: Page number for pagination - name: per_page in: query schema: type: integer required: false description: Number of items per page responses: '200': description: successful - only returns entries for current organization '404': description: page disabled - returns not found '422': description: empty journal_report_id - returns validation error /api/journal_entries/{id}: parameters: - name: id in: path schema: type: string description: The ID of the journal entry required: true get: summary: show journal_entry tags: - JournalEntry operationId: getJournalEntry description: Retrieve a specific journal entry security: - basic_auth: [] responses: '200': description: successful - returns entry with all attributes '404': description: page disabled - returns not found /api/journal_reports: get: summary: list journal_reports tags: - JournalReport operationId: listJournalReports description: Retrieve a list of journal reports security: - basic_auth: [] parameters: - name: status in: query schema: type: string enum: - draft - published - ready required: false responses: '200': description: successful - returns list of journal reports /api/journal_reports/{id}: parameters: - name: id in: path schema: type: string description: The ID of the journal report required: true get: summary: show journal_report tags: - JournalReport operationId: getJournalReport description: Retrieve a specific journal report security: - basic_auth: [] responses: '200': description: successful - returns journal report with empty metadata '404': description: not found - returns 404 for non-existent journal report patch: summary: update journal_report tags: - JournalReport operationId: updateJournalReport description: Update a journal report security: - basic_auth: [] parameters: [] responses: '200': description: successful - updates metadata '404': description: not found - non-existent journal report '422': description: validation error - invalid status requestBody: content: application/json: schema: type: object properties: status: type: string metadata: type: object /api/journal_sources: get: summary: list journal_sources tags: - JournalSource operationId: listJournalSources description: Retrieve a list of journal sources security: - basic_auth: [] parameters: - name: journal_report_id in: query schema: type: string required: false description: The ID of the journal report - name: journal_entry_id in: query schema: type: string required: false description: The ID of the journal entry - name: source_id in: query schema: type: string required: false description: The ID of the source object - name: source_type in: query schema: type: string required: false description: The type of the source object - name: page in: query schema: type: integer required: false description: Page number for pagination - name: per_page in: query schema: type: integer required: false description: Number of items per page responses: '200': description: successful - only returns sources for current organization '404': description: page disabled - returns not found /api/journal_sources/{id}: parameters: - name: id in: path schema: type: string description: The ID of the journal source required: true get: summary: show journal_source tags: - JournalSource operationId: getJournalSource description: Retrieve a specific journal source security: - basic_auth: [] responses: '200': description: successful - returns journal source with all attributes '404': description: page disabled - returns not found /api/internal_accounts/{internal_account_id}/account_capabilities/{id}: parameters: - name: internal_account_id in: path description: Unique identifier for the internal account. required: true schema: type: string - name: id in: path description: Unique identifier for the account capability. required: true schema: type: string patch: summary: update account_capability tags: - AccountCapability operationId: updateAccountCapability security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: 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 discarded_at: type: string format: date-time nullable: true direction: type: string enum: - credit - debit description: >- One of `debit` or `credit`. Indicates the direction of money movement this capability is responsible for. _x-stainless-modelDefPath: $shared.transaction_direction identifier: type: string nullable: true description: >- A unique reference assigned by your bank for tracking and recognizing payment files. It is important this is formatted exactly how the bank assigned it. 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 description: Indicates the the type of payment this capability is responsible for originating. additionalProperties: true minProperties: 9 maxProperties: 9 required: - id - object - live_mode - created_at - updated_at - discarded_at - direction - identifier - payment_type '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful requestBody: content: application/json: schema: type: object properties: identifier: type: string description: >- A unique reference assigned by your bank for tracking and recognizing payment files. It is important this is formatted exactly how the bank assigned it. required: - identifier additionalProperties: false minProperties: 1 maxProperties: 1 /api/{accounts_type}/{account_id}/account_details: get: summary: list account_details tags: - AccountDetail description: Get a list of account details for a single internal or external account. operationId: listAccountDetails security: - basic_auth: [] parameters: - name: accounts_type in: path schema: $ref: '#/components/schemas/accounts_type' required: true - name: account_id in: path schema: type: string description: The ID of the account. required: true - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/account_detail' post: summary: create account_detail tags: - AccountDetail description: Create an account detail for an external account. operationId: createAccountDetail 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 - name: accounts_type in: path schema: type: string enum: - external_accounts required: true - name: account_id in: path schema: type: string description: The ID of the account. required: true responses: '201': description: successful content: application/json: schema: $ref: '#/components/schemas/account_detail' '404': description: unsuccessful 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/account_detail_create_request' /api/{accounts_type}/{account_id}/account_details/{id}: get: summary: get account_detail tags: - AccountDetail description: Get a single account detail for a single internal or external account. operationId: getAccountDetail security: - basic_auth: [] parameters: - name: accounts_type in: path schema: $ref: '#/components/schemas/accounts_type' required: true - name: account_id in: path schema: type: string description: The ID of the account. required: true - name: id in: path schema: type: string description: The ID of the account detail. required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/account_detail' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' delete: summary: delete account_detail tags: - AccountDetail description: Delete a single account detail for an external account. operationId: deleteAccountDetail security: - basic_auth: [] parameters: - name: accounts_type in: path schema: type: string enum: - external_accounts required: true - name: account_id in: path schema: type: string description: The ID of the account. required: true - name: id in: path schema: type: string description: The ID of the account detail. required: true responses: '204': description: successful /api/internal_accounts/{internal_account_id}/balance_reports: get: summary: list balance_reports tags: - BalanceReport description: Get all balance reports for a given internal account. operationId: listBalanceReports security: - basic_auth: [] parameters: - name: internal_account_id in: path schema: type: string required: true - name: as_of_date in: query schema: type: string format: date required: false description: The date of the balance report in local time. - name: balance_report_type in: query schema: type: string enum: - intraday - other - previous_day - real_time required: false description: The specific type of balance report. One of `intraday`, `previous_day`, `real_time`, or `other`. - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/balance_report' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create balance reports tags: - BalanceReport operationId: createBalanceReport security: - basic_auth: [] parameters: - name: internal_account_id in: path schema: type: string required: true - 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/balance_report' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/balance_report_create_request' /api/internal_accounts/{internal_account_id}/balance_reports/{id}: get: summary: get balance_report tags: - BalanceReport description: Get a single balance report for a given internal account. operationId: getBalanceReport security: - basic_auth: [] parameters: - name: internal_account_id in: path schema: type: string required: true - name: id in: path required: true description: Either the unique identifier of the balance report or 'latest' for the latest balance report. schema: anyOf: - type: string - type: string enum: - latest responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/balance_report' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' delete: summary: delete balance_report tags: - BalanceReport description: Deletes a given balance report. operationId: deleteBalanceReport security: - basic_auth: [] parameters: - name: internal_account_id in: path schema: type: string required: true - name: id in: path schema: type: string required: true description: Either the unique identifier of the balance report or 'latest' for the latest balance report. responses: '204': description: no content '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: not allowed content: application/json: schema: $ref: '#/components/schemas/error_message' /api/bulk_requests: get: summary: list bulk_requests tags: - BulkRequest operationId: listBulkRequests security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: status in: query schema: type: string enum: - pending - processing - completed required: false description: One of pending, processing, or completed. - name: resource_type in: query schema: type: string enum: - payment_order - ledger_account - ledger_transaction - expected_payment - transaction - transaction_line_item - entity_link required: false description: One of payment_order, expected_payment, or ledger_transaction. - name: action_type in: query schema: type: string enum: - create - update - delete required: false description: One of create, or update. - $ref: '#/components/parameters/metadata_query' responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/bulk_request' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '403': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create bulk_request tags: - BulkRequest operationId: createBulkRequest 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/bulk_request' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '403': description: unsuccessful 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/bulk_request_create_request' /api/bulk_requests/{id}: parameters: - name: id in: path description: id required: true schema: type: string get: summary: get bulk_request tags: - BulkRequest operationId: getBulkRequest security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/bulk_request' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '403': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/bulk_results: get: summary: list bulk_results tags: - BulkResult operationId: listBulkResults security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: status in: query schema: type: string enum: - pending - successful - failed required: false description: One of successful or failed. - name: request_type in: query schema: type: string enum: - bulk_request required: false description: >- The type of the request that created this result. bulk_request is the only supported `request_type` - name: request_id in: query schema: type: string required: false description: >- Unique identifier for the request that created this bulk result. This is the ID of the bulk request when `request_type` is bulk_request - name: entity_type in: query schema: type: string enum: - payment_order - ledger_account - ledger_transaction - expected_payment - transaction - entity_link - transaction_line_item - bulk_error required: false description: >- The type of the request that created this result. bulk_request is the only supported `request_type` - name: entity_id in: query schema: type: string required: false description: Unique identifier for the result entity object. responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/bulk_result' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '403': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' /api/bulk_results/{id}: parameters: - name: id in: path description: id required: true schema: type: string get: summary: get bulk_result tags: - BulkResult operationId: getBulkResult security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/bulk_result' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '403': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/counterparties/{id}/collect_account: post: summary: collect account details tags: - Counterparty operationId: collectAccountDetails description: Send an email requesting account details. 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 - name: id in: path schema: type: string description: counterparty id required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/counterparty_collect_account_response' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/counterparty_collect_account_request' /api/counterparties: get: summary: list counterparties tags: - Counterparty operationId: listCounterparties description: Get a paginated list of all counterparties. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: name in: query required: false description: Performs a partial string match of the name field. This is also case insensitive. schema: type: string - name: email in: query schema: type: string format: email required: false description: Performs a partial string match of the email field. This is also case insensitive. - name: external_id in: query schema: type: string required: false description: An optional user-defined 180 character unique identifier. - name: legal_entity_id in: query schema: type: string required: false description: Filters for counterparties with the given legal entity ID. - $ref: '#/components/parameters/metadata_query' - name: created_at_lower_bound in: query schema: type: string format: date-time required: false description: Used to return counterparties created after some datetime. - name: created_at_upper_bound in: query schema: type: string format: date-time required: false description: Used to return counterparties created before some datetime. responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/counterparty' '400': description: bad_request '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create counterparty tags: - Counterparty operationId: createCounterparty description: Create a new counterparty. 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/counterparty' '415': description: unsuccessful 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/counterparty_create_request' /api/counterparties/{id}: parameters: - name: id in: path schema: type: string description: The id of an existing counterparty. required: true get: summary: show counterparty tags: - Counterparty operationId: getCounterparty description: Get details on a single counterparty. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/counterparty' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update counterparty tags: - Counterparty operationId: updateCounterparty description: Updates a given counterparty with new information. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/counterparty' '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: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/counterparty_update_request' delete: summary: delete counterparty tags: - Counterparty operationId: deleteCounterparty description: Deletes a given counterparty. security: - basic_auth: [] responses: '204': description: successful /api/documents: get: summary: list documents tags: - Document description: Get a list of documents. operationId: listDocuments security: - basic_auth: [] parameters: - name: documentable_id in: query schema: type: string description: The unique identifier for the associated object. required: false - name: documentable_type in: query schema: type: string enum: - connections - counterparties - expected_payments - external_accounts - identifications - incoming_payment_details - internal_accounts - legal_entities - organizations - payment_orders - transactions description: >- The type of the associated object. Currently can be one of `payment_order`, `transaction`, `expected_payment`, `counterparty`, `organization`, `case`, `internal_account`, `decision`, or `external_account`. required: false - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/document' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create document tags: - Document description: Create a document. operationId: createDocument 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/document' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/document_create_request' /api/{documentable_type}/{documentable_id}/documents: get: summary: list documents - nested path (legacy) tags: - Document description: Get a list of documents. operationId: listDocumentsNested security: - basic_auth: [] parameters: - name: documentable_id in: path schema: type: string description: The unique identifier for the associated object. required: true - name: documentable_type in: path schema: type: string enum: - connections - counterparties - expected_payments - external_accounts - identifications - incoming_payment_details - internal_accounts - legal_entities - organizations - payment_orders - transactions description: >- The type of the associated object. Currently can be one of `payment_order`, `transaction`, `expected_payment`, `counterparty`, `organization`, `case`, `internal_account`, `decision`, or `external_account`. required: true - name: document_type in: query schema: type: string required: false description: A category given to the document, can be `null`. - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/document' post: summary: create document - nested path (legacy) tags: - Document description: Create a document. operationId: createDocumentNested security: - basic_auth: [] parameters: - name: documentable_id in: path schema: type: string description: The unique identifier for the associated object. required: true - name: documentable_type in: path schema: type: string enum: - connections - counterparties - expected_payments - external_accounts - identifications - incoming_payment_details - internal_accounts - legal_entities - organizations - payment_orders - transactions description: >- The type of the associated object. Currently can be one of `payment_order`, `transaction`, `expected_payment`, `counterparty`, `organization`, `case`, `internal_account`, `decision`, or `external_account`. required: true - 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/document' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/legacy_document_create_request' /api/{documentable_type}/{documentable_id}/documents/{id}: parameters: - name: documentable_id in: path schema: type: string description: The unique identifier for the associated object. required: true - name: documentable_type in: path schema: type: string enum: - connections - counterparties - expected_payments - external_accounts - identifications - incoming_payment_details - internal_accounts - legal_entities - organizations - payment_orders - transactions description: >- The type of the associated object. Currently can be one of `payment_order`, `transaction`, `expected_payment`, `counterparty`, `organization`, `case`, `internal_account`, `decision`, or `external_account`. required: true - name: id in: path schema: type: string description: The ID of the document. required: true get: summary: get document - nested path (legacy) tags: - Document description: Get an existing document. operationId: getDocumentNested security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/document' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/documents/{id}: parameters: - name: id in: path schema: type: string description: The ID of the document. required: true get: summary: get document tags: - Document description: Get an existing document. operationId: getDocument security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/document' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/{documentable_type}/{documentable_id}/documents/{id}/download: parameters: - name: documentable_id in: path schema: type: string description: The unique identifier for the associated object. required: true - name: documentable_type in: path schema: type: string enum: - connections - counterparties - expected_payments - external_accounts - identifications - incoming_payment_details - internal_accounts - legal_entities - organizations - payment_orders - transactions description: >- The type of the associated object. Currently can be one of `payment_order`, `transaction`, `expected_payment`, `counterparty`, `organization`, `case`, `internal_account`, `decision`, or `external_account`. required: true - name: id in: path schema: type: string description: The ID of the document. required: true get: summary: download document - nested path (legacy) tags: - Document description: Download an existing document. operationId: downloadDocumentNested security: - basic_auth: [] responses: '302': description: redirect '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/documents/{id}/download: parameters: - name: id in: path schema: type: string description: The ID of the document. required: true get: summary: download document tags: - Document description: Download an existing document. operationId: downloadDocument security: - basic_auth: [] responses: '302': description: redirect '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/events: get: summary: list events tags: - Event operationId: listEvents security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: event_time_start in: query schema: type: string format: date-time required: false description: An inclusive lower bound for when the event occurred - name: event_time_end in: query schema: type: string format: date-time required: false description: An inclusive upper bound for when the event occurred - name: resource in: query required: false schema: type: string - name: entity_id in: query schema: type: string required: false - name: event_name in: query required: false schema: type: string responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/event' /api/events/{id}: parameters: - name: id in: path schema: type: string required: true description: event id get: summary: get event tags: - Event operationId: getEvent security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/event' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/expected_payments: get: summary: list expected_payments tags: - ExpectedPayment operationId: listExpectedPayments security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: status in: query schema: type: string enum: - archived - partially_reconciled - reconciled - unreconciled required: false description: One of unreconciled, reconciled, or archived. - name: internal_account_id in: query schema: type: string required: false description: Specify internal_account_id to see expected_payments for a specific account. - name: external_id in: query schema: type: string required: false - name: direction in: query schema: type: string enum: - credit - debit _x-stainless-modelDefPath: $shared.transaction_direction required: false description: One of credit, debit - 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 description: 'One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp,sen, sepa, signet, wire' - name: counterparty_id in: query schema: type: string required: false description: Specify counterparty_id to see expected_payments for a specific account. - $ref: '#/components/parameters/metadata_query' - name: created_at_lower_bound in: query schema: type: string format: date-time required: false description: Used to return expected payments created after some datetime - name: created_at_upper_bound in: query schema: type: string format: date-time required: false description: Used to return expected payments created before some datetime - name: updated_at_lower_bound in: query schema: type: string format: date-time required: false description: Used to return expected payments updated after some datetime - name: updated_at_upper_bound in: query schema: type: string format: date-time required: false description: Used to return expected payments updated before some datetime responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/expected_payment' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create expected payment tags: - ExpectedPayment operationId: createExpectedPayment 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/expected_payment' '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/expected_payment_create_request' /api/expected_payments/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get expected payment tags: - ExpectedPayment operationId: getExpectedPayment security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/expected_payment' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update expected payment tags: - ExpectedPayment operationId: updateExpectedPayment security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/expected_payment' '409': description: conflict content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/expected_payment_update_request' delete: summary: delete expected payment tags: - ExpectedPayment operationId: deleteExpectedPayment security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/expected_payment' '422': description: parameter_invalid content: application/json: schema: $ref: '#/components/schemas/error_message' /api/external_accounts/{id}/verify: post: summary: verify external account tags: - ExternalAccount operationId: verifyExternalAccount 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 - name: id in: path schema: type: string description: external account id required: true responses: '200': description: successful content: application/json: schema: anyOf: - $ref: '#/components/schemas/external_account' - $ref: '#/components/schemas/external_account_verification_attempt' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/external_account_verify_request' /api/external_accounts/{id}/complete_verification: post: summary: complete verification of external account tags: - ExternalAccount operationId: completeVerificationExternalAccount 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 - name: id in: path schema: type: string description: external account id required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/external_account' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/external_account_complete_verification_request' /api/external_accounts: get: summary: list external accounts tags: - ExternalAccount operationId: listExternalAccounts security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: party_name in: query required: false description: Searches the ExternalAccount's party_name AND the Counterparty's party_name schema: type: string - name: counterparty_id in: query schema: type: string required: false - name: external_id in: query schema: type: string required: false description: An optional user-defined 180 character unique identifier. - $ref: '#/components/parameters/metadata_query' responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/external_account' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create external account tags: - ExternalAccount operationId: createExternalAccount 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/external_account' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/external_account_create_request' /api/external_accounts/{id}: parameters: - name: id in: path schema: type: string description: external account id required: true get: summary: show external account tags: - ExternalAccount operationId: getExternalAccount security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/external_account' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update external account tags: - ExternalAccount operationId: updateExternalAccount security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/external_account' '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: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/external_account_update_request' delete: summary: delete external account tags: - ExternalAccount operationId: deleteExternalAccount security: - basic_auth: [] responses: '204': description: successful /api/foreign_exchange_quotes: get: summary: list foreign_exchange_quotes tags: - ForeignExchangeQuote operationId: listQuotes security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: internal_account_id in: query schema: type: string required: false description: The ID for the `InternalAccount` this quote is associated with. - name: expires_at in: query schema: type: string format: date-time required: false description: The timestamp until which the quote must be booked by. - name: base_currency in: query schema: type: string required: false description: Currency to convert, often called the "sell" currency. - name: target_currency in: query schema: type: string required: false description: Currency to convert the `base_currency` to, often called the "buy" currency. - $ref: '#/components/parameters/metadata_query' - name: effective_at_start in: query schema: type: string format: date required: false description: An inclusive lower bound for searching effective_at - name: effective_at_end in: query schema: type: string format: date required: false description: An inclusive upper bound for searching effective_at responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/foreign_exchange_quote' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create foreign_exchange_quote tags: - ForeignExchangeQuote operationId: createQuote 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/foreign_exchange_quote' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: invalid param content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/foreign_exchange_quote_create_request' /api/foreign_exchange_quotes/{id}: parameters: - name: id in: path description: id required: true schema: type: string get: summary: get foreign_exchange_quote tags: - ForeignExchangeQuote operationId: getQuote security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/foreign_exchange_quote' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/holds: get: summary: list holds tags: - Hold description: Get a list of holds. operationId: listHolds security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: target_id in: query schema: type: string nullable: true required: false description: 'Translation missing: en.openapi.descriptions.payment_order.query_params.target_id' - name: target_type in: query schema: type: string enum: - payment_order nullable: true required: false description: 'Translation missing: en.openapi.descriptions.payment_order.query_params.target_type' - name: status in: query schema: type: string enum: - active - resolved nullable: true required: false description: 'Translation missing: en.openapi.descriptions.payment_order.query_params.status' - $ref: '#/components/parameters/metadata_query' responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/hold' post: summary: create hold tags: - Hold description: Create a new hold operationId: createHold 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: created content: application/json: schema: $ref: '#/components/schemas/hold' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/error_message' '403': description: forbidden content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: type: object properties: target_type: type: string enum: - payment_order description: The type of target to hold target_id: type: string format: uuid description: The ID of the target to hold reason: type: string nullable: true description: The reason for the hold status: type: string enum: - active description: The status of the hold metadata: type: object additionalProperties: type: string nullable: true description: Additional metadata for the hold required: - target_type - target_id - status /api/holds/{id}: get: summary: show hold tags: - Hold description: Get a specific hold operationId: showHold security: - basic_auth: [] parameters: - name: id in: path schema: type: string description: hold id required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/hold' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update hold tags: - Hold description: Update a hold operationId: updateHold security: - basic_auth: [] parameters: - name: id in: path schema: type: string description: hold id required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/hold' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: type: object properties: status: type: string enum: - resolved description: The new status of the hold resolution: type: string nullable: true description: The resolution of the hold required: - status /api/incoming_payment_details: get: summary: list incoming payment_details tags: - IncomingPaymentDetail operationId: listIncomingPaymentDetails description: Get a list of Incoming Payment Details. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: direction in: query schema: type: string enum: - credit - debit _x-stainless-modelDefPath: $shared.transaction_direction required: false description: One of `credit` or `debit`. - name: status in: query schema: type: string enum: - completed - pending - returned required: false description: The current status of the incoming payment order. One of `pending`, `completed`, or `returned`. - name: type in: query schema: type: string enum: - ach - au_becs - bacs - book - check - eft - interac - neft - nz_becs - rtp - sepa - signet - stablecoin - wire - zengin required: false description: 'One of: `ach`, `book`, `check`, `eft`, `interac`, `rtp`, `sepa`, `signet`, or `wire`.' - name: as_of_date_start in: query schema: type: string format: date required: false description: >- Filters incoming payment details with an as_of_date starting on or after the specified date (YYYY-MM-DD). - name: as_of_date_end in: query schema: type: string format: date required: false description: >- Filters incoming payment details with an as_of_date starting on or before the specified date (YYYY-MM-DD). - $ref: '#/components/parameters/metadata_query' - name: virtual_account_id in: query schema: type: string required: false description: If the incoming payment detail is in a virtual account, the ID of the Virtual Account. - name: subtype in: query schema: type: string required: false description: >- An additional layer of classification for the type of incoming payment detail. For example, a `type` of `stablecoin` may have a `subtype` of `ethereum` or `solana`. responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/incoming_payment_detail' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' /api/incoming_payment_details/{id}: parameters: - name: id in: path schema: type: string description: The unique identifier of the incoming payment detail. required: true get: summary: get incoming payment detail tags: - IncomingPaymentDetail operationId: getIncomingPaymentDetail description: Get an existing Incoming Payment Detail. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/incoming_payment_detail' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update incoming payment detail tags: - IncomingPaymentDetail operationId: updateIncomingPaymentDetail description: Update an existing Incoming Payment Detail. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/incoming_payment_detail' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/incoming_payment_detail_update_request' /api/internal_accounts: get: summary: list internal accounts tags: - InternalAccount operationId: listInternalAccounts security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: currency in: query schema: $ref: '#/components/schemas/currency' required: false description: Only return internal accounts with this currency. - name: counterparty_id in: query schema: type: string required: false description: Only return internal accounts associated with this counterparty. - name: legal_entity_id in: query schema: type: string required: false description: Only return internal accounts associated with this legal entity. - name: payment_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 description: Only return internal accounts that can make this type of payment. - name: payment_direction in: query schema: type: string enum: - credit - debit _x-stainless-modelDefPath: $shared.transaction_direction required: false description: Only return internal accounts that can originate payments with this direction. - name: status in: query schema: type: string enum: - active - pending_activation - suspended - pending_closure - closed required: false description: Only return internal accounts with this status. - name: external_id in: query schema: type: string required: false description: An optional user-defined 180 character unique identifier. - $ref: '#/components/parameters/metadata_query' responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/internal_account' post: summary: create internal account tags: - InternalAccount operationId: createInternalAccount 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/internal_account' '404': description: not found 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/internal_account_create_request' /api/internal_accounts/{id}: parameters: - name: id in: path schema: type: string description: Unique identifier for the account. required: true get: summary: get internal account tags: - InternalAccount operationId: getInternalAccount security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/internal_account' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update internal account tags: - InternalAccount operationId: updateInternalAccount security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/internal_account' '404': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '409': description: conflict content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful requestBody: content: application/json: schema: $ref: '#/components/schemas/internal_account_update_request' /api/internal_accounts/{id}/request_closure: parameters: - name: id in: path schema: type: string description: Unique identifier for the account. required: true post: summary: request closure of internal account tags: - InternalAccount operationId: requestInternalAccountClosure security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/internal_account' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unprocessable entity content: application/json: schema: $ref: '#/components/schemas/error_message' /api/invoices/{invoice_id}/invoice_line_items: parameters: - name: invoice_id in: path schema: type: string description: invoice_id required: true get: summary: list invoice_line_items tags: - InvoiceLineItem operationId: listInvoiceLineItems security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/invoice_line_item' post: summary: create invoice_line_item tags: - InvoiceLineItem operationId: createInvoiceLineItem 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_line_item' requestBody: content: application/json: schema: $ref: '#/components/schemas/invoice_line_item_create_request' /api/invoices/{invoice_id}/invoice_line_items/{id}: parameters: - name: invoice_id in: path schema: type: string description: invoice_id required: true - name: id in: path schema: type: string description: id required: true get: summary: get invoice_line_item tags: - InvoiceLineItem operationId: getInvoiceLineItem security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/invoice_line_item' patch: summary: update invoice_line_item tags: - InvoiceLineItem operationId: updateInvoiceLineItem security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/invoice_line_item' requestBody: content: application/json: schema: $ref: '#/components/schemas/invoice_line_item_update_request' delete: summary: delete invoice_line_item tags: - InvoiceLineItem operationId: deleteInvoiceLineItem security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/invoice_line_item' /api/invoices: get: summary: list invoices tags: - Invoice operationId: listInvoices security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true 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 nullable: true 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 nullable: true 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}/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/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' /api/{itemizable_type}/{itemizable_id}/line_items: get: summary: list line items tags: - LineItem description: Get a list of line items operationId: listLineItems security: - basic_auth: [] parameters: - name: itemizable_id in: path schema: type: string description: The ID of the payment order or expected payment. required: true - name: itemizable_type in: path schema: type: string enum: - expected_payments - payment_orders description: One of `payment_orders` or `expected_payments`. required: true - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/line_item' /api/{itemizable_type}/{itemizable_id}/line_items/{id}: get: summary: get line item tags: - LineItem description: Get a single line item operationId: getLineItem security: - basic_auth: [] parameters: - name: itemizable_id in: path schema: type: string description: The ID of the payment order or expected payment. required: true - name: itemizable_type in: path schema: type: string enum: - expected_payments - payment_orders description: One of `payment_orders` or `expected_payments`. required: true - name: id in: path schema: type: string description: The ID of the line item. required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/line_item' patch: summary: update line item tags: - LineItem operationId: updateLineItem security: - basic_auth: [] parameters: - name: itemizable_id in: path schema: type: string description: The ID of the payment order or expected payment. required: true - name: itemizable_type in: path schema: type: string enum: - expected_payments - payment_orders description: One of `payment_orders` or `expected_payments`. required: true - name: id in: path schema: type: string description: The ID of the line item. required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/line_item' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/line_item_update_request' /api/payment_actions: get: summary: list payment_actions operationId: listPaymentActions tags: - PaymentAction description: Get a list of all payment actions. security: - basic_auth: [] parameters: - name: type in: query schema: type: string enum: - stop - issue description: The type of payment action. required: false - name: status in: query schema: type: string enum: - pending - processable - processing - sent - acknowledged - failed - cancelled description: Filter by payment actions of a specific status. required: false - name: actionable_id in: query schema: type: string description: The ID of the associated actionable object. required: false - name: actionable_type in: query schema: type: string description: The type of the associated actionable object. One of `payment_order`, `expected_payment`. required: false - name: internal_account_id in: query schema: type: string description: The ID of one of your internal accounts. required: false - name: created_at in: query style: deepObject explode: true required: false schema: type: object properties: gt: type: string format: date-time gte: type: string format: date-time lt: type: string format: date-time lte: type: string format: date-time eq: type: string format: date-time description: >- Filter by `created_at` using comparison operators like `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created at timestamp. For example, `created_at[gte]=2024-01-01T00:00:00Z` - $ref: '#/components/parameters/metadata_query' - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/payment_action' post: summary: create payment_action operationId: createPaymentAction tags: - PaymentAction description: Create a payment action. 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_action' '422': description: invalid type content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/payment_action_create_request' /api/payment_actions/{id}: parameters: - name: id in: path description: id required: true schema: type: string get: summary: get payment_action operationId: getPaymentAction tags: - PaymentAction description: Get details on a single payment action. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/payment_action' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update payment_action operationId: updatePaymentAction tags: - PaymentAction description: Update a single payment action. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/payment_action' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: missing status content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/payment_action_update_request' /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 nullable: true 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 nullable: true 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 nullable: true 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' /api/payment_references: get: summary: list payment_references tags: - PaymentReference operationId: listPaymentReferences security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query schema: type: integer required: false - name: referenceable_id in: query schema: type: string required: false description: >- The id of the referenceable to search for. Must be accompanied by the referenceable_type or will return an error. - name: referenceable_type in: query schema: type: string enum: - payment_order - return - reversal required: false description: >- One of the referenceable types. This must be accompanied by the id of the referenceable or will return an error. - name: reference_number in: query schema: type: string required: false description: The actual reference number assigned by the bank. responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/payment_reference_object' '422': description: validation error content: application/json: schema: type: object properties: errors: type: array items: type: string /api/payment_references/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get payment_reference tags: - PaymentReference operationId: getPaymentReference security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/payment_reference_object' /api/ping: get: summary: ping api tags: - Ping operationId: pingAPI security: - basic_auth: [] description: A test endpoint often used to confirm credentials and headers are being passed in correctly. responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/ping_response' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' '429': description: unsuccessful '500': description: internal server error /api/returns: get: summary: list returns tags: - Return operationId: listReturns description: Get a list of returns. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: internal_account_id in: query schema: type: string required: false description: Specify `internal_account_id` if you wish to see returns to/from a specific account. - name: counterparty_id in: query schema: type: string required: false description: Specify `counterparty_id` if you wish to see returns that occurred with a specific counterparty. - name: returnable_id in: query schema: type: string required: false description: The ID of a valid returnable. Must be accompanied by `returnable_type`. - name: returnable_type in: query schema: type: string enum: - incoming_payment_detail - payment_order - return - reversal required: false description: >- One of `payment_order`, `reversal`, or `incoming_payment_detail`. Must be accompanied by `returnable_id`. responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/return' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create return tags: - Return operationId: createReturn description: Create a return. 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/return' '404': description: unsuccessful 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/return_create_request' /api/returns/{id}: parameters: - name: id in: path schema: type: string description: The ID of an existing return. required: true get: summary: show return tags: - Return operationId: getReturn description: Get a single return. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/return' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/payment_orders/{payment_order_id}/reversals: get: summary: list reversals tags: - Reversal description: Get a list of all reversals of a payment order. operationId: listReversals security: - basic_auth: [] parameters: - name: payment_order_id in: path schema: type: string description: The ID of the relevant Payment Order. required: true - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/reversal' post: summary: create reversal tags: - Reversal description: Create a reversal for a payment order. operationId: createReversal 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 - name: payment_order_id in: path schema: type: string description: The id of the payment order being reversed. description: The ID of the relevant Payment Order. required: true responses: '201': description: successful content: application/json: schema: $ref: '#/components/schemas/reversal' '404': description: unsuccessful 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/reversal_create_request' /api/payment_orders/{payment_order_id}/reversals/{reversal_id}: parameters: - name: payment_order_id in: path schema: type: string description: The id of the payment order being reversed. required: true - name: reversal_id in: path schema: type: string description: The ID of the reversal. required: true get: summary: show reversal tags: - Reversal description: Get details on a single reversal of a payment order. operationId: getReversal security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/reversal' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' /api/{accounts_type}/{account_id}/routing_details: get: summary: list routing_details tags: - RoutingDetail description: Get a list of routing details for a single internal or external account. operationId: listRoutingDetails security: - basic_auth: [] parameters: - name: accounts_type in: path schema: $ref: '#/components/schemas/accounts_type' required: true - name: account_id in: path schema: type: string description: The ID of the account. required: true - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/routing_detail' post: summary: create routing_detail tags: - RoutingDetail description: Create a routing detail for a single external account. operationId: createRoutingDetail 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 - name: accounts_type in: path schema: type: string enum: - external_accounts required: true - name: account_id in: path schema: type: string description: The ID of the account. required: true responses: '201': description: successful content: application/json: schema: $ref: '#/components/schemas/routing_detail' '404': description: unsuccessful 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/routing_detail_create_request' /api/{accounts_type}/{account_id}/routing_details/{id}: get: summary: get routing_detail tags: - RoutingDetail description: Get a single routing detail for a single internal or external account. operationId: getRoutingDetail security: - basic_auth: [] parameters: - name: accounts_type in: path schema: $ref: '#/components/schemas/accounts_type' required: true - name: account_id in: path schema: type: string description: The ID of the account. required: true - name: id in: path schema: type: string description: The ID of the routing detail. required: true responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/routing_detail' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' delete: summary: delete routing_detail tags: - RoutingDetail description: Delete a routing detail for a single external account. operationId: deleteRoutingDetail security: - basic_auth: [] parameters: - name: accounts_type in: path schema: type: string enum: - external_accounts required: true - name: account_id in: path schema: type: string description: The ID of the account. required: true - name: id in: path schema: type: string description: The ID of the routing detail. required: true responses: '204': description: successful /api/simulations/incoming_payment_details/create_async: post: summary: create async incoming payment detail tags: - IncomingPaymentDetail operationId: createAsyncIncomingPaymentDetail description: Simulate Incoming Payment Detail 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/incoming_payment_detail' '400': description: bad request content: application/json: schema: $ref: '#/components/schemas/error_message' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '405': description: not allowed 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/incoming_payment_detail_create_request' /api/simulations/legal_entities/{id}/update_status: parameters: - name: id in: path description: Legal entity ID required: true schema: type: string patch: summary: update legal entity status tags: - LegalEntity operationId: updateLegalEntityStatus description: Update Legal Entity Status (sandbox only) security: - basic_auth: [] parameters: [] responses: '202': description: process started '405': description: not allowed in production '422': description: unprocessable entity requestBody: content: application/json: schema: $ref: '#/components/schemas/legal_entity_update_status_request' /api/transactions/{transaction_id}/line_items: parameters: - name: transaction_id in: path schema: type: string description: transaction_id required: true - name: after_cursor in: query schema: type: string nullable: true required: false - name: type in: query schema: type: string enum: - originating - receiving nullable: true required: false - name: per_page in: query schema: type: integer required: false get: summary: list transaction_line_items deprecated: true description: This endpoint has been deprecated in favor of /api/transaction_line_items tags: - TransactionLineItem operationId: listTransactionLineItemsNested security: - basic_auth: [] responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/transaction_line_item' /api/transaction_line_items: get: summary: list transaction_line_items tags: - TransactionLineItem operationId: listTransactionLineItems parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: id in: query required: false style: deepObject schema: type: object additionalProperties: type: string explode: true - name: type in: query schema: type: string enum: - originating - receiving nullable: true required: false - name: per_page in: query schema: type: integer required: false - name: transaction_id in: query schema: type: string required: false security: - basic_auth: [] responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/transaction_line_item' post: summary: create transaction line items tags: - TransactionLineItem operationId: createTransactionLineItem security: - basic_auth: [] parameters: [] responses: '201': description: successful content: application/json: schema: $ref: '#/components/schemas/transaction_line_item' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/transaction_line_item_create_request' /api/transaction_line_items/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get transaction line item tags: - TransactionLineItem operationId: listTransactionLineItem security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/transaction_line_item' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' delete: summary: delete transaction line item tags: - TransactionLineItem operationId: deleteTransactionLineItem security: - basic_auth: [] responses: '200': description: successful '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' /api/transactions: get: summary: list transactions tags: - Transaction operationId: listTransactions description: Get a list of all transactions. security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: internal_account_id in: query schema: type: string required: false description: Specify `internal_account_id` if you wish to see transactions to/from a specific account. - name: virtual_account_id in: query schema: type: string required: false - name: posted in: query required: false description: Either `true` or `false`. schema: type: boolean - name: as_of_date_start in: query schema: type: string format: date required: false description: Filters transactions with an `as_of_date` starting on or after the specified date (YYYY-MM-DD). - name: as_of_date_end in: query schema: type: string format: date required: false description: Filters transactions with an `as_of_date` starting on or before the specified date (YYYY-MM-DD). - name: direction in: query required: false schema: type: string - name: counterparty_id in: query schema: type: string required: false - name: payment_type in: query required: false schema: type: string - name: transactable_type in: query required: false schema: type: string - name: description in: query required: false description: Filters for transactions including the queried string in the description. schema: type: string - name: vendor_id in: query required: false description: >- Filters for transactions including the queried vendor id (an identifier given to transactions by the bank). schema: type: string - $ref: '#/components/parameters/metadata_query' responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/transaction' post: summary: create transaction tags: - Transaction operationId: createTransaction 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/transaction' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/transaction_create_request' /api/transactions/{id}: parameters: - name: id in: path schema: type: string required: true description: Transaction ID get: summary: get transaction tags: - Transaction operationId: getTransaction description: Get details on a single transaction. security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/transaction' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update transaction tags: - Transaction operationId: updateTransaction description: Update a single transaction. security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/transaction' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/transaction_update_request' delete: summary: delete transaction tags: - Transaction operationId: deleteTransaction security: - basic_auth: [] responses: '204': description: successful '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' /api/validations/routing_numbers: get: summary: validate routing numbers tags: - Validation operationId: validateRoutingNumber description: Validates the routing number information supplied without creating a routing detail security: - basic_auth: [] parameters: - name: routing_number in: query required: true description: The routing number that is being validated. schema: type: string - name: routing_number_type in: query schema: 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 - mx_bank_identifier - my_branch_code - nz_national_clearing_code - pl_national_clearing_code - se_bankgiro_clearing_code - sg_interbank_clearing_code - swift - za_national_clearing_code required: true description: >- The type of routing number. See https://docs.moderntreasury.com/platform/reference/routing-detail-object for more details. In sandbox mode we currently only support `aba` and `swift` with routing numbers '123456789' and 'GRINUST0XXX' respectively. responses: '200': description: successful valid routing number and type content: application/json: schema: $ref: '#/components/schemas/routing_number_lookup_request' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' '422': description: unsuccessful with invalid parameter content: application/json: schema: $ref: '#/components/schemas/error_message' /api/virtual_accounts: get: summary: list virtual_accounts tags: - VirtualAccount operationId: listVirtualAccounts security: - basic_auth: [] description: Get a list of virtual accounts. parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: internal_account_id in: query schema: type: string required: false - name: counterparty_id in: query schema: type: string required: false - $ref: '#/components/parameters/metadata_query' responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/virtual_account' '401': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' post: summary: create virtual_account tags: - VirtualAccount operationId: createVirtualAccount 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/virtual_account' '401': description: unauthorized 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/virtual_account_create_request' /api/virtual_accounts/{id}: parameters: - name: id in: path schema: type: string required: true description: Virtual Acccount ID get: summary: get virtual_account tags: - VirtualAccount operationId: getVirtualAccount security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/virtual_account' '404': description: not found content: application/json: schema: $ref: '#/components/schemas/error_message' patch: summary: update virtual_account tags: - VirtualAccount operationId: updateVirtualAccount security: - basic_auth: [] parameters: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/virtual_account' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/virtual_account_update_request' delete: summary: delete virtual_account tags: - VirtualAccount operationId: deleteVirtualAccount security: - basic_auth: [] responses: '200': description: successful content: application/json: schema: $ref: '#/components/schemas/virtual_account' /api/account_collection_flows: get: summary: list account_collection_flows tags: - AccountCollectionFlow operationId: listAccountCollectionFlows security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: client_token in: query required: false schema: type: string - name: status in: query required: false schema: type: string - name: counterparty_id in: query schema: type: string required: false - name: external_account_id in: query schema: type: string required: false responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/account_collection_flow' post: summary: create account_collection_flow tags: - AccountCollectionFlow operationId: createAccountCollectionFlow 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/account_collection_flow' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/account_collection_flow_create_request' /api/account_collection_flows/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get account_collection_flow tags: - AccountCollectionFlow operationId: getAccountCollectionFlow 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/account_collection_flow' patch: summary: update account_collection_flow tags: - AccountCollectionFlow operationId: updateAccountCollectionFlow 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/account_collection_flow' '404': description: not found 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/account_collection_flow_update_request' /api/payment_flows: get: summary: list payment_flows tags: - PaymentFlow operationId: listPaymentFlows security: - basic_auth: [] parameters: - name: after_cursor in: query schema: type: string nullable: true required: false - name: per_page in: query required: false schema: type: integer - name: client_token in: query required: false schema: type: string - name: status in: query required: false schema: type: string - name: counterparty_id in: query schema: type: string required: false - name: receiving_account_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 responses: '200': description: successful headers: X-After-Cursor: schema: type: string nullable: true 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 nullable: true description: The current `per_page`. content: application/json: schema: type: array items: $ref: '#/components/schemas/payment_flow' post: summary: create payment_flow tags: - PaymentFlow operationId: createPaymentFlow 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_flow' '422': description: unsuccessful content: application/json: schema: $ref: '#/components/schemas/error_message' requestBody: content: application/json: schema: $ref: '#/components/schemas/payment_flow_create_request' /api/payment_flows/{id}: parameters: - name: id in: path schema: type: string description: id required: true get: summary: get payment_flow tags: - PaymentFlow operationId: getPaymentFlow 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/payment_flow' patch: summary: update payment_flow tags: - PaymentFlow operationId: updatePaymentFlow 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/payment_flow' '404': description: not found 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_flow_update_request' servers: - url: http://localhost:3000 - url: https://app.moderntreasury.com components: securitySchemes: basic_auth: type: http scheme: basic parameters: metadata_query: name: metadata in: query schema: type: object additionalProperties: type: string style: deepObject explode: true required: false description: >- For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query parameters. bulk_id: name: id[] in: query style: form explode: true allowReserved: true schema: type: array items: type: string required: false description: >- If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with `id[]=`, for example `?id[]=123&id[]=abc`. bulk_name: name: name[] in: query style: form explode: true allowReserved: true schema: type: array items: type: string required: false description: >- If you have specific names to retrieve in bulk, you can pass them as query parameters delimited with `name[]=`, for example `?name[]=123&name[]=abc`. schemas: accounting: type: object deprecated: true properties: account_id: type: string format: uuid nullable: true 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 format: uuid nullable: true 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. account_capability: 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 discarded_at: type: string format: date-time nullable: true direction: type: string enum: - credit - debit description: >- One of `debit` or `credit`. Indicates the direction of money movement this capability is responsible for. _x-stainless-modelDefPath: $shared.transaction_direction identifier: type: string nullable: true description: >- A unique reference assigned by your bank for tracking and recognizing payment files. It is important this is formatted exactly how the bank assigned it. 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 description: Indicates the the type of payment this capability is responsible for originating. additionalProperties: true minProperties: 9 maxProperties: 9 required: - id - object - live_mode - created_at - updated_at - discarded_at - direction - identifier - payment_type account_capability_update_request: type: object properties: identifier: type: string description: >- A unique reference assigned by your bank for tracking and recognizing payment files. It is important this is formatted exactly how the bank assigned it. required: - identifier additionalProperties: false minProperties: 1 maxProperties: 1 account_collection_flow: 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 client_token: type: string description: >- The client token of the account collection flow. This token can be used to embed account collection in your client-side application. status: type: string enum: - cancelled - completed - expired - pending description: >- The current status of the account collection flow. One of `pending`, `completed`, `expired`, or `cancelled`. counterparty_id: type: string format: uuid description: >- The ID of a counterparty. An external account created with this flow will be associated with this counterparty. external_account_id: type: string format: uuid nullable: true description: If present, the ID of the external account created using this flow. payment_types: type: array items: type: string enum: - ach - wire description: An account created with this flow will support payments of one of these types. receiving_countries: type: array items: type: string enum: - USA - AUS - BEL - CAN - CHL - CHN - COL - FRA - DEU - HKG - IND - IRL - ITA - MEX - NLD - PER - ESP - GBR description: An account created with this flow will support wires from the US to these countries. additionalProperties: false minProperties: 10 required: - payment_types - counterparty_id account_collection_flow_create_request: type: object properties: counterparty_id: type: string format: uuid description: Required. payment_types: type: array items: type: string description: Required. At least one of `ach`, `wire` or `check`. receiving_countries: type: array items: type: string enum: - USA - AUS - BEL - CAN - CHL - CHN - COL - FRA - DEU - HKG - IND - IRL - ITA - MEX - NLD - PER - ESP - GBR description: Optional. Array of 3-digit ISO country codes. required: - payment_types - counterparty_id account_collection_flow_update_request: type: object properties: status: type: string enum: - cancelled description: >- Required. The updated status of the account collection flow. Can only be used to mark a flow as `cancelled`. required: - status account_detail: 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 discarded_at: type: string format: date-time nullable: true account_number: type: string description: The account number for the bank account. 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 description: >- One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the bank account number is in a generic format. account_number_safe: type: string description: The last 4 digits of the account_number. additionalProperties: false minProperties: 8 maxProperties: 9 required: - id - object - live_mode - created_at - updated_at - discarded_at - account_number_type - account_number_safe account_detail_create_request: type: object properties: account_number: type: string description: The account number for the bank account. 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 description: >- One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the bank account number is in a generic format. required: - account_number address: 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 line1: type: string nullable: true line2: type: string nullable: true locality: type: string nullable: true description: Locality or City. region: type: string nullable: true description: Region or State. postal_code: type: string description: The postal code of the address. nullable: true country: type: string description: Country code conforms to [ISO 3166-1 alpha-2] nullable: true nullable: true additionalProperties: false minProperties: 11 required: - id - object - live_mode - created_at - updated_at - line1 - line2 - locality - region - postal_code - country address_request: type: object properties: line1: type: string nullable: true line2: type: string nullable: true locality: type: string nullable: true description: Locality or City. region: type: string nullable: true description: Region or State. postal_code: type: string description: The postal code of the address. nullable: true country: type: string description: Country code conforms to [ISO 3166-1 alpha-2] nullable: true async_response: type: object properties: id: type: string format: uuid object: type: string additionalProperties: false minProperties: 2 required: - id - object balance_report: 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 balance_report_type: type: string enum: - intraday - other - previous_day - real_time description: The specific type of balance report. One of `intraday`, `previous_day`, `real_time`, or `other`. as_of_date: type: string format: date description: The date of the balance report in local time. as_of_time: type: string nullable: true format: time description: The time (24-hour clock) of the balance report in local time. balances: type: array description: An array of `Balance` objects. items: $ref: '#/components/schemas/balance' internal_account_id: type: string format: uuid description: The ID of one of your organization's Internal Accounts. additionalProperties: false minProperties: 10 required: - id - object - live_mode - created_at - updated_at - balance_report_type - as_of_date - as_of_time - balances - internal_account_id balance_report_create_request: type: object properties: as_of_date: type: string format: date description: The date of the balance report in local time. as_of_time: type: string description: The time (24-hour clock) of the balance report in local time. balance_report_type: type: string enum: - intraday - other - previous_day - real_time description: The specific type of balance report. One of `intraday`, `previous_day`, `real_time`, or `other`. balances: type: array items: $ref: '#/components/schemas/balance_create_request' description: An array of `Balance` objects. required: - as_of_date - as_of_time - balance_report_type - balances balance: 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 amount: type: integer description: The balance amount. currency: $ref: '#/components/schemas/currency' description: The currency of the balance. balance_type: type: string enum: - closing_available - closing_ledger - current_available - current_ledger - opening_available - opening_available_next_business_day - opening_ledger - other - previously_closed_book description: >- The specific type of balance reported. One of `opening_ledger`, `closing_ledger`, `current_ledger`, `opening_available`, `opening_available_next_business_day`, `closing_available`, `current_available`, 'previously_closed_book', or `other`. vendor_code: type: string description: The code used by the bank when reporting this specific balance. vendor_code_type: type: string nullable: true description: >- The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`, `bnk_dev`, `cleartouch`, `currencycloud`, `cross_river`, `dc_bank`, `dwolla`, `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `signet`, `silvergate`, `swift`, or `us_bank`. as_of_date: type: string nullable: true format: date description: The date on which the balance became true for the account. as_of_time: type: string nullable: true format: time description: The time on which the balance became true for the account. value_date: type: string nullable: true format: date description: The date on which the balance becomes available. additionalProperties: false minProperties: 13 required: - id - object - live_mode - created_at - updated_at - amount - currency - balance_type - vendor_code - vendor_code_type - as_of_date - as_of_time - value_date balance_create_request: type: object properties: amount: type: integer description: The balance amount. balance_type: type: string enum: - closing_available - closing_ledger - current_available - current_ledger - opening_available - opening_available_next_business_day - opening_ledger - other - previously_closed_book description: >- The specific type of balance reported. One of `opening_ledger`, `closing_ledger`, `current_ledger`, `opening_available`, `opening_available_next_business_day`, `closing_available`, `current_available`, 'previously_closed_book', or `other`. vendor_code: type: string description: The code used by the bank when reporting this specific balance. vendor_code_type: type: string nullable: true description: >- The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`, `bnk_dev`, `cleartouch`, `currencycloud`, `cross_river`, `dc_bank`, `dwolla`, `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `signet`, `silvergate`, `swift`, or `us_bank`. additionalProperties: false minProperties: 4 required: - amount - balance_type - vendor_code - vendor_code_type bulk_request: 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 action_type: type: string enum: - create - update - delete description: One of create, or update. resource_type: type: string enum: - payment_order - ledger_account - ledger_transaction - expected_payment - transaction - transaction_line_item - entity_link description: One of payment_order, expected_payment, or ledger_transaction. status: type: string enum: - pending - processing - completed description: One of pending, processing, or completed. total_resource_count: type: integer description: >- Total number of items in the `resources` array. Once a bulk request is completed, `success_result_count` + `failed_result_count` will be equal to `total_result_count`. success_result_count: type: integer description: Total number of successful bulk results so far for this request failed_result_count: type: integer description: Total number of failed bulk results so far for this request 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 additionalProperties: false minProperties: 12 required: - id - object - live_mode - created_at - updated_at - action_type - resource_type - status - total_resource_count - success_result_count - failed_result_count - metadata bulk_request_create_request: type: object properties: action_type: type: string enum: - create - update - delete description: One of create, or update. resource_type: type: string enum: - payment_order - ledger_account - ledger_transaction - expected_payment - transaction - transaction_line_item - entity_link description: One of payment_order, expected_payment, or ledger_transaction. 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 resources: type: array description: >- An array of objects where each object contains the input params for a single `action_type` request on a `resource_type` resource items: anyOf: - $ref: '#/components/schemas/payment_order_async_create_request' - $ref: '#/components/schemas/expected_payment_create_request' - $ref: '#/components/schemas/ledger_transaction_create_request' - $ref: '#/components/schemas/ledger_account_create_request' - $ref: '#/components/schemas/transaction_create_request' - type: object properties: id: type: string format: uuid - allOf: - $ref: '#/components/schemas/payment_order_update_request' - type: object properties: id: type: string format: uuid x-stainless-variantName: payment_order_update_request_with_id - allOf: - $ref: '#/components/schemas/expected_payment_update_request' - type: object properties: id: type: string format: uuid x-stainless-variantName: expected_payment_update_request_with_id - allOf: - $ref: '#/components/schemas/transaction_update_request' - type: object properties: id: type: string format: uuid x-stainless-variantName: transaction_update_request_with_id - allOf: - $ref: '#/components/schemas/ledger_transaction_update_request' - type: object properties: id: type: string format: uuid x-stainless-variantName: ledger_transaction_update_request_with_id required: - action_type - resource_type - resources bulk_result: 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 request_id: type: string format: uuid description: >- Unique identifier for the request that created this bulk result. This is the ID of the bulk request when `request_type` is bulk_request request_type: type: string enum: - bulk_request description: >- The type of the request that created this result. bulk_request is the only supported `request_type` status: type: string enum: - pending - successful - failed description: One of successful or failed. request_params: type: object description: >- An optional object that contains the provided input params for the request that created this result. This is an item in the `resources` array for the bulk_request additionalProperties: type: string nullable: true entity_id: type: string format: uuid description: Unique identifier for the result entity object. entity_type: type: string enum: - payment_order - ledger_account - ledger_transaction - expected_payment - transaction - entity_link - transaction_line_item - bulk_error description: >- The type of the result entity object. For a successful bulk result, this is the same as the `resource_type` of the bulk request. For a failed bulk result, this is always bulk_error entity: description: >- An object with type as indicated by `entity_type`. This is the result object that is generated by performing the requested action on the provided input `request_params`. anyOf: - $ref: '#/components/schemas/payment_order' - $ref: '#/components/schemas/expected_payment' - $ref: '#/components/schemas/ledger_transaction' - $ref: '#/components/schemas/ledger_account' - $ref: '#/components/schemas/transaction' - $ref: '#/components/schemas/bulk_error' additionalProperties: false minProperties: 12 required: - id - object - live_mode - created_at - updated_at - request_id - request_type - status - request_params - entity_id - entity_type - entity bulk_error: 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 request_errors: type: array items: type: object properties: code: type: string message: type: string parameter: type: string additionalProperties: false minProperties: 6 required: - id - object - live_mode - created_at - updated_at - request_errors connection: 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 discarded_at: type: string format: date-time nullable: true vendor_id: type: string format: uuid description: Unique identifier for the bank or vendor. vendor_customer_id: type: string format: uuid description: An identifier given to this connection by the bank. nullable: true vendor_name: type: string description: A human-friendly name for the bank or vendor. additionalProperties: false minProperties: 9 required: - id - object - live_mode - created_at - updated_at - discarded_at - vendor_id - vendor_customer_id - vendor_name connection_legal_entity: 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 discarded_at: type: string format: date-time nullable: true connection_id: type: string description: The ID of the connection. legal_entity_id: type: string description: The ID of the legal entity. status: type: string enum: - completed - denied - failed - processing - suspended description: The status of the connection legal entity. vendor_id: type: string description: The ID of the legal entity at the vendor. additionalProperties: false minProperties: 10 required: - id - object - live_mode - created_at - updated_at - discarded_at - connection_id - legal_entity_id - status - vendor_id connection_legal_entity_create_request: type: object properties: connection_id: type: string description: The ID of the connection. legal_entity_id: type: string description: The ID of the legal entity. legal_entity: type: object properties: legal_entity_type: type: string enum: - business - individual description: The type of legal entity. risk_rating: type: string enum: - low - medium - high nullable: true description: The risk rating of the legal entity. One of low, medium, high. prefix: type: string nullable: true description: An individual's prefix. first_name: type: string nullable: true description: An individual's first name. middle_name: type: string nullable: true description: An individual's middle name. last_name: type: string nullable: true description: An individual's last name. suffix: type: string nullable: true description: An individual's suffix. preferred_name: type: string nullable: true description: An individual's preferred name. citizenship_country: type: string nullable: true description: The country of citizenship for an individual. politically_exposed_person: type: boolean nullable: true description: Whether the individual is a politically exposed person. date_of_birth: type: string format: date nullable: true description: An individual's date of birth (YYYY-MM-DD). date_formed: type: string format: date nullable: true description: A business's formation date (YYYY-MM-DD). business_name: type: string nullable: true description: The business's legal business name. doing_business_as_names: type: array items: type: string description: >- A list of "Doing Business As" (DBA) / trade names for a business, different than their legal business name. legal_structure: type: string enum: - corporation - llc - non_profit - partnership - sole_proprietorship - trust nullable: true description: The business's legal structure. phone_numbers: type: array items: type: object properties: phone_number: type: string description: A list of phone numbers in E.164 format. email: type: string nullable: true description: The entity's primary email. website: type: string nullable: true description: The entity's primary website URL. business_description: type: string nullable: true description: A description of the business. intended_use: type: string nullable: true description: A description of the intended use of the legal entity. expected_activity_volume: type: integer nullable: true description: Monthly expected transaction volume in USD. country_of_incorporation: type: string nullable: true description: >- The country code where the business is incorporated in the ISO 3166-1 alpha-2 or alpha-3 formats. operating_jurisdictions: type: array items: type: string description: A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 codes). primary_social_media_sites: type: array items: type: string description: A list of primary social media URLs for the business. listed_exchange: type: string nullable: true description: ISO 10383 market identifier code. ticker_symbol: type: string nullable: true description: Stock ticker symbol for publicly traded companies. regulators: type: array nullable: true items: $ref: '#/components/schemas/legal_entity_regulator' description: Array of regulatory bodies overseeing this institution. third_party_verification: $ref: '#/components/schemas/third_party_verification' nullable: true deprecated: true description: Deprecated. Use `third_party_verifications` instead. third_party_verifications: type: array items: $ref: '#/components/schemas/third_party_verification' description: A list of third-party verifications run by external vendors. title: Third Party Verfications service_provider_legal_entity_id: type: string format: uuid nullable: true description: The UUID of the parent legal entity in the service provider tree. 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 external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. bank_settings: $ref: '#/components/schemas/legal_entity_bank_setting' nullable: true wealth_and_employment_details: $ref: '#/components/schemas/legal_entity_wealth_employment_detail' nullable: true compliance_details: type: object nullable: true deprecated: true addresses: type: array description: A list of addresses for the entity. items: $ref: '#/components/schemas/legal_entity_address_create_request' identifications: type: array description: A list of identifications for the legal entity. items: $ref: '#/components/schemas/identification_create_request' documents: type: array description: >- A list of documents to attach to the legal entity (e.g. articles of incorporation, certificate of good standing, proof of address). items: type: object properties: document_type: type: string enum: - articles_of_incorporation - certificate_of_good_standing - ein_letter - generic - identification_back - identification_front - proof_of_address description: A category given to the document, can be `null`. file_data: type: string description: Base64-encoded file content for the document. filename: type: string description: The original filename of the document. required: - document_type - file_data industry_classifications: type: array description: A list of industry classifications for the legal entity. items: $ref: '#/components/schemas/legal_entity_industry_classification' legal_entity_associations: type: array items: $ref: '#/components/schemas/legal_entity_association_inline_create_request' nullable: true description: The legal entity associations and its child legal entities. connection_id: type: string nullable: true description: >- The connection ID for the connection the legal entity is associated with. Defaults to the id of the connection designated with an is_default value of true or the id of an existing operational connection if only one is available. Pass in a value of null to prevent the connection from being associated with the legal entity. description: The legal entity. required: - connection_id connection_legal_entity_update_request: type: object properties: status: type: string enum: - processing description: The status of the connection legal entity. contact_detail: 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 discarded_at: type: string format: date-time nullable: true contact_identifier: type: string contact_identifier_type: type: string enum: - email - phone_number - website additionalProperties: false minProperties: 8 required: - id - object - live_mode - created_at - updated_at - discarded_at - contact_identifier - contact_identifier_type contact_detail_create_request: type: object properties: contact_identifier: type: string contact_identifier_type: type: string enum: - email - phone_number - website counterparty: 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 discarded_at: type: string format: date-time nullable: true name: type: string description: A human friendly name for this counterparty. nullable: true accounts: type: array items: 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 discarded_at: type: string format: date-time nullable: true account_type: $ref: '#/components/schemas/external_account_type' party_type: type: string enum: - business - individual nullable: true description: Either `individual` or `business`. party_address: $ref: '#/components/schemas/address' description: The address associated with the owner or `null`. name: type: string nullable: true description: >- A nickname for the external account. This is only for internal usage and won't affect any payments account_details: type: array items: $ref: '#/components/schemas/account_detail' routing_details: type: array items: $ref: '#/components/schemas/routing_detail' external_id: type: string nullable: true 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: The legal name of the entity which owns the account. contact_details: type: array items: $ref: '#/components/schemas/contact_detail' ledger_account_id: type: string format: uuid nullable: true description: >- If the external account links to a ledger account in Modern Treasury, the id of the ledger account will be populated here. verification_status: type: string enum: - pending_verification - unverified - verified verification_source: type: string enum: - ach_prenote - microdeposits - plaid nullable: true additionalProperties: false minProperties: 19 description: The accounts for this counterparty. email: type: string format: email description: The counterparty's email. nullable: true legal_entity_id: type: string format: uuid description: The id of the legal entity. nullable: true 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. external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. send_remittance_advice: type: boolean description: Send an email to the counterparty whenever an associated payment order is sent to the bank. verification_status: type: string deprecated: true description: The verification status of the counterparty. additionalProperties: false minProperties: 14 required: - id - object - live_mode - created_at - updated_at - discarded_at - name - accounts - email - legal_entity_id - metadata - external_id - send_remittance_advice - verification_status counterparty_collect_account_request: type: object properties: direction: type: string enum: - credit - debit description: >- One of `credit` or `debit`. Use `credit` when you want to pay a counterparty. Use `debit` when you need to charge a counterparty. This field helps us send a more tailored email to your counterparties." _x-stainless-modelDefPath: $shared.transaction_direction send_email: type: boolean description: >- By default, Modern Treasury will send an email to your counterparty that includes a link to the form they must fill out. However, if you would like to send the counterparty the link, you can set this parameter to `false`. The JSON body will include the link to the secure Modern Treasury form. fields: type: array items: type: string enum: - name - nameOnAccount - taxpayerIdentifier - accountType - accountNumber - ibanNumber - clabeNumber - walletAddress - panNumber - routingNumber - abaWireRoutingNumber - swiftCode - auBsb - caCpa - cnaps - gbSortCode - inIfsc - myBranchCode - brCodigo - routingNumberType - address - jpZenginCode - seBankgiroClearingCode - nzNationalClearingCode - hkInterbankClearingCode - huInterbankClearingCode - dkInterbankClearingCode - idSknbiCode - zaNationalClearingCode description: >- The list of fields you want on the form. This field is optional and if it is not set, will default to [\"nameOnAccount\", \"accountType\", \"accountNumber\", \"routingNumber\", \"address\"]. The full list of options is [\"name\", \"nameOnAccount\", \"taxpayerIdentifier\", \"accountType\", \"accountNumber\", \"routingNumber\", \"address\", \"ibanNumber\", \"swiftCode\"]. custom_redirect: type: string format: uri description: >- The URL you want your customer to visit upon filling out the form. By default, they will be sent to a Modern Treasury landing page. This must be a valid HTTPS URL if set. required: - direction counterparty_collect_account_response: type: object properties: id: type: string description: The id of the existing counterparty. is_resend: type: boolean description: >- This field will be `true` if an email requesting account details has already been sent to this counterparty. form_link: type: string format: uri description: >- This is the link to the secure Modern Treasury form. By default, Modern Treasury will send an email to your counterparty that includes a link to this form. However, if `send_email` is passed as `false` in the body then Modern Treasury will not send the email and you can send it to the counterparty directly. additionalProperties: false minProperties: 3 required: - id - is_resend - form_link counterparty_create_request: type: object properties: name: type: string description: A human friendly name for this counterparty. nullable: true accounts: type: array items: type: object properties: account_type: $ref: '#/components/schemas/external_account_type' party_type: type: string enum: - business - individual nullable: true description: Either `individual` or `business`. party_address: $ref: '#/components/schemas/address_request' description: Required if receiving wire payments. name: type: string nullable: true 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 nullable: true 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: The accounts for this counterparty. email: type: string format: email description: The counterparty's email. nullable: true legal_entity_id: type: string format: uuid description: The id of the legal entity. nullable: true 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. external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. send_remittance_advice: type: boolean description: Send an email to the counterparty whenever an associated payment order is sent to the bank. verification_status: type: string deprecated: true description: The verification status of the counterparty. accounting: type: object deprecated: true properties: type: type: string enum: - customer - vendor description: An optional type to auto-sync the counterparty to your ledger. Either `customer` or `vendor`. ledger_type: type: string enum: - customer - vendor description: An optional type to auto-sync the counterparty to your ledger. Either `customer` or `vendor`. deprecated: true taxpayer_identifier: type: string description: Either a valid SSN or EIN. legal_entity: $ref: '#/components/schemas/legal_entity_create_request' required: - name counterparty_update_request: type: object properties: name: type: string description: A new name for the counterparty. Will only update if passed. email: type: string format: email description: A new email for the counterparty. metadata: type: object additionalProperties: type: string description: >- Additional data in the form of key-value pairs. Pairs can be removed by passing an empty string or `null` as the value. send_remittance_advice: type: boolean description: >- If this is `true`, Modern Treasury will send an email to the counterparty whenever an associated payment order is sent to the bank. legal_entity_id: type: string format: uuid description: The id of the legal entity. nullable: true taxpayer_identifier: type: string description: Either a valid SSN or EIN. external_id: type: string description: An optional user-defined 180 character unique identifier. nullable: true currency: type: string enum: - AED - AFN - ALL - AMD - ANG - AOA - ARS - AUD - AWG - AZN - BAM - BBD - BCH - BDT - BGN - BHD - BIF - BMD - BND - BOB - BRL - BSD - BTC - BTN - BWP - BYN - BYR - BZD - CAD - CDF - CHF - CLF - CLP - CNH - CNY - COP - CRC - CUC - CUP - CVE - CZK - DJF - DKK - DOP - DZD - EEK - EGP - ERN - ETB - ETH - EUR - EURC - FJD - FKP - GBP - GBX - GEL - GGP - GHS - GIP - GMD - GNF - GTQ - GYD - HKD - HNL - HRK - HTG - HUF - IDR - ILS - IMP - INR - IQD - IRR - ISK - JEP - JMD - JOD - JPY - KES - KGS - KHR - KMF - KPW - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LTL - LVL - LYD - MAD - MDL - MGA - MKD - MMK - MNT - MOP - MRO - MRU - MTL - MUR - MVR - MWK - MXN - MYR - MZN - NAD - NGN - NIO - NOK - NPR - NZD - OMR - OP - PAB - PEN - PGK - PHP - PKR - PLN - PYG - PYUSD - QAR - RON - RSD - RUB - RWF - SAR - SBD - SCR - SDG - SEK - SGD - SHP - SKK - SLE - SLL - SOS - SRD - SSP - STD - STN - SVC - SYP - SZL - THB - TJS - TMM - TMT - TND - TOP - TRY - TTD - TWD - TZS - UAH - UGX - USD - USDB - USDC - USDG - USDP - USDT - UYU - UZS - VEF - VES - VND - VUV - WST - XAF - XAG - XAU - XBA - XBB - XBC - XBD - XCD - XCG - XDR - XFU - XOF - XPD - XPF - XPT - XTS - YER - ZAR - ZMK - ZMW - ZWD - ZWG - ZWL - ZWN - ZWR description: Three-letter ISO currency code. document: 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 discarded_at: type: string format: date-time nullable: true document_type: type: string description: A category given to the document, can be `null`. nullable: true source: type: string description: The source of the document. Can be `vendor`, `customer`, or `modern_treasury`. documentable_id: type: string format: uuid description: The unique identifier for the associated object. nullable: true documentable_type: type: string enum: - connection - counterparty - expected_payment - external_account - identification - incoming_payment_detail - internal_account - legal_entity - organization - payment_order - transaction description: >- The type of the associated object. Currently can be one of `payment_order`, `transaction`, `expected_payment`, `counterparty`, `organization`, `case`, `internal_account`, `decision`, or `external_account`. nullable: true document_details: type: array items: $ref: '#/components/schemas/document_detail' file: type: object properties: size: type: integer description: The size of the document in bytes. filename: type: string description: The original filename of the document. content_type: type: string description: The MIME content type of the document. additionalProperties: false minProperties: 3 additionalProperties: false minProperties: 12 required: - id - object - live_mode - created_at - updated_at - discarded_at - document_type - source - documentable_id - documentable_type - document_details - file document_create_request: type: object properties: documentable_id: type: string description: The unique identifier for the associated object. documentable_type: type: string enum: - connections - counterparties - expected_payments - external_accounts - identifications - incoming_payment_details - internal_accounts - legal_entities - organizations - payment_orders - transactions document_type: type: string description: A category given to the document, can be `null`. file: type: string format: binary required: - file legacy_document_create_request: type: object properties: document_type: type: string description: A category given to the document, can be `null`. file: type: string format: binary required: - file document_detail: 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 discarded_at: type: string format: date-time nullable: true document_identifier_type: type: string document_identifier: type: string additionalProperties: false minProperties: 8 required: - id - object - live_mode - created_at - updated_at - discarded_at - document_identifier_type - document_identifier error_message: type: object properties: errors: type: object properties: code: type: string enum: - parameter_invalid - parameter_missing - resource_not_found - not_found - forbidden - invalid_ip - invalid_key - header_invalid - expired_key - conflict - too_many_requests message: type: string parameter: type: string required: - errors event: 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 resource: type: string description: The type of resource for the event. event_name: type: string description: The name of the event. event_time: type: string format: date-time description: The time of the event. data: type: object description: The body of the event. additionalProperties: true entity_id: type: string format: uuid description: The ID of the entity for the event. additionalProperties: false minProperties: 10 required: - id - object - live_mode - created_at - updated_at - resource - event_name - event_time - data - entity_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 nullable: true description: An optional user-defined 180 character unique identifier. amount_upper_bound: type: integer nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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' nullable: true description: Must conform to ISO 4217. Defaults to the currency of the internal account. date_upper_bound: type: string format: date nullable: true description: 'The latest date the payment may come in. Format: yyyy-mm-dd' date_lower_bound: type: string format: date nullable: true description: 'The earliest date the payment may come in. Format: yyyy-mm-dd' description: type: string nullable: true description: An optional description for internal use. statement_descriptor: type: string nullable: true 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 format: uuid description: The ID of the counterparty you expect for this payment. nullable: true remittance_information: type: string nullable: true 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 nullable: true description: The reconciliation groups you have for this payment. reconciliation_filters: type: object nullable: true description: The reconciliation filters you have for this payment. reconciliation_rule_variables: type: array nullable: true items: $ref: '#/components/schemas/reconciliation_rule_variable' description: An array of reconciliation rule variables for this payment. amount_reconciled: type: integer nullable: true 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 nullable: true enum: - credit - debit description: One of credit or debit. Indicates whether amount_reconciled is a credit or debit amount. amount_unreconciled: type: integer nullable: true 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 nullable: true enum: - credit - debit description: One of credit or debit. Indicates whether amount_unreconciled is a credit or debit amount. transaction_id: type: string format: uuid nullable: true description: The ID of the Transaction this expected payment object has been matched to. transaction_line_item_id: type: string format: uuid nullable: true 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 enum: - automatic - manual nullable: true 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 format: uuid nullable: true 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 expected_payment_create_request: type: object properties: external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. amount_upper_bound: type: integer nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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' nullable: true description: Must conform to ISO 4217. Defaults to the currency of the internal account. date_upper_bound: type: string format: date nullable: true description: 'The latest date the payment may come in. Format: yyyy-mm-dd' date_lower_bound: type: string format: date nullable: true description: 'The earliest date the payment may come in. Format: yyyy-mm-dd' description: type: string nullable: true description: An optional description for internal use. statement_descriptor: type: string nullable: true 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 format: uuid description: The ID of the counterparty you expect for this payment. nullable: true remittance_information: type: string nullable: true 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 nullable: true description: The reconciliation groups you have for this payment. reconciliation_filters: type: object nullable: true description: The reconciliation filters you have for this payment. reconciliation_rule_variables: type: array nullable: true items: $ref: '#/components/schemas/reconciliation_rule_variable' description: An array of reconciliation rule variables for this payment. amount_reconciled: type: integer nullable: true 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 nullable: true enum: - credit - debit description: One of credit or debit. Indicates whether amount_reconciled is a credit or debit amount. amount_unreconciled: type: integer nullable: true 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 nullable: true enum: - credit - debit description: One of credit or debit. Indicates whether amount_unreconciled is a credit or debit amount. line_items: type: array items: $ref: '#/components/schemas/line_item_request' ledger_transaction: $ref: '#/components/schemas/ledger_transaction_create_request' description: >- Specifies a ledger transaction object that will be created with the expected payment. If the ledger transaction cannot be created, then the expected payment creation will fail. The resulting ledger transaction will mirror the status of the expected payment. 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 expected payment creation. Once the expected payment is created, the status of the ledger transaction tracks the expected payment automatically. expected_payment_update_request: type: object properties: external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. amount_upper_bound: type: integer nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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' nullable: true description: Must conform to ISO 4217. Defaults to the currency of the internal account. date_upper_bound: type: string format: date nullable: true description: 'The latest date the payment may come in. Format: yyyy-mm-dd' date_lower_bound: type: string format: date nullable: true description: 'The earliest date the payment may come in. Format: yyyy-mm-dd' description: type: string nullable: true description: An optional description for internal use. statement_descriptor: type: string nullable: true 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 format: uuid description: The ID of the counterparty you expect for this payment. nullable: true remittance_information: type: string nullable: true 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 nullable: true description: The reconciliation groups you have for this payment. reconciliation_filters: type: object nullable: true description: The reconciliation filters you have for this payment. reconciliation_rule_variables: type: array nullable: true items: $ref: '#/components/schemas/reconciliation_rule_variable' description: An array of reconciliation rule variables for this payment. amount_reconciled: type: integer nullable: true 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 nullable: true enum: - credit - debit description: One of credit or debit. Indicates whether amount_reconciled is a credit or debit amount. amount_unreconciled: type: integer nullable: true 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 nullable: true enum: - credit - debit description: One of credit or debit. Indicates whether amount_unreconciled is a credit or debit amount. status: type: string nullable: true enum: - reconciled description: The Expected Payment's status can be updated from partially_reconciled to reconciled. external_account: 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 discarded_at: type: string format: date-time nullable: true account_type: $ref: '#/components/schemas/external_account_type' party_type: type: string enum: - business - individual nullable: true description: Either `individual` or `business`. party_address: $ref: '#/components/schemas/address' description: The address associated with the owner or `null`. name: type: string nullable: true description: A nickname for the external account. This is only for internal usage and won't affect any payments counterparty_id: type: string format: uuid nullable: true account_details: type: array items: $ref: '#/components/schemas/account_detail' routing_details: type: array items: $ref: '#/components/schemas/routing_detail' external_id: type: string nullable: true 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: The legal name of the entity which owns the account. contact_details: type: array items: $ref: '#/components/schemas/contact_detail' ledger_account_id: type: string format: uuid nullable: true description: >- If the external account links to a ledger account in Modern Treasury, the id of the ledger account will be populated here. verification_status: type: string enum: - pending_verification - unverified - verified verification_source: type: string enum: - ach_prenote - microdeposits - plaid nullable: true additionalProperties: false minProperties: 20 required: - id - object - live_mode - created_at - updated_at - discarded_at - account_type - party_type - party_address - name - counterparty_id - account_details - routing_details - external_id - metadata - party_name - contact_details - ledger_account_id - verification_status - verification_source external_account_complete_verification_request: type: object properties: amounts: type: array items: type: integer maxItems: 2 example: - 2 - 4 external_account_create_request: type: object properties: account_type: $ref: '#/components/schemas/external_account_type' party_type: type: string enum: - business - individual nullable: true description: Either `individual` or `business`. party_address: $ref: '#/components/schemas/address_request' description: Required if receiving wire payments. name: type: string nullable: true description: A nickname for the external account. This is only for internal usage and won't affect any payments counterparty_id: type: string format: uuid nullable: true 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 nullable: true 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' required: - counterparty_id external_account_update_request: type: object properties: party_type: type: string enum: - business - individual nullable: true description: Either `individual` or `business`. account_type: $ref: '#/components/schemas/external_account_type' counterparty_id: type: string format: uuid nullable: true name: type: string nullable: true description: A nickname for the external account. This is only for internal usage and won't affect any payments party_name: type: string description: If this value isn't provided, it will be inherited from the counterparty's name. party_address: $ref: '#/components/schemas/address_request' metadata: type: object additionalProperties: type: string description: >- Additional data in the form of key-value pairs. Pairs can be removed by passing an empty string or `null` as the value. external_account_verification_attempt: 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_account_id: type: string format: uuid description: The ID of the external account. originating_account_id: type: string format: uuid description: The ID of the internal account where the micro-deposits originate from. 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 description: The type of payment that can be made to this account. Can be `ach`, `eft`, or `rtp`. priority: type: string enum: - high - normal nullable: true description: The priority of the payment. Can be `normal` or `high`. status: type: string enum: - cancelled - failed - pending_verification - verified description: >- The status of the verification attempt. Can be `pending_verification`, `verified`, `failed`, or `cancelled`. additionalProperties: false minProperties: 10 required: - id - object - live_mode - created_at - updated_at - external_account_id - originating_account_id - payment_type - priority - status external_account_verify_request: type: object properties: originating_account_id: type: string format: uuid description: >- The ID of the internal account where the micro-deposits originate from. Both credit and debit capabilities must be enabled. 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 description: Can be `ach`, `eft`, or `rtp`. currency: $ref: '#/components/schemas/currency' description: Defaults to the currency of the originating account. 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 (payment_type=rtp and fallback_type=ach) priority: type: string enum: - high - normal description: >- Either `normal` or `high`. For ACH payments, `high` represents a same-day ACH transfer. This will apply to both `payment_type` and `fallback_type`. required: - originating_account_id - payment_type foreign_exchange_quote: 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 effective_at: type: string format: date-time description: The timestamp until when the quoted rate is valid. expires_at: type: string format: date-time description: The timestamp until which the quote must be booked by. foreign_exchange_indicator: type: string description: >- Either `fixed_to_variable` if the `base_amount` was specified, or `variable_to_fixed` if the `target_amount` was specified when requesting the quote. foreign_exchange_rate: $ref: '#/components/schemas/foreign_exchange_rate' description: The serialized rate information represented by this quote. internal_account_id: type: string format: uuid description: The ID for the `InternalAccount` this quote is associated with. 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. vendor_id: type: string description: This vendor assigned ID for this quote. additionalProperties: false required: - id - object - live_mode - created_at - updated_at - effective_at - expires_at - foreign_exchange_indicator - foreign_exchange_rate - internal_account_id - metadata 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 foreign_exchange_quote_create_request: type: object properties: effective_at: type: string format: date-time description: The timestamp until when the quoted rate is valid. 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. internal_account_id: type: string format: uuid description: The ID for the `InternalAccount` this quote is associated with. 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. additionalProperties: false required: - internal_account_id - target_currency identification: 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 discarded_at: type: string format: date-time nullable: true id_type: type: string enum: - ar_cuil - ar_cuit - br_cnpj - br_cpf - ca_sin - cl_run - cl_rut - co_cedulas - co_nit - drivers_license - hn_id - hn_rtn - ie_pps - in_lei - kr_brn - kr_crn - kr_rrn - passport - sa_tin - sa_vat - us_ein - us_itin - us_ssn - vn_tin description: The type of ID number. expiration_date: type: string format: date nullable: true description: The date when the Identification is no longer considered valid by the issuing authority. issuing_country: type: string nullable: true description: The ISO 3166-1 alpha-2 country code of the country that issued the identification issuing_region: type: string nullable: true description: The region in which the identifcation was issued. documents: type: array items: $ref: '#/components/schemas/document' additionalProperties: false minProperties: 11 required: - id - object - live_mode - created_at - updated_at - discarded_at - id_type - expiration_date - issuing_country - issuing_region - documents identification_create_request: type: object properties: id_number: type: string description: The ID number of identification document. documents: type: array description: A list of documents to attach to the identification. items: type: object properties: document_type: type: string enum: - articles_of_incorporation - certificate_of_good_standing - ein_letter - generic - identification_back - identification_front - proof_of_address description: A category given to the document, can be `null`. file_data: type: string description: Base64-encoded file content for the document. filename: type: string description: The original filename of the document. required: - document_type - file_data id_type: type: string enum: - ar_cuil - ar_cuit - br_cnpj - br_cpf - ca_sin - cl_run - cl_rut - co_cedulas - co_nit - drivers_license - hn_id - hn_rtn - ie_pps - in_lei - kr_brn - kr_crn - kr_rrn - passport - sa_tin - sa_vat - us_ein - us_itin - us_ssn - vn_tin description: The type of ID number. expiration_date: type: string format: date nullable: true description: The date when the Identification is no longer considered valid by the issuing authority. issuing_country: type: string nullable: true description: The ISO 3166-1 alpha-2 country code of the country that issued the identification issuing_region: type: string nullable: true description: The region in which the identifcation was issued. required: - id_number - id_type incoming_payment_detail_update_request: type: object properties: metadata: type: object additionalProperties: type: string description: >- Additional data in the form of key-value pairs. Pairs can be removed by passing an empty string or `null` as the value. incoming_payment_detail: 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 internal_account_id: type: string format: uuid description: The ID of the Internal Account for the incoming payment detail. This is always present. virtual_account_id: type: string format: uuid nullable: true description: If the incoming payment detail is in a virtual account, the ID of the Virtual Account. virtual_account: $ref: '#/components/schemas/virtual_account' nullable: true description: If the incoming payment detail is in a virtual account, the serialized virtual account object. transaction_line_item_id: type: string format: uuid nullable: true description: The ID of the reconciled Transaction Line Item or `null`. transaction_id: type: string format: uuid nullable: true description: The ID of the reconciled Transaction or `null`. ledger_transaction_id: type: string format: uuid nullable: true description: The ID of the ledger transaction linked to the incoming payment detail or `null`. type: type: string enum: - ach - au_becs - bacs - book - check - eft - interac - neft - nz_becs - rtp - sepa - signet - stablecoin - wire - zengin description: 'One of: `ach`, `book`, `check`, `eft`, `interac`, `rtp`, `sepa`, `signet`, or `wire`.' data: type: object description: The raw data from the payment pre-notification file that we get from the bank. additionalProperties: true amount: type: integer description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. currency: $ref: '#/components/schemas/currency' description: The currency of the incoming payment detail. direction: type: string enum: - credit - debit description: One of `credit` or `debit`. _x-stainless-modelDefPath: $shared.transaction_direction status: type: string enum: - completed - pending - returned description: The current status of the incoming payment order. One of `pending`, `completed`, or `returned`. 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 as_of_date: type: string format: date description: The date on which the corresponding transaction will occur. vendor_id: type: string format: uuid nullable: true description: The identifier of the vendor bank. originating_routing_number: type: string description: The routing number of the originating account for the incoming payment detail. nullable: true originating_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 - mx_bank_identifier - my_branch_code - nz_national_clearing_code - pl_national_clearing_code - se_bankgiro_clearing_code - sg_interbank_clearing_code - swift - za_national_clearing_code description: The type of the originating routing number for the incoming payment detail. nullable: true originating_account_number: type: string description: The account number of the originating account for the incoming payment detail. nullable: true originating_account_number_safe: type: string description: The last 4 digits of the originating account_number for the incoming payment detail. nullable: true originating_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 description: The type of the originating account number for the incoming payment detail. nullable: true originating_party_name: type: string description: The name of the originating party for the incoming payment detail. nullable: true originating_party_address: $ref: '#/components/schemas/address' nullable: true description: The address of the originating party for the incoming payment detail, or `null`. originating_party_vendor_identifier: type: string description: >- The vendor-assigned identifier for the originating party of the incoming payment detail, or `null`. nullable: true receiving_account_number: type: string description: The account number of the receiving account for the incoming payment detail, or `null`. nullable: true receiving_account_number_safe: type: string description: The last 4 digits of the receiving account number for the incoming payment detail, or `null`. nullable: true subtype: type: string nullable: true description: >- An additional layer of classification for the type of incoming payment detail. For example, a `type` of `stablecoin` may have a `subtype` of `ethereum` or `solana`. reconciliation_status: type: string enum: - unreconciled - tentatively_reconciled - reconciled description: One of `unreconciled`, `tentatively_reconciled` or `reconciled`. additionalProperties: false minProperties: 26 required: - id - object - live_mode - created_at - updated_at - internal_account_id - virtual_account_id - virtual_account - transaction_line_item_id - transaction_id - ledger_transaction_id - type - data - amount - currency - direction - status - metadata - as_of_date - vendor_id - originating_routing_number - originating_routing_number_type - originating_account_number_safe - originating_account_number_type - subtype - reconciliation_status internal_account: 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 account_type: type: string enum: - base_wallet - cash - checking - crypto_wallet - ethereum_wallet - general_ledger - loan - non_resident - other - overdraft - polygon_wallet - savings - solana_wallet nullable: true description: Can be checking, savings or other. party_name: type: string description: The legal name of the entity which owns the account. party_type: type: string enum: - business - individual nullable: true description: Either individual or business. party_address: $ref: '#/components/schemas/address' description: The address associated with the owner or null. name: type: string nullable: true description: A nickname for the account. account_details: type: array items: $ref: '#/components/schemas/account_detail' description: An array of account detail objects. account_capabilities: type: array description: >- An array of AccountCapability objects that list the originating abilities of the internal account and any relevant information for them. items: $ref: '#/components/schemas/account_capability' routing_details: type: array items: $ref: '#/components/schemas/routing_detail' description: An array of routing detail objects. connection: $ref: '#/components/schemas/connection' description: Specifies which financial institution the accounts belong to. currency: $ref: '#/components/schemas/currency' description: The currency of the account. 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. parent_account_id: type: string format: uuid nullable: true description: The parent InternalAccount of this account. counterparty_id: type: string format: uuid nullable: true description: The Counterparty associated to this account. vendor_id: type: string format: string nullable: true description: The vendor ID associated with this account. legal_entity_id: type: string format: uuid nullable: true description: The Legal Entity associated to this account. status: type: string format: string nullable: true enum: - active - closed - pending_activation - pending_closure - suspended description: The internal account status. ledger_account_id: type: string format: uuid nullable: true description: >- If the internal account links to a ledger account in Modern Treasury, the id of the ledger account will be populated here. contra_ledger_account_id: type: string format: uuid nullable: true description: >- If the internal account links to a contra ledger account in Modern Treasury, the id of the contra ledger account will be populated here. external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. additionalProperties: false minProperties: 24 required: - id - object - live_mode - created_at - updated_at - account_type - party_name - party_type - party_address - name - account_details - account_capabilities - routing_details - connection - currency - metadata - parent_account_id - counterparty_id - vendor_id - legal_entity_id - status - ledger_account_id - contra_ledger_account_id - external_id internal_account_create_request: type: object properties: connection_id: type: string description: The identifier of the financial institution the account belongs to. name: type: string description: The nickname of the account. party_name: type: string description: The legal name of the entity which owns the account. party_address: type: object description: The address associated with the owner or null. 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: type: string enum: - USD - CAD - USDC - USDG - PYUSD example: USD description: >- The currency of the internal account. Supports "USD" and "CAD" for fiat, and "USDC", "USDG", and "PYUSD" for stablecoin accounts. account_type: type: string enum: - base_wallet - cash - checking - crypto_wallet - ethereum_wallet - general_ledger - loan - non_resident - other - overdraft - polygon_wallet - savings - solana_wallet example: checking description: The account type, used to provision the appropriate account at the financial institution. account_capabilities: type: array description: >- An array of AccountCapability objects that list the originating abilities of the internal account and any relevant information for them. items: $ref: '#/components/schemas/account_capability' vendor_attributes: type: object additionalProperties: type: string example: key: value foo: bar modern: treasury description: >- A hash of vendor specific attributes that will be used when creating the account at the vendor specified by the given connection. parent_account_id: type: string description: The parent internal account of this new account. counterparty_id: type: string description: The Counterparty associated to this account. legal_entity_id: type: string description: The LegalEntity associated to this account. metadata: type: object additionalProperties: type: string description: Additional data represented as key-value pairs. Both the key and value must be strings. external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. required: - connection_id - name - party_name - currency internal_account_update_request: type: object properties: name: type: string description: The nickname for the internal account. metadata: type: object additionalProperties: type: string description: >- Additional data in the form of key-value pairs. Pairs can be removed by passing an empty string or `null` as the value. parent_account_id: type: string description: The parent internal account for this account. counterparty_id: type: string description: The Counterparty associated to this account. ledger_account_id: type: string description: The Ledger Account associated to this account. contra_ledger_account_id: type: string description: The Contra Ledger Account associated to this account. external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. invoice: 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 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: An optional 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 nullable: true description: The name of the issuer for the invoice. Defaults to the name of the Organization. invoicer_address: type: object nullable: true 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 nullable: true format: uuid description: The receiving account ID. Can be an `internal_account`. virtual_account_id: type: string format: uuid nullable: true description: The ID of the virtual account the invoice should be paid to. payment_effective_date: type: string nullable: true 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: type: string nullable: true enum: - eft - ach description: One of `ach` or `eft`. payment_method: type: string nullable: true enum: - ui - manual - automatic description: >- When opening an invoice, whether to show the embedded payment UI , automatically debit the recipient, or rely on manual payment from the recipient. fallback_payment_method: type: string nullable: true 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 nullable: true 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 items: type: integer nullable: true description: Number of days after due date when overdue reminder emails will be sent out to invoice recipients. 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 nullable: true hosted_url: type: string description: The URL of the hosted web UI where the invoice can be viewed. number: type: string description: A unique record number assigned to each invoice that is issued. payment_orders: type: array items: $ref: '#/components/schemas/payment_order' description: The payment orders created for paying the invoice through the invoice payment UI. expected_payments: type: array items: $ref: '#/components/schemas/expected_payment' description: The expected payments created for an unpaid invoice. pdf_url: type: string nullable: true description: The URL where the invoice PDF can be downloaded. status: type: string enum: - draft - paid - partially_paid - payment_pending - unpaid - voided description: The status of the invoice. total_amount: type: integer description: >- Total amount due in specified currency's smallest unit, e.g., $10 USD would be represented as 1000. amount_remaining: type: integer description: >- Amount remaining due on the invoice in specified currency's smallest unit, e.g., $10 USD would be represented as 1000. amount_paid: type: integer description: >- Amount paid on the invoice in specified currency's smallest unit, e.g., $10 USD would be represented as 1000. transaction_line_item_ids: type: array items: type: string format: uuid description: IDs of transaction line items associated with an invoice. ledger_account_settlement_id: type: string nullable: true format: uuid deprecated: true description: The ledger account settlement object linked to the invoice. issued_at: type: string nullable: true format: date-time description: 'Translation missing: en.openapi.descriptions.invoice.schema.issued_at' paid_at: type: string nullable: true format: date-time description: 'Translation missing: en.openapi.descriptions.invoice.schema.paid_at' voided_at: type: string nullable: true format: date-time description: 'Translation missing: en.openapi.descriptions.invoice.schema.voided_at' additionalProperties: false minProperties: 41 required: - id - object - live_mode - created_at - updated_at - contact_details - recipient_email - recipient_name - counterparty_id - counterparty_billing_address - counterparty_shipping_address - currency - description - due_date - invoicer_name - invoicer_address - originating_account_id - receiving_account_id - virtual_account_id - payment_effective_date - payment_type - payment_method - fallback_payment_method - notifications_enabled - notification_email_addresses - remind_after_overdue_days - metadata - hosted_url - number - payment_orders - expected_payments - pdf_url - status - total_amount - amount_remaining - amount_paid - transaction_line_item_ids - ledger_account_settlement_id - issued_at - paid_at - voided_at 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true description: The name of the issuer for the invoice. Defaults to the name of the Organization. invoicer_address: type: object nullable: true 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 format: uuid nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 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 nullable: true required: - counterparty_id - due_date - originating_account_id invoice_update_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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true description: The name of the issuer for the invoice. Defaults to the name of the Organization. invoicer_address: type: object nullable: true 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 format: uuid nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. 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 nullable: true status: type: string description: >- Invoice status must be updated in a `PATCH` request that does not modify any other invoice attributes. Valid state transitions are `draft` to `unpaid`, `draft` or `unpaid` to `voided`, and `draft` or `unpaid` to `paid`. invoice_line_item: 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 name: type: string description: The name of the line item, typically a product or SKU name. description: type: string description: An optional free-form description of the line item. quantity: type: integer description: >- The number of units of a product or service that this line item is for. Must be a whole number. Defaults to 1 if not provided. unit_amount: type: integer description: >- The cost per unit of the product or service that this line item is for, specified in the invoice currency's smallest unit. unit_amount_decimal: type: string description: >- The cost per unit of the product or service that this line item is for, specified in the invoice currency's smallest unit. Accepts decimal strings with up to 12 decimals direction: type: string description: >- Either `debit` or `credit`. `debit` indicates that a client owes the business money and increases the invoice's `total_amount` due. `credit` has the opposite intention and effect. 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. amount: type: integer description: The total amount for this line item specified in the invoice currency's smallest unit. invoice_id: type: string description: The ID of the invoice for this line item. additionalProperties: false minProperties: 14 required: - id - object - live_mode - created_at - updated_at - name - description - quantity - unit_amount - unit_amount_decimal - direction - metadata - amount - invoice_id invoice_line_item_create_request: type: object properties: name: type: string description: The name of the line item, typically a product or SKU name. description: type: string description: An optional free-form description of the line item. quantity: type: integer description: >- The number of units of a product or service that this line item is for. Must be a whole number. Defaults to 1 if not provided. unit_amount: type: integer description: >- The cost per unit of the product or service that this line item is for, specified in the invoice currency's smallest unit. unit_amount_decimal: type: string description: >- The cost per unit of the product or service that this line item is for, specified in the invoice currency's smallest unit. Accepts decimal strings with up to 12 decimals direction: type: string description: >- Either `debit` or `credit`. `debit` indicates that a client owes the business money and increases the invoice's `total_amount` due. `credit` has the opposite intention and effect. 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. required: - name - unit_amount invoice_line_item_update_request: type: object properties: name: type: string description: The name of the line item, typically a product or SKU name. description: type: string description: An optional free-form description of the line item. quantity: type: integer description: >- The number of units of a product or service that this line item is for. Must be a whole number. Defaults to 1 if not provided. unit_amount: type: integer description: >- The cost per unit of the product or service that this line item is for, specified in the invoice currency's smallest unit. unit_amount_decimal: type: string description: >- The cost per unit of the product or service that this line item is for, specified in the invoice currency's smallest unit. Accepts decimal strings with up to 12 decimals direction: type: string description: >- Either `debit` or `credit`. `debit` indicates that a client owes the business money and increases the invoice's `total_amount` due. `credit` has the opposite intention and effect. 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. ledger: 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 discarded_at: type: string format: date-time nullable: true name: type: string description: The name of the ledger. description: type: string description: An optional free-form description for internal use. nullable: true 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 additionalProperties: true minProperties: 9 maxProperties: 11 required: - id - object - live_mode - created_at - updated_at - discarded_at - name - description - metadata ledger_create_request: type: object properties: name: type: string description: The name of the ledger. description: type: string description: An optional free-form description for internal use. nullable: true 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: - name ledger_update_request: type: object properties: name: type: string description: The name of the ledger. description: type: string description: An optional free-form description for internal use. nullable: true 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 ledger_account: 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 discarded_at: type: string format: date-time nullable: true name: type: string description: The name of the ledger account. description: type: string description: The description of the ledger account. nullable: true normal_balance: type: string enum: - credit - debit description: The normal balance of the ledger account. _x-stainless-modelDefPath: $shared.transaction_direction balances: $ref: '#/components/schemas/ledger_balances_with_effective_at' description: >- The pending, posted, and available balances for this ledger account. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts. lock_version: type: integer description: Lock version of the ledger account. ledger_id: type: string format: uuid description: The id of the ledger that this account belongs to. ledgerable_id: type: string format: uuid nullable: true description: >- If the ledger account links to another object in Modern Treasury, the id will be populated here, otherwise null. external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. ledgerable_type: type: string enum: - counterparty - external_account - internal_account - virtual_account nullable: true description: >- If the ledger account links to another object in Modern Treasury, the type will be populated here, otherwise null. The value is one of internal_account or external_account. 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 additionalProperties: false minProperties: 16 required: - id - object - live_mode - created_at - updated_at - discarded_at - name - description - normal_balance - balances - lock_version - ledger_id - ledgerable_id - external_id - ledgerable_type - metadata ledger_account_create_request: type: object properties: name: type: string description: The name of the ledger account. description: type: string description: The description of the ledger account. nullable: true normal_balance: type: string enum: - credit - debit description: The normal balance of the ledger account. _x-stainless-modelDefPath: $shared.transaction_direction ledger_id: type: string format: uuid description: The id of the ledger that this account belongs to. currency: type: string description: The currency of the ledger account. currency_exponent: type: integer description: The currency exponent of the ledger account. nullable: true ledger_account_category_ids: type: array items: type: string format: uuid description: The array of ledger account category ids that this ledger account should be a child of. ledgerable_id: type: string format: uuid description: >- If the ledger account links to another object in Modern Treasury, the id will be populated here, otherwise null. ledgerable_type: type: string enum: - counterparty - external_account - internal_account - virtual_account description: >- If the ledger account links to another object in Modern Treasury, the type will be populated here, otherwise null. The value is one of internal_account or external_account. 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 external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. required: - name - normal_balance - ledger_id - currency ledger_account_update_request: type: object properties: name: type: string description: The name of the ledger account. description: type: string description: The description of the ledger account. nullable: true 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 external_id: type: string description: An optional user-defined 180 character unique identifier. nullable: true ledger_account_balance_monitor: 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 discarded_at: type: string format: date-time nullable: true ledger_account_id: type: string description: The ledger account associated with this balance monitor. description: type: string description: An optional, free-form description for internal use. nullable: true alert_condition: $ref: '#/components/schemas/alert_condition' description: Describes the condition that must be satisfied for the monitor to be triggered. current_ledger_account_balance_state: $ref: '#/components/schemas/current_ledger_account_balance_state' description: The ledger account's balances and the monitor state as of the current ledger account lock version. 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 additionalProperties: false minProperties: 11 required: - id - object - live_mode - created_at - updated_at - discarded_at - ledger_account_id - description - alert_condition - current_ledger_account_balance_state - metadata ledger_account_balance_monitor_create_request: type: object properties: ledger_account_id: type: string description: The ledger account associated with this balance monitor. description: type: string description: An optional, free-form description for internal use. alert_condition: $ref: '#/components/schemas/alert_condition_create_request' description: Describes the condition that must be satisfied for the monitor to be triggered. 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: - ledger_account_id - alert_condition ledger_account_balance_monitor_update_request: type: object properties: description: type: string description: An optional, free-form description for internal use. 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 alert_condition: type: object properties: field: type: string description: >- One of `available_balance_amount`, `pending_balance_amount`, `posted_balance_amount`, `ledger_account_lock_version`. operator: type: string description: >- A logical operator to compare the `field` against the `value`. One of `less_than`, `less_than_or_equals`, `equals`, `greater_than_or_equals`, `greater_than`. value: type: integer description: >- The monitor's `current_ledger_account_balance_state.triggered` will be `true` when comparing the `field` to this integer value using the `operator` is logically true. additionalProperties: false minProperties: 3 required: - field - operator - value alert_condition_create_request: type: object properties: field: type: string description: >- One of `available_balance_amount`, `pending_balance_amount`, `posted_balance_amount`, `ledger_account_lock_version`. operator: type: string description: >- A logical operator to compare the `field` against the `value`. One of `less_than`, `less_than_or_equals`, `equals`, `greater_than_or_equals`, `greater_than`. value: type: integer description: >- The monitor's `current_ledger_account_balance_state.triggered` will be `true` when comparing the `field` to this integer value using the `operator` is logically true. required: - field - operator - value current_ledger_account_balance_state: type: object properties: balances: $ref: '#/components/schemas/ledger_balances' ledger_account_lock_version: type: integer description: The current lock version of the ledger account. triggered: type: boolean description: If `true`, the ledger account's balances satisfy the `alert_condition` at this lock version. additionalProperties: false minProperties: 3 required: - balances - ledger_account_lock_version - triggered ledger_account_category: 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 discarded_at: type: string format: date-time nullable: true name: type: string description: The name of the ledger account category. description: type: string description: The description of the ledger account category. nullable: true 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 ledger_id: type: string format: uuid description: The id of the ledger that this account category belongs to. normal_balance: type: string enum: - credit - debit description: The normal balance of the ledger account category. _x-stainless-modelDefPath: $shared.transaction_direction external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. balances: $ref: '#/components/schemas/ledger_balances' description: >- The pending, posted, and available balances for this ledger account category. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts. additionalProperties: false minProperties: 13 required: - id - object - live_mode - created_at - updated_at - discarded_at - name - description - metadata - ledger_id - normal_balance - external_id - balances ledger_account_category_create_request: type: object properties: name: type: string description: The name of the ledger account category. description: type: string description: The description of the ledger account category. nullable: true 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 currency: type: string description: The currency of the ledger account category. currency_exponent: type: integer description: The currency exponent of the ledger account category. nullable: true ledger_id: type: string format: uuid description: The id of the ledger that this account category belongs to. normal_balance: type: string enum: - credit - debit description: The normal balance of the ledger account category. _x-stainless-modelDefPath: $shared.transaction_direction ledger_account_category_ids: type: array items: type: string format: uuid description: The array of ledger account category ids that this ledger account category should be a child of. external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. required: - name - normal_balance - currency - ledger_id ledger_account_category_update_request: type: object properties: name: type: string description: The name of the ledger account category. description: type: string description: The description of the ledger account category. nullable: true 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 external_id: type: string description: An optional user-defined 180 character unique identifier. nullable: true ledger_account_settlement: 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 ledger_id: type: string format: uuid description: The id of the ledger that this ledger account settlement belongs to. description: type: string description: The description of the ledger account settlement. nullable: true status: type: string enum: - archived - archiving - drafting - pending - posted - processing description: >- The status of the ledger account settlement. One of `processing`, `pending`, `posted`, `archiving` or `archived`. settled_ledger_account_id: type: string format: uuid description: >- The id of the settled ledger account whose ledger entries are queried against, and its balance is reduced as a result. contra_ledger_account_id: type: string format: uuid description: >- The id of the contra ledger account that sends to or receives funds from the settled ledger account. effective_at_upper_bound: type: string format: date-time description: >- The exclusive upper bound of the effective_at timestamp of the ledger entries to be included in the ledger account settlement. The default value is the created_at timestamp of the ledger account settlement. nullable: true ledger_transaction_id: type: string format: uuid description: The id of the ledger transaction that this settlement is associated with. nullable: true amount: type: integer description: The amount of the ledger account settlement. nullable: true settlement_entry_direction: type: string description: The direction of the ledger entry with the settlement_ledger_account. nullable: true currency: type: string description: The currency of the ledger account settlement. currency_exponent: type: integer description: The currency exponent of the ledger account settlement. nullable: true 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 additionalProperties: false minProperties: 17 required: - id - object - live_mode - created_at - updated_at - ledger_id - description - status - settled_ledger_account_id - contra_ledger_account_id - effective_at_upper_bound - ledger_transaction_id - amount - settlement_entry_direction - currency - currency_exponent - metadata ledger_account_settlement_create_request: type: object properties: description: type: string description: The description of the ledger account settlement. nullable: true status: type: string enum: - pending - posted - drafting description: >- The status of the ledger account settlement. It is set to `pending` by default. To post a ledger account settlement at creation, use `posted`. nullable: true settled_ledger_account_id: type: string format: uuid description: >- The id of the settled ledger account whose ledger entries are queried against, and its balance is reduced as a result. contra_ledger_account_id: type: string format: uuid description: >- The id of the contra ledger account that sends to or receives funds from the settled ledger account. allow_either_direction: type: boolean description: >- If true, the settlement amount and settlement_entry_direction will bring the settlement ledger account's balance closer to zero, even if the balance is negative. nullable: true effective_at_upper_bound: type: string format: date-time description: >- The exclusive upper bound of the effective_at timestamp of the ledger entries to be included in the ledger account settlement. The default value is the created_at timestamp of the ledger account settlement. nullable: true 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 skip_settlement_ledger_transaction: type: boolean description: It is set to `false` by default. It should be set to `true` when migrating existing settlements. nullable: true required: - settled_ledger_account_id - contra_ledger_account_id ledger_account_settlement_update_request: type: object properties: description: type: string description: The description of the ledger account settlement. nullable: true status: type: string enum: - posted - archived description: >- To post a pending ledger account settlement, use `posted`. To archive a pending ledger transaction, use `archived`. 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 skip_settlement_ledger_transaction: type: boolean description: It is set to `false` by default. It should be set to `true` when migrating existing settlements. nullable: true ledger_account_settlement_entries_patch_request: type: object properties: ledger_entry_ids: type: array items: type: string format: uuid description: The ids of the ledger entries that are to be added or removed from the ledger account settlement. nullable: true required: - ledger_entry_ids ledger_account_settlement_entries_delete_request: type: object properties: ledger_entry_ids: type: array items: type: string format: uuid description: The ids of the ledger entries that are to be added or removed from the ledger account settlement. nullable: true required: - ledger_entry_ids ledger_account_statement: 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 ledger_id: type: string format: uuid description: The id of the ledger that this ledger account statement belongs to. description: type: string description: The description of the ledger account statement. nullable: true ledger_account_id: type: string format: uuid description: >- The id of the ledger account whose ledger entries are queried against, and its balances are computed as a result. ledger_account_lock_version: type: integer description: Lock version of the ledger account at the time of statement generation. ledger_account_normal_balance: type: string enum: - credit - debit description: The normal balance of the ledger account. _x-stainless-modelDefPath: $shared.transaction_direction effective_at_lower_bound: type: string format: date-time description: >- The inclusive lower bound of the effective_at timestamp of the ledger entries to be included in the ledger account statement. effective_at_upper_bound: type: string format: date-time description: >- The exclusive upper bound of the effective_at timestamp of the ledger entries to be included in the ledger account statement. starting_balance: $ref: '#/components/schemas/ledger_balances' description: >- The pending, posted, and available balances for this ledger account at the `effective_at_lower_bound`. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts. ending_balance: $ref: '#/components/schemas/ledger_balances' description: >- The pending, posted, and available balances for this ledger account at the `effective_at_upper_bound`. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts. 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 additionalProperties: false minProperties: 15 required: - id - object - live_mode - created_at - updated_at - ledger_id - description - ledger_account_id - ledger_account_lock_version - ledger_account_normal_balance - effective_at_lower_bound - effective_at_upper_bound - starting_balance - ending_balance - metadata ledger_account_statement_create_request: type: object properties: description: type: string description: The description of the ledger account statement. nullable: true ledger_account_id: type: string format: uuid description: >- The id of the ledger account whose ledger entries are queried against, and its balances are computed as a result. effective_at_lower_bound: type: string format: date-time description: >- The inclusive lower bound of the effective_at timestamp of the ledger entries to be included in the ledger account statement. effective_at_upper_bound: type: string format: date-time description: >- The exclusive upper bound of the effective_at timestamp of the ledger entries to be included in the ledger account statement. 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: - ledger_account_id - effective_at_lower_bound - effective_at_upper_bound ledger_balance: type: object properties: credits: type: integer debits: type: integer amount: type: integer currency: type: string description: The currency of the ledger account. currency_exponent: type: integer description: The currency exponent of the ledger account. additionalProperties: false minProperties: 5 required: - credits - debits - amount - currency - currency_exponent ledger_balances: type: object properties: pending_balance: $ref: '#/components/schemas/ledger_balance' description: The pending_balance is the sum of all pending and posted entries. posted_balance: $ref: '#/components/schemas/ledger_balance' description: The posted_balance is the sum of all posted entries. available_balance: $ref: '#/components/schemas/ledger_balance' description: >- The available_balance is the sum of all posted inbound entries and pending outbound entries. For credit normal, available_amount = posted_credits - pending_debits; for debit normal, available_amount = posted_debits - pending_credits. additionalProperties: false minProperties: 3 required: - pending_balance - posted_balance - available_balance ledger_balances_with_effective_at: type: object properties: effective_at_lower_bound: type: string format: date-time description: The inclusive lower bound of the effective_at timestamp for the returned balances. nullable: true effective_at_upper_bound: type: string format: date-time description: The exclusive upper bound of the effective_at timestamp for the returned balances. nullable: true pending_balance: $ref: '#/components/schemas/ledger_balance' description: The pending_balance is the sum of all pending and posted entries. posted_balance: $ref: '#/components/schemas/ledger_balance' description: The posted_balance is the sum of all posted entries. available_balance: $ref: '#/components/schemas/ledger_balance' description: >- The available_balance is the sum of all posted inbound entries and pending outbound entries. For credit normal, available_amount = posted_credits - pending_debits; for debit normal, available_amount = posted_debits - pending_credits. additionalProperties: false minProperties: 5 required: - effective_at_lower_bound - effective_at_upper_bound - pending_balance - posted_balance - available_balance ledger_entry: 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 discarded_at: type: string format: date-time nullable: true 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 status: type: string enum: - archived - pending - posted description: >- Equal to the state of the ledger transaction when the ledger entry was created. One of `pending`, `posted`, or `archived`. ledger_account_id: type: string format: uuid description: The ledger account that this ledger entry is associated with. ledger_account_lock_version: type: integer 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. nullable: true ledger_account_currency: type: string description: The currency of the ledger account. ledger_account_currency_exponent: type: integer description: The currency exponent of the ledger account. ledger_transaction_id: type: string description: The ledger transaction that this ledger entry is associated with. resulting_ledger_account_balances: $ref: '#/components/schemas/ledger_balances' description: >- The pending, posted, and available balances for this ledger entry's ledger account. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts. Please see https://docs.moderntreasury.com/docs/transaction-status-and-balances for more details. nullable: true 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 additionalProperties: false minProperties: 17 required: - id - object - live_mode - created_at - updated_at - discarded_at - amount - effective_at - direction - status - ledger_account_id - ledger_account_lock_version - ledger_account_currency - ledger_account_currency_exponent - ledger_transaction_id - resulting_ledger_account_balances - metadata 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 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. nullable: true pending_balance_amount: type: object 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. nullable: true posted_balance_amount: type: object 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. nullable: true available_balance_amount: type: object 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. nullable: true show_resulting_ledger_account_balances: type: boolean description: If true, response will include the balance of the associated ledger account for the entry. nullable: true 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 ledger_entry_update_request: type: object properties: 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 ledger_entry_of_transaction_version: 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 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 status: type: string enum: - archived - pending - posted description: >- Equal to the state of the ledger transaction when the ledger entry was created. One of `pending`, `posted`, or `archived`. ledger_account_id: type: string format: uuid description: The ledger account that this ledger entry is associated with. ledger_account_lock_version: type: integer 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. nullable: true ledger_account_currency: type: string description: The currency of the ledger account. ledger_account_currency_exponent: type: integer description: The currency exponent of the ledger account. ledger_transaction_id: type: string description: The ledger transaction that this ledger entry is associated with. 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 resulting_ledger_account_balances: $ref: '#/components/schemas/ledger_balances' description: >- The pending, posted, and available balances for this ledger entry's ledger account. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts. Please see https://docs.moderntreasury.com/docs/transaction-status-and-balances for more details. nullable: true additionalProperties: false minProperties: 15 required: - id - object - live_mode - created_at - amount - effective_at - direction - status - ledger_account_id - ledger_account_lock_version - ledger_account_currency - ledger_account_currency_exponent - ledger_transaction_id - metadata - resulting_ledger_account_balances ledger_entry_partial_post_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. 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`. ledger_account_id: type: string format: uuid description: The ledger account that this ledger entry is associated with. 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 ledger_transaction: 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 description: type: string nullable: true description: An optional description for internal use. status: type: string enum: - archived - pending - posted description: To post a ledger transaction at creation, use `posted`. 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 effective_at: type: string format: date-time description: The timestamp (ISO8601 format) at which the ledger transaction happened for reporting purposes. effective_date: type: string format: date description: The date (YYYY-MM-DD) on which the ledger transaction happened for reporting purposes. ledger_entries: type: array items: $ref: '#/components/schemas/ledger_entry' description: An array of ledger entry objects. posted_at: type: string format: date-time nullable: true description: >- The time on which the ledger transaction posted. This is null if the ledger transaction is pending. ledger_id: type: string format: uuid description: The ID of the ledger this ledger transaction belongs to. ledgerable_type: type: string enum: - expected_payment - incoming_payment_detail - payment_order - return - reversal nullable: true description: >- If the ledger transaction can be reconciled to another object in Modern Treasury, the type will be populated here, otherwise null. This can be one of payment_order, incoming_payment_detail, expected_payment, return, or reversal. ledgerable_id: type: string format: uuid nullable: true description: >- If the ledger transaction can be reconciled to another object in Modern Treasury, the id will be populated here, otherwise null. external_id: type: string description: >- A unique string to represent the ledger transaction. Only one pending or posted ledger transaction may have this ID in the ledger. nullable: true reverses_ledger_transaction_id: type: string description: The ID of the original ledger transaction that this ledger transaction reverses. nullable: true reversed_by_ledger_transaction_id: type: string description: The ID of the ledger transaction that reversed this ledger transaction. nullable: true partially_posts_ledger_transaction_id: type: string description: The ID of the ledger transaction that this ledger transaction partially posts. nullable: true archived_reason: type: string description: >- System-set reason why the ledger transaction was archived; currently only 'balance_lock_failure' for transactions that violated balance constraints. Only populated when archive_on_balance_lock_failure is true and a balance lock violation occurs, otherwise null. nullable: true additionalProperties: false minProperties: 20 required: - id - object - live_mode - created_at - updated_at - description - status - metadata - effective_at - effective_date - ledger_entries - posted_at - ledger_id - ledgerable_type - ledgerable_id - external_id - reverses_ledger_transaction_id - reversed_by_ledger_transaction_id - partially_posts_ledger_transaction_id - archived_reason ledger_transaction_version: 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 ledger_transaction_id: type: string format: uuid description: The ID of the ledger transaction description: type: string nullable: true description: An optional description for internal use. status: type: string enum: - archived - pending - posted description: One of `pending`, `posted`, or `archived`. 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 effective_at: type: string format: date-time description: The timestamp (ISO8601 format) at which the ledger transaction happened for reporting purposes. effective_date: type: string format: date description: The date (YYYY-MM-DD) on which the ledger transaction happened for reporting purposes. ledger_entries: type: array items: $ref: '#/components/schemas/ledger_entry_of_transaction_version' description: An array of ledger entry objects. posted_at: type: string format: date-time nullable: true description: >- The time on which the ledger transaction posted. This is null if the ledger transaction is pending. ledger_id: type: string format: uuid description: The ID of the ledger this ledger transaction belongs to. ledgerable_type: type: string enum: - expected_payment - incoming_payment_detail - payment_order - return - reversal nullable: true description: >- If the ledger transaction can be reconciled to another object in Modern Treasury, the type will be populated here, otherwise null. This can be one of payment_order, incoming_payment_detail, expected_payment, return, or reversal. ledgerable_id: type: string format: uuid nullable: true description: >- If the ledger transaction can be reconciled to another object in Modern Treasury, the id will be populated here, otherwise null. external_id: type: string description: >- A unique string to represent the ledger transaction. Only one pending or posted ledger transaction may have this ID in the ledger. nullable: true version: type: integer description: Version number of the ledger transaction. reverses_ledger_transaction_id: type: string description: The ID of the original ledger transaction. that this ledger transaction reverses. nullable: true reversed_by_ledger_transaction_id: type: string description: The ID of the ledger transaction that reversed this ledger transaction. nullable: true partially_posts_ledger_transaction_id: type: string description: The ID of the ledger transaction that this ledger transaction partially posts. nullable: true archived_reason: type: string description: >- System-set reason why the ledger transaction was archived; currently only 'balance_lock_failure' for transactions that violated balance constraints. Only populated when archive_on_balance_lock_failure is true and a balance lock violation occurs, otherwise null. nullable: true additionalProperties: false minProperties: 21 required: - id - object - live_mode - created_at - ledger_transaction_id - description - status - metadata - effective_at - effective_date - ledger_entries - posted_at - ledger_id - ledgerable_type - ledgerable_id - external_id - version - reverses_ledger_transaction_id - reversed_by_ledger_transaction_id - partially_posts_ledger_transaction_id - archived_reason ledger_transaction_create_request: type: object properties: description: type: string description: An optional description for internal use. nullable: true status: type: string enum: - archived - pending - posted description: To post a ledger transaction at creation, use `posted`. 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 effective_at: type: string format: date-time description: The timestamp (ISO8601 format) at which the ledger transaction happened for reporting purposes. effective_date: type: string format: date description: The date (YYYY-MM-DD) on which the ledger transaction happened for reporting purposes. ledger_entries: type: array items: $ref: '#/components/schemas/ledger_entry_create_request' description: An array of ledger entry objects. external_id: type: string description: >- A unique string to represent the ledger transaction. Only one pending or posted ledger transaction may have this ID in the ledger. ledgerable_type: type: string enum: - expected_payment - incoming_payment_detail - payment_order - return - reversal description: >- If the ledger transaction can be reconciled to another object in Modern Treasury, the type will be populated here, otherwise null. This can be one of payment_order, incoming_payment_detail, expected_payment, return, or reversal. ledgerable_id: type: string format: uuid description: >- If the ledger transaction can be reconciled to another object in Modern Treasury, the id will be populated here, otherwise null. required: - ledger_entries ledger_transaction_update_request: type: object properties: description: type: string description: An optional description for internal use. nullable: true status: type: string enum: - archived - pending - posted description: To post a ledger transaction at creation, use `posted`. 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 effective_at: type: string format: date-time description: The timestamp (ISO8601 format) at which the ledger transaction happened for reporting purposes. ledger_entries: type: array items: $ref: '#/components/schemas/ledger_entry_create_request' description: An array of ledger entry objects. ledgerable_type: type: string enum: - expected_payment - incoming_payment_detail - payment_order - return - reversal description: >- If the ledger transaction can be reconciled to another object in Modern Treasury, the type will be populated here, otherwise null. This can be one of payment_order, incoming_payment_detail, expected_payment, return, or reversal. ledgerable_id: type: string format: uuid description: >- If the ledger transaction can be reconciled to another object in Modern Treasury, the id will be populated here, otherwise null. external_id: type: string description: >- A unique string to represent the ledger transaction. Only one pending or posted ledger transaction may have this ID in the ledger. nullable: true ledger_transaction_reversal_create_request: type: object properties: description: type: string description: >- An optional free-form description for the reversal ledger transaction. Maximum of 1000 characters allowed. status: type: string enum: - archived - pending - posted description: Status of the reversal ledger transaction. It defaults to `posted` if not provided. metadata: type: object description: >- Additional data to be added to the reversal ledger transaction as key-value pairs. Both the key and value must be strings. additionalProperties: type: string example: key: value foo: bar modern: treasury effective_at: type: string format: date-time description: >- The timestamp (ISO8601 format) at which the reversal ledger transaction happened for reporting purposes. It defaults to the `effective_at` of the original ledger transaction if not provided. nullable: true external_id: type: string description: Must be unique within the ledger. ledgerable_type: type: string enum: - expected_payment - incoming_payment_detail - payment_order - return - reversal description: >- Specify this if you'd like to link the reversal ledger transaction to a Payment object like Return or Reversal. ledgerable_id: type: string format: uuid description: >- Specify this if you'd like to link the reversal ledger transaction to a Payment object like Return or Reversal. ledger_transaction_partial_post_create_request: type: object properties: posted_ledger_entries: type: array items: $ref: '#/components/schemas/ledger_entry_partial_post_create_request' description: >- An array of ledger entry objects to be set on the posted ledger transaction. There must be one entry for each of the existing entries with a lesser amount than the existing entry. description: type: string description: >- An optional free-form description for the posted ledger transaction. Maximum of 1000 characters allowed. effective_at: type: string format: date-time description: >- The timestamp (IS08601 format) at which the posted ledger transaction happened for reporting purposes. 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: - posted_ledger_entries child_legal_entity: 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 discarded_at: type: string format: date-time nullable: true legal_entity_type: type: string enum: - business - individual - joint description: The type of legal entity. risk_rating: type: string enum: - low - medium - high nullable: true description: The risk rating of the legal entity. One of low, medium, high. status: type: string enum: - active - denied - pending - suspended nullable: true description: The activation status of the legal entity. One of pending, active, suspended, or denied. prefix: type: string nullable: true description: An individual's prefix. first_name: type: string nullable: true description: An individual's first name. middle_name: type: string nullable: true description: An individual's middle name. last_name: type: string nullable: true description: An individual's last name. suffix: type: string nullable: true description: An individual's suffix. preferred_name: type: string nullable: true description: An individual's preferred name. citizenship_country: type: string nullable: true description: The country of citizenship for an individual. politically_exposed_person: type: boolean nullable: true description: Whether the individual is a politically exposed person. date_of_birth: type: string format: date nullable: true description: An individual's date of birth (YYYY-MM-DD). date_formed: type: string format: date nullable: true description: A business's formation date (YYYY-MM-DD). business_name: type: string nullable: true description: The business's legal business name. doing_business_as_names: type: array items: type: string description: >- A list of "Doing Business As" (DBA) / trade names for a business, different than their legal business name. legal_structure: type: string enum: - corporation - llc - non_profit - partnership - sole_proprietorship - trust nullable: true description: The business's legal structure. phone_numbers: type: array items: type: object properties: phone_number: type: string description: A list of phone numbers in E.164 format. email: type: string nullable: true description: The entity's primary email. website: type: string nullable: true description: The entity's primary website URL. business_description: type: string nullable: true description: A description of the business. intended_use: type: string nullable: true description: A description of the intended use of the legal entity. expected_activity_volume: type: integer nullable: true description: Monthly expected transaction volume in USD. country_of_incorporation: type: string nullable: true description: The country code where the business is incorporated in the ISO 3166-1 alpha-2 or alpha-3 formats. operating_jurisdictions: type: array items: type: string description: A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 codes). primary_social_media_sites: type: array items: type: string description: A list of primary social media URLs for the business. listed_exchange: type: string nullable: true description: ISO 10383 market identifier code. ticker_symbol: type: string nullable: true description: Stock ticker symbol for publicly traded companies. regulators: type: array nullable: true items: $ref: '#/components/schemas/legal_entity_regulator' description: Array of regulatory bodies overseeing this institution. third_party_verification: $ref: '#/components/schemas/third_party_verification' nullable: true deprecated: true description: Deprecated. Use `third_party_verifications` instead. third_party_verifications: type: array items: $ref: '#/components/schemas/third_party_verification' description: A list of third-party verifications run by external vendors. title: Third Party Verfications service_provider_legal_entity_id: type: string format: uuid nullable: true description: The UUID of the parent legal entity in the service provider tree. 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 external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. bank_settings: $ref: '#/components/schemas/legal_entity_bank_setting' nullable: true compliance_details: type: object nullable: true deprecated: true wealth_and_employment_details: $ref: '#/components/schemas/legal_entity_wealth_employment_detail' nullable: true addresses: type: array description: A list of addresses for the entity. items: $ref: '#/components/schemas/legal_entity_address' identifications: type: array description: A list of identifications for the legal entity. items: $ref: '#/components/schemas/identification' industry_classifications: type: array description: A list of industry classifications for the legal entity. items: $ref: '#/components/schemas/legal_entity_industry_classification' documents: type: array items: $ref: '#/components/schemas/document' legal_entity_associations: type: array description: The legal entity associations and its child legal entities. items: $ref: '#/components/schemas/legal_entity_association' nullable: true additionalProperties: false minProperties: 47 required: - id - object - live_mode - created_at - updated_at - discarded_at - legal_entity_type - risk_rating - status - prefix - first_name - middle_name - last_name - suffix - preferred_name - citizenship_country - politically_exposed_person - date_of_birth - date_formed - business_name - doing_business_as_names - legal_structure - phone_numbers - email - website - business_description - intended_use - expected_activity_volume - country_of_incorporation - operating_jurisdictions - primary_social_media_sites - listed_exchange - ticker_symbol - regulators - third_party_verification - third_party_verifications - service_provider_legal_entity_id - metadata - external_id - bank_settings - compliance_details - wealth_and_employment_details - addresses - identifications - industry_classifications - documents - legal_entity_associations child_legal_entity_create: type: object properties: legal_entity_type: type: string enum: - business - individual description: The type of legal entity. risk_rating: type: string enum: - low - medium - high nullable: true description: The risk rating of the legal entity. One of low, medium, high. prefix: type: string nullable: true description: An individual's prefix. first_name: type: string nullable: true description: An individual's first name. middle_name: type: string nullable: true description: An individual's middle name. last_name: type: string nullable: true description: An individual's last name. suffix: type: string nullable: true description: An individual's suffix. preferred_name: type: string nullable: true description: An individual's preferred name. citizenship_country: type: string nullable: true description: The country of citizenship for an individual. politically_exposed_person: type: boolean nullable: true description: Whether the individual is a politically exposed person. date_of_birth: type: string format: date nullable: true description: An individual's date of birth (YYYY-MM-DD). date_formed: type: string format: date nullable: true description: A business's formation date (YYYY-MM-DD). business_name: type: string nullable: true description: The business's legal business name. doing_business_as_names: type: array items: type: string description: >- A list of "Doing Business As" (DBA) / trade names for a business, different than their legal business name. legal_structure: type: string enum: - corporation - llc - non_profit - partnership - sole_proprietorship - trust nullable: true description: The business's legal structure. phone_numbers: type: array items: type: object properties: phone_number: type: string description: A list of phone numbers in E.164 format. email: type: string nullable: true description: The entity's primary email. website: type: string nullable: true description: The entity's primary website URL. business_description: type: string nullable: true description: A description of the business. intended_use: type: string nullable: true description: A description of the intended use of the legal entity. expected_activity_volume: type: integer nullable: true description: Monthly expected transaction volume in USD. country_of_incorporation: type: string nullable: true description: The country code where the business is incorporated in the ISO 3166-1 alpha-2 or alpha-3 formats. operating_jurisdictions: type: array items: type: string description: A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 codes). primary_social_media_sites: type: array items: type: string description: A list of primary social media URLs for the business. listed_exchange: type: string nullable: true description: ISO 10383 market identifier code. ticker_symbol: type: string nullable: true description: Stock ticker symbol for publicly traded companies. regulators: type: array nullable: true items: $ref: '#/components/schemas/legal_entity_regulator' description: Array of regulatory bodies overseeing this institution. third_party_verification: $ref: '#/components/schemas/third_party_verification' nullable: true deprecated: true description: Deprecated. Use `third_party_verifications` instead. third_party_verifications: type: array items: $ref: '#/components/schemas/third_party_verification' description: A list of third-party verifications run by external vendors. title: Third Party Verfications service_provider_legal_entity_id: type: string format: uuid nullable: true description: The UUID of the parent legal entity in the service provider tree. 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 external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. bank_settings: $ref: '#/components/schemas/legal_entity_bank_setting' nullable: true wealth_and_employment_details: $ref: '#/components/schemas/legal_entity_wealth_employment_detail' nullable: true compliance_details: type: object nullable: true deprecated: true addresses: type: array description: A list of addresses for the entity. items: $ref: '#/components/schemas/legal_entity_address_create_request' identifications: type: array description: A list of identifications for the legal entity. items: $ref: '#/components/schemas/identification_create_request' documents: type: array description: >- A list of documents to attach to the legal entity (e.g. articles of incorporation, certificate of good standing, proof of address). items: type: object properties: document_type: type: string enum: - articles_of_incorporation - certificate_of_good_standing - ein_letter - generic - identification_back - identification_front - proof_of_address description: A category given to the document, can be `null`. file_data: type: string description: Base64-encoded file content for the document. filename: type: string description: The original filename of the document. required: - document_type - file_data industry_classifications: type: array description: A list of industry classifications for the legal entity. items: $ref: '#/components/schemas/legal_entity_industry_classification' legal_entity_associations: type: array items: $ref: '#/components/schemas/legal_entity_association_inline_create_request' nullable: true description: The legal entity associations and its child legal entities. connection_id: type: string nullable: true description: >- The connection ID for the connection the legal entity is associated with. Defaults to the id of the connection designated with an is_default value of true or the id of an existing operational connection if only one is available. Pass in a value of null to prevent the connection from being associated with the legal entity. additionalProperties: false minProperties: 41 legal_entity: 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 discarded_at: type: string format: date-time nullable: true legal_entity_type: type: string enum: - business - individual - joint description: The type of legal entity. risk_rating: type: string enum: - low - medium - high nullable: true description: The risk rating of the legal entity. One of low, medium, high. status: type: string enum: - active - denied - pending - suspended nullable: true description: The activation status of the legal entity. One of pending, active, suspended, or denied. prefix: type: string nullable: true description: An individual's prefix. first_name: type: string nullable: true description: An individual's first name. middle_name: type: string nullable: true description: An individual's middle name. last_name: type: string nullable: true description: An individual's last name. suffix: type: string nullable: true description: An individual's suffix. preferred_name: type: string nullable: true description: An individual's preferred name. citizenship_country: type: string nullable: true description: The country of citizenship for an individual. politically_exposed_person: type: boolean nullable: true description: Whether the individual is a politically exposed person. date_of_birth: type: string format: date nullable: true description: An individual's date of birth (YYYY-MM-DD). date_formed: type: string format: date nullable: true description: A business's formation date (YYYY-MM-DD). business_name: type: string nullable: true description: The business's legal business name. doing_business_as_names: type: array items: type: string description: >- A list of "Doing Business As" (DBA) / trade names for a business, different than their legal business name. legal_structure: type: string enum: - corporation - llc - non_profit - partnership - sole_proprietorship - trust nullable: true description: The business's legal structure. phone_numbers: type: array items: type: object properties: phone_number: type: string description: A list of phone numbers in E.164 format. email: type: string nullable: true description: The entity's primary email. website: type: string nullable: true description: The entity's primary website URL. business_description: type: string nullable: true description: A description of the business. intended_use: type: string nullable: true description: A description of the intended use of the legal entity. expected_activity_volume: type: integer nullable: true description: Monthly expected transaction volume in USD. country_of_incorporation: type: string nullable: true description: The country code where the business is incorporated in the ISO 3166-1 alpha-2 or alpha-3 formats. operating_jurisdictions: type: array items: type: string description: A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 codes). primary_social_media_sites: type: array items: type: string description: A list of primary social media URLs for the business. listed_exchange: type: string nullable: true description: ISO 10383 market identifier code. ticker_symbol: type: string nullable: true description: Stock ticker symbol for publicly traded companies. regulators: type: array nullable: true items: $ref: '#/components/schemas/legal_entity_regulator' description: Array of regulatory bodies overseeing this institution. third_party_verification: $ref: '#/components/schemas/third_party_verification' nullable: true deprecated: true description: Deprecated. Use `third_party_verifications` instead. third_party_verifications: type: array items: $ref: '#/components/schemas/third_party_verification' description: A list of third-party verifications run by external vendors. title: Third Party Verfications service_provider_legal_entity_id: type: string format: uuid nullable: true description: The UUID of the parent legal entity in the service provider tree. 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 external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. bank_settings: $ref: '#/components/schemas/legal_entity_bank_setting' nullable: true compliance_details: type: object nullable: true deprecated: true wealth_and_employment_details: $ref: '#/components/schemas/legal_entity_wealth_employment_detail' nullable: true addresses: type: array description: A list of addresses for the entity. items: $ref: '#/components/schemas/legal_entity_address' identifications: type: array description: A list of identifications for the legal entity. items: $ref: '#/components/schemas/identification' industry_classifications: type: array description: A list of industry classifications for the legal entity. items: $ref: '#/components/schemas/legal_entity_industry_classification' documents: type: array items: $ref: '#/components/schemas/document' legal_entity_associations: type: array description: The legal entity associations and its child legal entities. items: $ref: '#/components/schemas/legal_entity_association' nullable: true additionalProperties: false minProperties: 46 required: - id - object - live_mode - created_at - updated_at - discarded_at - legal_entity_type - risk_rating - status - prefix - first_name - middle_name - last_name - suffix - preferred_name - citizenship_country - politically_exposed_person - date_of_birth - date_formed - business_name - doing_business_as_names - legal_structure - phone_numbers - email - website - business_description - intended_use - expected_activity_volume - country_of_incorporation - operating_jurisdictions - primary_social_media_sites - listed_exchange - ticker_symbol - regulators - third_party_verification - third_party_verifications - service_provider_legal_entity_id - metadata - external_id - bank_settings - compliance_details - wealth_and_employment_details - addresses - identifications - industry_classifications - documents legal_entity_create_request: type: object properties: legal_entity_type: type: string enum: - business - individual description: The type of legal entity. risk_rating: type: string enum: - low - medium - high nullable: true description: The risk rating of the legal entity. One of low, medium, high. prefix: type: string nullable: true description: An individual's prefix. first_name: type: string nullable: true description: An individual's first name. middle_name: type: string nullable: true description: An individual's middle name. last_name: type: string nullable: true description: An individual's last name. suffix: type: string nullable: true description: An individual's suffix. preferred_name: type: string nullable: true description: An individual's preferred name. citizenship_country: type: string nullable: true description: The country of citizenship for an individual. politically_exposed_person: type: boolean nullable: true description: Whether the individual is a politically exposed person. date_of_birth: type: string format: date nullable: true description: An individual's date of birth (YYYY-MM-DD). date_formed: type: string format: date nullable: true description: A business's formation date (YYYY-MM-DD). business_name: type: string nullable: true description: The business's legal business name. doing_business_as_names: type: array items: type: string description: >- A list of "Doing Business As" (DBA) / trade names for a business, different than their legal business name. legal_structure: type: string enum: - corporation - llc - non_profit - partnership - sole_proprietorship - trust nullable: true description: The business's legal structure. phone_numbers: type: array items: type: object properties: phone_number: type: string description: A list of phone numbers in E.164 format. email: type: string nullable: true description: The entity's primary email. website: type: string nullable: true description: The entity's primary website URL. business_description: type: string nullable: true description: A description of the business. intended_use: type: string nullable: true description: A description of the intended use of the legal entity. expected_activity_volume: type: integer nullable: true description: Monthly expected transaction volume in USD. country_of_incorporation: type: string nullable: true description: The country code where the business is incorporated in the ISO 3166-1 alpha-2 or alpha-3 formats. operating_jurisdictions: type: array items: type: string description: A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 codes). primary_social_media_sites: type: array items: type: string description: A list of primary social media URLs for the business. listed_exchange: type: string nullable: true description: ISO 10383 market identifier code. ticker_symbol: type: string nullable: true description: Stock ticker symbol for publicly traded companies. regulators: type: array nullable: true items: $ref: '#/components/schemas/legal_entity_regulator' description: Array of regulatory bodies overseeing this institution. third_party_verification: $ref: '#/components/schemas/third_party_verification' nullable: true deprecated: true description: Deprecated. Use `third_party_verifications` instead. third_party_verifications: type: array items: $ref: '#/components/schemas/third_party_verification' description: A list of third-party verifications run by external vendors. title: Third Party Verfications service_provider_legal_entity_id: type: string format: uuid nullable: true description: The UUID of the parent legal entity in the service provider tree. 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 external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. bank_settings: $ref: '#/components/schemas/legal_entity_bank_setting' nullable: true wealth_and_employment_details: $ref: '#/components/schemas/legal_entity_wealth_employment_detail' nullable: true compliance_details: type: object nullable: true deprecated: true addresses: type: array description: A list of addresses for the entity. items: $ref: '#/components/schemas/legal_entity_address_create_request' identifications: type: array description: A list of identifications for the legal entity. items: $ref: '#/components/schemas/identification_create_request' documents: type: array description: >- A list of documents to attach to the legal entity (e.g. articles of incorporation, certificate of good standing, proof of address). items: type: object properties: document_type: type: string enum: - articles_of_incorporation - certificate_of_good_standing - ein_letter - generic - identification_back - identification_front - proof_of_address description: A category given to the document, can be `null`. file_data: type: string description: Base64-encoded file content for the document. filename: type: string description: The original filename of the document. required: - document_type - file_data industry_classifications: type: array description: A list of industry classifications for the legal entity. items: $ref: '#/components/schemas/legal_entity_industry_classification' legal_entity_associations: type: array items: $ref: '#/components/schemas/legal_entity_association_inline_create_request' nullable: true description: The legal entity associations and its child legal entities. connection_id: type: string nullable: true description: >- The connection ID for the connection the legal entity is associated with. Defaults to the id of the connection designated with an is_default value of true or the id of an existing operational connection if only one is available. Pass in a value of null to prevent the connection from being associated with the legal entity. required: - legal_entity_type legal_entity_update_request: type: object properties: risk_rating: type: string enum: - low - medium - high nullable: true description: The risk rating of the legal entity. One of low, medium, high. prefix: type: string nullable: true description: An individual's prefix. first_name: type: string nullable: true description: An individual's first name. middle_name: type: string nullable: true description: An individual's middle name. last_name: type: string nullable: true description: An individual's last name. suffix: type: string nullable: true description: An individual's suffix. preferred_name: type: string nullable: true description: An individual's preferred name. citizenship_country: type: string nullable: true description: The country of citizenship for an individual. politically_exposed_person: type: boolean nullable: true description: Whether the individual is a politically exposed person. date_of_birth: type: string format: date nullable: true description: An individual's date of birth (YYYY-MM-DD). date_formed: type: string format: date nullable: true description: A business's formation date (YYYY-MM-DD). business_name: type: string nullable: true description: The business's legal business name. doing_business_as_names: type: array items: type: string description: >- A list of "Doing Business As" (DBA) / trade names for a business, different than their legal business name. legal_structure: type: string enum: - corporation - llc - non_profit - partnership - sole_proprietorship - trust nullable: true description: The business's legal structure. phone_numbers: type: array items: type: object properties: phone_number: type: string description: A list of phone numbers in E.164 format. email: type: string nullable: true description: The entity's primary email. website: type: string nullable: true description: The entity's primary website URL. business_description: type: string nullable: true description: A description of the business. intended_use: type: string nullable: true description: A description of the intended use of the legal entity. expected_activity_volume: type: integer nullable: true description: Monthly expected transaction volume in USD. country_of_incorporation: type: string nullable: true description: The country code where the business is incorporated in the ISO 3166-1 alpha-2 or alpha-3 formats. operating_jurisdictions: type: array items: type: string description: A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3 codes). primary_social_media_sites: type: array items: type: string description: A list of primary social media URLs for the business. listed_exchange: type: string nullable: true description: ISO 10383 market identifier code. ticker_symbol: type: string nullable: true description: Stock ticker symbol for publicly traded companies. regulators: type: array nullable: true items: $ref: '#/components/schemas/legal_entity_regulator' description: Array of regulatory bodies overseeing this institution. third_party_verification: $ref: '#/components/schemas/third_party_verification' nullable: true deprecated: true description: Deprecated. Use `third_party_verifications` instead. third_party_verifications: type: array items: $ref: '#/components/schemas/third_party_verification' description: A list of third-party verifications run by external vendors. title: Third Party Verfications service_provider_legal_entity_id: type: string format: uuid nullable: true description: The UUID of the parent legal entity in the service provider tree. 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 external_id: type: string nullable: true description: An optional user-defined 180 character unique identifier. bank_settings: $ref: '#/components/schemas/legal_entity_bank_setting' nullable: true wealth_and_employment_details: $ref: '#/components/schemas/legal_entity_wealth_employment_detail' nullable: true addresses: type: array description: A list of addresses for the entity. items: $ref: '#/components/schemas/legal_entity_address_create_request' identifications: type: array description: A list of identifications for the legal entity. items: $ref: '#/components/schemas/identification_create_request' industry_classifications: type: array description: A list of industry classifications for the legal entity. items: $ref: '#/components/schemas/legal_entity_industry_classification' legal_entity_address: 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 discarded_at: type: string format: date-time nullable: true address_types: type: array items: type: string enum: - business - business_registered - mailing - other - po_box - residential description: The types of this address. line1: type: string nullable: true line2: type: string nullable: true locality: type: string nullable: true description: Locality or City. region: type: string nullable: true description: Region or State. postal_code: type: string description: The postal code of the address. nullable: true country: type: string description: Country code conforms to [ISO 3166-1 alpha-2] nullable: true additionalProperties: false minProperties: 13 required: - id - object - live_mode - created_at - updated_at - discarded_at - address_types - line1 - line2 - locality - region - postal_code - country legal_entity_address_create_request: type: object properties: address_types: type: array items: type: string enum: - business - business_registered - mailing - other - po_box - residential description: The types of this address. line1: type: string nullable: true line2: type: string nullable: true locality: type: string nullable: true description: Locality or City. region: type: string nullable: true description: Region or State. postal_code: type: string description: The postal code of the address. nullable: true country: type: string description: Country code conforms to [ISO 3166-1 alpha-2] nullable: true required: - line1 - locality - region - postal_code - country legal_entity_association: 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 discarded_at: type: string format: date-time nullable: true parent_legal_entity_id: type: string description: The ID of the parent legal entity. This must be a business or joint legal entity. relationship_types: type: array items: type: string enum: - authorized_signer - beneficial_owner - control_person description: A list of relationship types for how the child entity relates to parent entity. title: type: string nullable: true description: The job title of the child entity at the parent entity. ownership_percentage: type: integer nullable: true description: The child entity's ownership percentage iff they are a beneficial owner. child_legal_entity: $ref: '#/components/schemas/child_legal_entity' description: The child legal entity. additionalProperties: false minProperties: 11 required: - id - object - live_mode - created_at - updated_at - discarded_at - parent_legal_entity_id - relationship_types - title - ownership_percentage - child_legal_entity legal_entity_association_inline_create_request: type: object properties: relationship_types: type: array items: type: string enum: - authorized_signer - beneficial_owner - control_person description: A list of relationship types for how the child entity relates to parent entity. title: type: string nullable: true description: The job title of the child entity at the parent entity. ownership_percentage: type: integer nullable: true description: The child entity's ownership percentage iff they are a beneficial owner. child_legal_entity: $ref: '#/components/schemas/child_legal_entity_create' description: The child legal entity. child_legal_entity_id: type: string description: The ID of the child legal entity. required: - relationship_types legal_entity_bank_setting: 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 discarded_at: type: string format: date-time nullable: true enable_backup_withholding: type: boolean nullable: true description: >- Whether backup withholding is enabled. See more here - https://www.irs.gov/businesses/small-businesses-self-employed/backup-withholding. backup_withholding_percentage: type: integer nullable: true description: The percentage of backup withholding to apply to the legal entity. privacy_opt_out: type: boolean nullable: true description: Cross River Bank specific setting to opt out of privacy policy. regulation_o: type: boolean nullable: true description: >- It covers, among other types of insider loans, extensions of credit by a member bank to an executive officer, director, or principal shareholder of the member bank; a bank holding company of which the member bank is a subsidiary; and any other subsidiary of that bank holding company. additionalProperties: false minProperties: 10 required: - id - object - live_mode - created_at - updated_at - discarded_at - enable_backup_withholding - backup_withholding_percentage - privacy_opt_out - regulation_o legal_entity_industry_classification: 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 discarded_at: type: string format: date-time nullable: true classification_type: type: string enum: - anzsic - bics - gics - hsics - icb - isic - mgecs - nace - naics - rbics - sic - sni - trbc - uksic - unspsc nullable: false description: The classification system of the classification codes. classification_codes: type: array items: type: string nullable: false description: The industry classification codes for the legal entity. additionalProperties: false minProperties: 8 required: - id - object - live_mode - created_at - updated_at - discarded_at - classification_type - classification_codes legal_entity_wealth_employment_detail: 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 discarded_at: type: string format: date-time nullable: true employment_status: type: string enum: - employed - retired - self_employed - student - unemployed nullable: true description: The employment status of the individual. occupation: type: string enum: - consulting - executive - finance_accounting - food_services - government - healthcare - legal_services - manufacturing - other - sales - science_engineering - technology nullable: true description: The occupation of the individual. industry: type: string enum: - accounting - agriculture - automotive - chemical_manufacturing - construction - educational_medical - food_service - finance - gasoline - health_stores - laundry - maintenance - manufacturing - merchant_wholesale - mining - performing_arts - professional_non_legal - public_administration - publishing - real_estate - recreation_gambling - religious_charity - rental_services - retail_clothing - retail_electronics - retail_food - retail_furnishing - retail_home - retail_non_store - retail_sporting - transportation - travel - utilities nullable: true description: The industry of the individual. income_source: type: string enum: - family_support - government_benefits - inheritance - investments - rental_income - retirement - salary - self_employed nullable: true description: The source of the individual's income. income_state: type: string nullable: true description: The state in which the individual's income is earned. income_country: type: string nullable: true description: The country in which the individual's income is earned. employer_name: type: string nullable: true description: The name of the employer. employer_state: type: string nullable: true description: The state in which the employer is located. employer_country: type: string nullable: true description: The country in which the employer is located. source_of_funds: type: string enum: - alimony - annuity - business_owner - business_revenue - debt_financing - general_employee - government_benefits - homemaker - inheritance_gift - intercompany_loan - investment - investor_funding - legal_settlement - lottery - real_estate - retained_earnings_or_savings - retired - retirement - salary - sale_of_business_assets - sale_of_real_estate - self_employed - senior_executive - trust_income nullable: true description: The source of the individual's funds. wealth_source: type: string enum: - business_sale - family_support - government_benefits - inheritance - investments - other - rental_income - retirement - salary - self_employed nullable: true description: The source of the individual's wealth. annual_income: type: integer nullable: true description: The annual income of the individual in USD. additionalProperties: false minProperties: 18 required: - id - object - live_mode - created_at - updated_at - discarded_at - employment_status - occupation - industry - income_source - income_state - income_country - employer_name - employer_state - employer_country - source_of_funds - wealth_source - annual_income legal_entity_regulator: type: object properties: name: type: string description: Full name of the regulatory body. jurisdiction: type: string description: >- The country code where the regulator operates in the ISO 3166-1 alpha-2 format (e.g., "US", "CA", "GB"). registration_number: type: string description: Registration or identification number with the regulator. required: - name - jurisdiction - registration_number additionalProperties: false third_party_verification: type: object properties: vendor_verification_id: type: string description: The identification of the third party verification in `vendor`'s system. vendor: type: string enum: - persona - middesk - alloy - sumsub - veriff description: The vendor that performed the verification, e.g. `persona`. verification_category: type: string enum: - legal_name - date_of_birth - address - government_id_number - adverse_media description: The category of verification performed. verification_method: type: string description: The method used to perform the verification. comment: type: string nullable: true description: An optional comment about the verification. outcome: type: string enum: - passed - failed description: The outcome of the verification. One of `passed` or `failed`. verification_time: type: string format: date-time description: The timestamp when the verification was performed. required: - vendor_verification_id - vendor - verification_category - verification_method - outcome - verification_time additionalProperties: false line_item: 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 itemizable_id: type: string format: uuid description: The ID of the payment order or expected payment. itemizable_type: type: string enum: - ExpectedPayment - PaymentOrder description: One of `payment_orders` or `expected_payments`. amount: type: integer description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. description: type: string description: A free-form description of the line item. nullable: true 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 accounting: $ref: '#/components/schemas/accounting' accounting_category_id: type: string 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. nullable: true accounting_ledger_class_id: type: string 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. nullable: true additionalProperties: false minProperties: 13 required: - id - object - live_mode - created_at - updated_at - itemizable_id - itemizable_type - amount - description - metadata - accounting - accounting_category_id - accounting_ledger_class_id 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 description: A free-form description of the line item. nullable: true accounting_category_id: type: string description: >- The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected. nullable: true required: - amount line_item_update_request: type: object properties: 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 payment_action: 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: type: string description: The type of the payment action. Determines the action to be taken. status: type: string description: >- The current status of the payment action. One of `pending`, `processing`, `sent`, `acknowledged`, `cancelled`, or `failed`. actionable_id: type: string format: uuid nullable: true description: The ID of the associated actionable object. actionable_type: type: string nullable: true description: The type of the associated actionable object. One of `payment_order`, `expected_payment`. internal_account_id: type: string format: uuid description: The ID of the internal account associated with the payment action. details: type: object description: The specifc details of the payment action based on type. additionalProperties: false minProperties: 11 required: - id - object - live_mode - created_at - updated_at - type - status - actionable_id - actionable_type - internal_account_id - details payment_action_create_request: type: object properties: type: type: string description: Required. The type of the payment action. Determines the action to be taken. actionable_id: type: string format: uuid description: Optional. The ID of the associated actionable object. actionable_type: type: string description: >- Optional. The type of the associated actionable object. One of `payment_order`, `expected_payment`. Required if `actionable_id` is passed. internal_account_id: type: string format: uuid description: >- Optional. The ID of one of your organization's internal accounts. Required if `actionable_id` is not passed. details: type: object description: Optional. The specifc details of the payment action based on type. required: - type payment_action_update_request: type: object properties: status: type: string enum: - pending - processable - processing - sent - acknowledged - failed - cancelled description: >- Optional. Set the status of the payment action to `cancelled` to cancel the payment action. This will only work if the payment action is in a `pending` state. required: - status payment_flow: 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 client_token: type: string description: >- The client token of the payment flow. This token can be used to embed a payment workflow in your client-side application. status: type: string enum: - cancelled - completed - expired - pending description: The current status of the payment flow. One of `pending`, `completed`, `expired`, or `cancelled`. 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. currency: type: string description: The currency of the payment. direction: type: string enum: - credit - debit description: >- Describes the direction money is flowing in the transaction. Can only be `debit`. A `debit` pulls money from someone else's account to your own. counterparty_id: type: string format: uuid nullable: true description: >- The ID of a counterparty associated with the payment. As part of the payment workflow an external account will be associated with this counterparty. receiving_account_id: type: string format: uuid nullable: true description: If present, the ID of the external account created using this flow. originating_account_id: type: string format: uuid nullable: true description: The ID of one of your organization's internal accounts. payment_order_id: type: string format: uuid nullable: true description: If present, the ID of the payment order created using this flow. effective_date_selection_enabled: type: boolean description: >- When `true`, your end-user can schedule the payment `effective_date` while completing the pre-built UI. due_date: type: string format: date nullable: true description: >- The due date for the flow. Can only be passed in when `effective_date_selection_enabled` is `true`. selected_effective_date: type: string format: date nullable: true description: >- This field is set after your end-user selects a payment date while completing the pre-built UI. This field is always `null` unless `effective_date_selection_enabled` is `true`. external_account_collection: type: string enum: - disabled - enabled description: >- When `enabled`, your end-user can select from an existing external account when completing the flow. When `disabled`, your end-user must add new payment details when completing the flow. existing_external_accounts_filter: type: string enum: - verified nullable: true description: >- When `verified` and `external_account_collection` is `enabled`, filters the list of external accounts your end-user can select to those with a `verification_status` of `verified`. additionalProperties: false minProperties: 17 maxProperties: 19 payment_flow_create_request: type: object properties: amount: type: integer description: >- Required. Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. Can be any integer up to 36 digits. currency: type: string description: Required. The currency of the payment. direction: type: string enum: - credit - debit description: >- Required. Describes the direction money is flowing in the transaction. Can only be `debit`. A `debit` pulls money from someone else's account to your own. counterparty_id: type: string format: uuid description: >- Required. The ID of a counterparty associated with the payment. As part of the payment workflow an external account will be associated with this model. originating_account_id: type: string format: uuid description: Required. The ID of one of your organization's internal accounts. due_date: type: string format: date description: >- Optional. Can only be passed in when `effective_date_selection_enabled` is `true`. When set, the due date is shown to your end-user in the pre-built UI as they are selecting a payment `effective_date`. required: - amount - currency - direction - counterparty_id - originating_account_id payment_flow_update_request: type: object properties: status: type: string enum: - cancelled description: Required. The updated status of the payment flow. Can only be used to mark a flow as `cancelled`. required: - status 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 format: uuid nullable: true 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 format: uuid nullable: true 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 nullable: true description: An optional description for internal use. statement_descriptor: type: string nullable: true 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 nullable: true 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 format: date-time nullable: true 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 nullable: true 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 enum: - shared - sender - receiver nullable: true 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 enum: - fixed_to_variable - variable_to_fixed nullable: true 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 nullable: true 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 nullable: true 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 nullable: true description: Name of the ultimate originator of the payment order. ultimate_originating_party_identifier: type: string nullable: true description: Identifier of the ultimate originator of the payment order. ultimate_receiving_party_name: type: string nullable: true ultimate_receiving_party_identifier: type: string nullable: true send_remittance_advice: type: boolean nullable: true 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 format: date-time nullable: true 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 nullable: true description: An optional user-defined 180 character unique identifier. status: type: string enum: - approved - cancelled - completed - denied - failed - held - needs_approval - pending - processing - returned - reversed - sent - stopped description: The current status of the payment order. receiving_account_type: type: string enum: - internal_account - external_account ultimate_originating_account: type: object description: >- The account to which the originating of this payment should be attributed to. Can be a `virtual_account` or `internal_account`. nullable: true anyOf: - $ref: '#/components/schemas/virtual_account' - $ref: '#/components/schemas/internal_account' ultimate_originating_account_id: type: string format: uuid description: The ultimate originating account ID. Can be a `virtual_account` or `internal_account`. nullable: true ultimate_originating_account_type: type: string enum: - internal_account - virtual_account nullable: true counterparty_id: type: string format: uuid description: If the payment order is tied to a specific Counterparty, their id will appear, otherwise `null`. nullable: true transaction_ids: type: array items: type: string format: uuid description: >- The IDs of all the transactions associated to this payment order. Usually, you will only have a single transaction ID. However, if a payment order initially results in a Return, but gets redrafted and is later successfully completed, it can have many transactions. ledger_transaction_id: type: string format: uuid nullable: true description: The ID of the ledger transaction linked to the payment order. current_return: $ref: '#/components/schemas/return' nullable: true description: If the payment order's status is `returned`, this will include the return object's data. current_hold: $ref: '#/components/schemas/hold' nullable: true description: If the payment order's status is `held`, this will include the hold object's data. reference_numbers: type: array items: $ref: '#/components/schemas/payment_reference' vendor_failure_reason: type: string description: >- This field will be populated if a vendor failure occurs. Logic shouldn't be built on its value as it is free-form. nullable: true foreign_exchange_rate: $ref: '#/components/schemas/foreign_exchange_rate' nullable: true description: Associated serialized foreign exchange rate information. vendor_attributes: type: object nullable: true description: Additional vendor specific fields for this payment. Data must be represented as key-value pairs. batch_id: type: string format: uuid nullable: true description: >- The ID of the batch in which the payment order is included. Only populated after the payment order begins processing. additionalProperties: false minProperties: 52 required: - id - object - live_mode - created_at - updated_at - type - subtype - amount - direction - priority - originating_account_id - receiving_account_id - currency - accounting - accounting_category_id - accounting_ledger_class_id - effective_date - description - statement_descriptor - remittance_information - process_after - purpose - metadata - charge_bearer - foreign_exchange_indicator - foreign_exchange_contract - nsf_protected - originating_party_name - ultimate_originating_party_name - ultimate_originating_party_identifier - ultimate_receiving_party_name - ultimate_receiving_party_identifier - send_remittance_advice - expires_at - reconciliation_status - external_id - status - receiving_account_type - ultimate_originating_account - ultimate_originating_account_id - ultimate_originating_account_type - counterparty_id - transaction_ids - ledger_transaction_id - current_return - current_hold - reference_numbers - vendor_failure_reason - foreign_exchange_rate - vendor_attributes - batch_id payment_order_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 format: uuid nullable: true 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 format: uuid nullable: true 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 nullable: true description: An optional description for internal use. statement_descriptor: type: string nullable: true 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 nullable: true 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 format: date-time nullable: true 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 nullable: true 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 enum: - shared - sender - receiver nullable: true 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 enum: - fixed_to_variable - variable_to_fixed nullable: true 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 nullable: true 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 nullable: true 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 nullable: true description: Name of the ultimate originator of the payment order. ultimate_originating_party_identifier: type: string nullable: true description: Identifier of the ultimate originator of the payment order. ultimate_receiving_party_name: type: string nullable: true description: Name of the ultimate funds recipient. ultimate_receiving_party_identifier: type: string nullable: true description: Identifier of the ultimate funds recipient. send_remittance_advice: type: boolean nullable: true 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 format: date-time nullable: true 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 description: An optional user-defined 180 character unique identifier. nullable: true 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 enum: - business - individual nullable: true description: Either `individual` or `business`. party_address: $ref: '#/components/schemas/address_request' description: Required if receiving wire payments. name: type: string nullable: true 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 nullable: true 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 nullable: true 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. documents: type: array items: $ref: '#/components/schemas/document_create_request' description: >- An array of documents to be attached to the payment order. Note that if you attach documents, the request's content type must be `multipart/form-data`. required: - type - amount - direction - originating_account_id 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 format: uuid nullable: true 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 format: uuid nullable: true 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 nullable: true description: An optional description for internal use. statement_descriptor: type: string nullable: true 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 nullable: true 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 format: date-time nullable: true 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 nullable: true 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 enum: - shared - sender - receiver nullable: true 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 enum: - fixed_to_variable - variable_to_fixed nullable: true 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 nullable: true 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 nullable: true 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 nullable: true description: Name of the ultimate originator of the payment order. ultimate_originating_party_identifier: type: string nullable: true description: Identifier of the ultimate originator of the payment order. ultimate_receiving_party_name: type: string nullable: true description: Name of the ultimate funds recipient. ultimate_receiving_party_identifier: type: string nullable: true description: Identifier of the ultimate funds recipient. send_remittance_advice: type: boolean nullable: true 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 format: date-time nullable: true 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 description: An optional user-defined 180 character unique identifier. nullable: true 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 enum: - business - individual nullable: true description: Either `individual` or `business`. party_address: $ref: '#/components/schemas/address_request' description: Required if receiving wire payments. name: type: string nullable: true 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 nullable: true 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 nullable: true 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 payment_order_update_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 format: uuid nullable: true 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 format: uuid nullable: true 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 nullable: true description: An optional description for internal use. statement_descriptor: type: string nullable: true 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 nullable: true 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 format: date-time nullable: true 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 nullable: true 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 enum: - shared - sender - receiver nullable: true 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 enum: - fixed_to_variable - variable_to_fixed nullable: true 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 nullable: true 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 nullable: true 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 nullable: true description: >- This represents the name of the person that the payment is on behalf of when using the CIE subtype for ACH payments. Only the first 15 characters of this string will be used. Any additional characters will be truncated. ultimate_originating_party_identifier: type: string nullable: true description: >- This represents the identifier by which the person is known to the receiver when using the CIE subtype for ACH payments. Only the first 22 characters of this string will be used. Any additional characters will be truncated. ultimate_receiving_party_name: type: string nullable: true description: >- This represents the identifier by which the merchant is known to the person initiating an ACH payment with CIE subtype. Only the first 15 characters of this string will be used. Any additional characters will be truncated. ultimate_receiving_party_identifier: type: string nullable: true description: >- This represents the name of the merchant that the payment is being sent to when using the CIE subtype for ACH payments. Only the first 22 characters of this string will be used. Any additional characters will be truncated. send_remittance_advice: type: boolean nullable: true 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 format: date-time nullable: true 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 description: An optional user-defined 180 character unique identifier. nullable: true status: type: string enum: - approved - cancelled - completed - denied - failed - held - needs_approval - pending - processing - returned - reversed - sent - stopped description: >- To cancel a payment order, use `cancelled`. To redraft a returned payment order, use `approved`. To undo approval on a denied or approved payment order, use `needs_approval`. counterparty_id: type: string format: uuid description: Required when receiving_account_id is passed the ID of an external account. nullable: true 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 enum: - business - individual nullable: true description: Either `individual` or `business`. party_address: $ref: '#/components/schemas/address_request' description: Required if receiving wire payments. name: type: string nullable: true 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 nullable: true 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. 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. hold: type: object properties: id: type: string format: uuid object: type: string enum: - hold description: The type of object 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 status: type: string enum: - active - resolved description: The status of the hold target_type: type: string enum: - payment_order description: The type of target being held target_id: type: string format: uuid description: The ID of the target being held reason: type: string nullable: true description: The reason for the hold resolution: type: string nullable: true description: The resolution of the hold resolved_at: type: string format: date-time nullable: true description: When the hold was resolved metadata: type: object additionalProperties: type: string description: Additional metadata for the hold nullable: true required: - id - object - status - target_type - target_id - created_at - updated_at additionalProperties: false payment_reference: 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 reference_number: type: string description: The vendor reference number. reference_number_type: type: string enum: - ach_original_trace_number - ach_trace_number - bankprov_payment_activity_date - bankprov_payment_id - blockchain_transaction_hash - blockchain_transaction_index - bnk_dev_prenotification_id - bnk_dev_transfer_id - bny_mellon_transaction_reference_number - bofa_end_to_end_id - bofa_neft_clearing_reference_number - bofa_transaction_id - check_number - chips_uid - citibank_reference_number - citibank_worldlink_clearing_system_reference_number - column_fx_quote_id - column_reversal_pair_transfer_id - column_transfer_id - cross_river_card_trace_number - cross_river_core_transaction_id - cross_river_fed_batch_id - cross_river_payment_id - cross_river_retrieval_reference_id - cross_river_service_message - cross_river_transaction_id - currencycloud_conversion_id - currencycloud_payment_id - dc_bank_transaction_id - eft_trace_number - evolve_core_batch - evolve_core_file_key - evolve_core_seq - evolve_transaction_id - fake_vendor_payment_id - fedwire_imad - fedwire_omad - first_republic_internal_id - goldman_sachs_collection_request_id - goldman_sachs_end_to_end_id - goldman_sachs_payment_request_id - goldman_sachs_request_id - goldman_sachs_unique_payment_id - interac_message_id - jpmc_ccn - jpmc_clearing_system_reference - jpmc_customer_reference_id - jpmc_end_to_end_id - jpmc_firm_root_id - jpmc_fx_trn_id - jpmc_p3_id - jpmc_payment_batch_id - jpmc_payment_information_id - jpmc_payment_returned_datetime - jpmc_transaction_reference_number - lob_check_id - other - partial_swift_mir - paxos_crypto_withdrawal_id - paxos_fiat_withdrawal_id - paxos_group_id - paxos_orchestration_id - paxos_transfer_id - pnc_clearing_reference - pnc_instruction_id - pnc_multipayment_id - pnc_payment_trace_id - pnc_request_for_payment_id - pnc_transaction_reference_number - rbc_wire_reference_id - rtp_instruction_id - signet_api_reference_id - signet_confirmation_id - signet_request_id - silvergate_payment_id - svb_end_to_end_id - svb_payment_id - swift_mir - swift_uetr - umb_product_partner_account_number - usbank_payment_application_reference_id - usbank_payment_id - usbank_pending_rtp_payment_id - usbank_posted_rtp_payment_id - wells_fargo_end_to_end_id - wells_fargo_payment_id - wells_fargo_trace_number - wells_fargo_uetr - western_alliance_payment_id - western_alliance_transaction_id - western_alliance_wire_confirmation_number description: The type of the reference number. Referring to the vendor payment id. additionalProperties: false minProperties: 7 required: - id - object - live_mode - created_at - updated_at - reference_number - reference_number_type payment_reference_object: 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 referenceable_id: type: string description: >- The id of the referenceable to search for. Must be accompanied by the referenceable_type or will return an error. referenceable_type: type: string enum: - payment_order - reversal - return description: >- One of the referenceable types. This must be accompanied by the id of the referenceable or will return an error. reference_number: type: string description: The actual reference number assigned by the bank. reference_number_type: type: string enum: - ach_original_trace_number - ach_trace_number - bankprov_payment_activity_date - bankprov_payment_id - blockchain_transaction_hash - blockchain_transaction_index - bnk_dev_prenotification_id - bnk_dev_transfer_id - bny_mellon_transaction_reference_number - bofa_end_to_end_id - bofa_neft_clearing_reference_number - bofa_transaction_id - check_number - chips_uid - citibank_reference_number - citibank_worldlink_clearing_system_reference_number - column_fx_quote_id - column_reversal_pair_transfer_id - column_transfer_id - cross_river_card_trace_number - cross_river_core_transaction_id - cross_river_fed_batch_id - cross_river_payment_id - cross_river_retrieval_reference_id - cross_river_service_message - cross_river_transaction_id - currencycloud_conversion_id - currencycloud_payment_id - dc_bank_transaction_id - eft_trace_number - evolve_core_batch - evolve_core_file_key - evolve_core_seq - evolve_transaction_id - fake_vendor_payment_id - fedwire_imad - fedwire_omad - first_republic_internal_id - goldman_sachs_collection_request_id - goldman_sachs_end_to_end_id - goldman_sachs_payment_request_id - goldman_sachs_request_id - goldman_sachs_unique_payment_id - interac_message_id - jpmc_ccn - jpmc_clearing_system_reference - jpmc_customer_reference_id - jpmc_end_to_end_id - jpmc_firm_root_id - jpmc_fx_trn_id - jpmc_p3_id - jpmc_payment_batch_id - jpmc_payment_information_id - jpmc_payment_returned_datetime - jpmc_transaction_reference_number - lob_check_id - other - partial_swift_mir - paxos_crypto_withdrawal_id - paxos_fiat_withdrawal_id - paxos_group_id - paxos_orchestration_id - paxos_transfer_id - pnc_clearing_reference - pnc_instruction_id - pnc_multipayment_id - pnc_payment_trace_id - pnc_request_for_payment_id - pnc_transaction_reference_number - rbc_wire_reference_id - rtp_instruction_id - signet_api_reference_id - signet_confirmation_id - signet_request_id - silvergate_payment_id - svb_end_to_end_id - svb_payment_id - swift_mir - swift_uetr - umb_product_partner_account_number - usbank_payment_application_reference_id - usbank_payment_id - usbank_pending_rtp_payment_id - usbank_posted_rtp_payment_id - wells_fargo_end_to_end_id - wells_fargo_payment_id - wells_fargo_trace_number - wells_fargo_uetr - western_alliance_payment_id - western_alliance_transaction_id - western_alliance_wire_confirmation_number description: The type of reference number. additionalProperties: false minProperties: 9 required: - id - object - live_mode - created_at - updated_at - referenceable_id - referenceable_type - reference_number - reference_number_type ping_response: type: object properties: ping: type: string example: pong additionalProperties: false minProperties: 1 required: - ping return: 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 discarded_at: type: string format: date-time nullable: true returnable_id: type: string format: uuid description: The ID of the object being returned or `null`. nullable: true returnable_type: type: string enum: - incoming_payment_detail - payment_order - return - reversal description: The type of object being returned or `null`. nullable: true code: type: string enum: - '901' - '902' - '903' - '904' - '905' - '907' - '908' - '909' - '910' - '911' - '912' - '914' - C01 - C02 - C03 - C05 - C06 - C07 - C08 - C09 - C13 - C14 - R01 - R02 - R03 - R04 - R05 - R06 - R07 - R08 - R09 - R10 - R11 - R12 - R13 - R14 - R15 - R16 - R17 - R18 - R19 - R20 - R21 - R22 - R23 - R24 - R25 - R26 - R27 - R28 - R29 - R30 - R31 - R32 - R33 - R34 - R35 - R36 - R37 - R38 - R39 - R40 - R41 - R42 - R43 - R44 - R45 - R46 - R47 - R50 - R51 - R52 - R53 - R61 - R62 - R67 - R68 - R69 - R70 - R71 - R72 - R73 - R74 - R75 - R76 - R77 - R80 - R81 - R82 - R83 - R84 - R85 - currencycloud nullable: true description: The return code. For ACH returns, this is the required ACH return code. reason: type: string nullable: true description: Often the bank will provide an explanation for the return, which is a short human readable string. date_of_death: type: string nullable: true format: date description: If the return code is `R14` or `R15` this is the date the deceased counterparty passed away. additional_information: type: string nullable: true description: >- Some returns may include additional information from the bank. In these cases, this string will be present. data: type: object nullable: true description: The raw data from the return file that we get from the bank. corrections: type: object nullable: true properties: account_number: type: string nullable: true description: >- The updated account number that should replace the one originally used on the outgoing payment. company_id: type: string nullable: true description: The updated company ID that should replace the one originally used on the outgoing payment. company_name: type: string nullable: true description: The updated company name that should replace the one originally used on the outgoing payment. individual_identification_number: type: string nullable: true description: >- The updated individual identification number that should replace the one originally used on the outgoing payment. routing_number: type: string nullable: true description: >- The updated routing number that should replace the one originally used on the outgoing payment. transaction_code: type: string nullable: true description: >- The updated account type code that should replace the one originally used on the outgoing payment. description: >- Only relevant for ACH NOC returns. This is an object containing all of the new and corrected information provided by the bank that was previously incorrect on the original outgoing payment. reconciliation_status: type: string enum: - unreconciled - tentatively_reconciled - reconciled description: One of `unreconciled`, `tentatively_reconciled` or `reconciled`. status: type: string enum: - cancelled - completed - failed - pending - processing - returned - sent description: The current status of the return. transaction_line_item_id: type: string format: uuid nullable: true description: The ID of the relevant Transaction Line Item or `null`. transaction_id: type: string format: uuid nullable: true description: The ID of the relevant Transaction or `null`. internal_account_id: type: string format: uuid nullable: true description: The ID of the relevant Internal Account. type: type: string enum: - ach - ach_noc - au_becs - bacs - book - check - cross_border - eft - gb_fps - interac - manual - sepa - wire - zengin description: >- The type of return. Can be one of: `ach`, `ach_noc`, `au_becs`, `bacs`, `eft`, `interac`, `manual`, `paper_item`, `wire`. amount: type: integer description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. currency: $ref: '#/components/schemas/currency' description: Currency that this transaction is denominated in. failure_reason: type: string nullable: true description: >- If an originating return failed to be processed by the bank, a description of the failure reason will be available. role: type: string enum: - originating - receiving description: The role of the return, can be `originating` or `receiving`. current_return: $ref: '#/components/schemas/return' nullable: true description: >- If the return's status is `returned`, this will include the return object's data that is returning this return. example: null reference_numbers: type: array description: An array of Payment Reference objects. items: $ref: '#/components/schemas/payment_reference' ledger_transaction_id: type: string format: uuid nullable: true description: The ID of the ledger transaction linked to the return. additionalProperties: false minProperties: 25 required: - id - object - live_mode - created_at - updated_at - discarded_at - returnable_id - returnable_type - code - reason - date_of_death - corrections - reconciliation_status - status - transaction_line_item_id - transaction_id - internal_account_id - type - amount - currency - failure_reason - role - current_return - reference_numbers - ledger_transaction_id return_create_request: type: object properties: returnable_id: type: string format: uuid description: The ID of the object being returned or `null`. nullable: true code: type: string enum: - '901' - '902' - '903' - '904' - '905' - '907' - '908' - '909' - '910' - '911' - '912' - '914' - C01 - C02 - C03 - C05 - C06 - C07 - C08 - C09 - C13 - C14 - R01 - R02 - R03 - R04 - R05 - R06 - R07 - R08 - R09 - R10 - R11 - R12 - R13 - R14 - R15 - R16 - R17 - R18 - R19 - R20 - R21 - R22 - R23 - R24 - R25 - R26 - R27 - R28 - R29 - R30 - R31 - R32 - R33 - R34 - R35 - R36 - R37 - R38 - R39 - R40 - R41 - R42 - R43 - R44 - R45 - R46 - R47 - R50 - R51 - R52 - R53 - R61 - R62 - R67 - R68 - R69 - R70 - R71 - R72 - R73 - R74 - R75 - R76 - R77 - R80 - R81 - R82 - R83 - R84 - R85 - currencycloud nullable: true description: The return code. For ACH returns, this is the required ACH return code. reason: type: string nullable: true description: >- An optional description of the reason for the return. This is for internal usage and will not be transmitted to the bank.” date_of_death: type: string nullable: true format: date description: If the return code is `R14` or `R15` this is the date the deceased counterparty passed away. additional_information: type: string nullable: true description: >- Some returns may include additional information from the bank. In these cases, this string will be present. data: type: object nullable: true description: The raw data from the return file that we get from the bank. corrections: type: object nullable: true properties: account_number: type: string nullable: true description: >- The updated account number that should replace the one originally used on the outgoing payment. company_id: type: string nullable: true description: The updated company ID that should replace the one originally used on the outgoing payment. company_name: type: string nullable: true description: The updated company name that should replace the one originally used on the outgoing payment. individual_identification_number: type: string nullable: true description: >- The updated individual identification number that should replace the one originally used on the outgoing payment. routing_number: type: string nullable: true description: >- The updated routing number that should replace the one originally used on the outgoing payment. transaction_code: type: string nullable: true description: >- The updated account type code that should replace the one originally used on the outgoing payment. description: >- Only relevant for ACH NOC returns. This is an object containing all of the new and corrected information provided by the bank that was previously incorrect on the original outgoing payment. reconciliation_status: type: string enum: - unreconciled - tentatively_reconciled - reconciled description: One of `unreconciled`, `tentatively_reconciled` or `reconciled`. returnable_type: type: string enum: - incoming_payment_detail description: The type of object being returned. Currently, this may only be incoming_payment_detail. ledger_transaction: $ref: '#/components/schemas/ledger_transaction_create_request' description: >- Specifies a ledger transaction object that will be created with the return. If the ledger transaction cannot be created, then the return creation will fail. The resulting ledger transaction will mirror the status of the return. required: - returnable_id - returnable_type reversal: 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 status: type: string enum: - cancelled - completed - failed - pending - processing - returned - sent description: The current status of the reversal. payment_order_id: type: string format: uuid nullable: true description: The ID of the relevant Payment Order. transaction_ids: type: array items: type: string format: uuid nullable: true description: The ID of the relevant Transaction or `null`. ledger_transaction_id: type: string format: uuid nullable: true description: The ID of the ledger transaction linked to the reversal. 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. reason: type: string enum: - duplicate - incorrect_amount - incorrect_receiving_account - date_earlier_than_intended - date_later_than_intended description: The reason for the reversal. internal_account_id: type: string format: uuid nullable: true description: The ID of the relevant Internal Account. reconciliation_status: type: string enum: - unreconciled - tentatively_reconciled - reconciled description: One of `unreconciled`, `tentatively_reconciled` or `reconciled`. additionalProperties: false minProperties: 13 required: - id - object - live_mode - created_at - updated_at - status - payment_order_id - transaction_ids - ledger_transaction_id - metadata - reason - internal_account_id - reconciliation_status reversal_create_request: type: object properties: reason: type: string enum: - duplicate - incorrect_amount - incorrect_receiving_account - date_earlier_than_intended - date_later_than_intended description: >- The reason for the reversal. Must be one of `duplicate`, `incorrect_amount`, `incorrect_receiving_account`, `date_earlier_than_intended`, `date_later_than_intended`. 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. ledger_transaction: $ref: '#/components/schemas/ledger_transaction_create_request' description: >- Specifies a ledger transaction object that will be created with the reversal. If the ledger transaction cannot be created, then the reversal creation will fail. The resulting ledger transaction will mirror the status of the reversal. required: - reason routing_detail: 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 discarded_at: type: string format: date-time nullable: true routing_number: type: string description: The routing number of the bank. 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 - mx_bank_identifier - my_branch_code - nz_national_clearing_code - pl_national_clearing_code - se_bankgiro_clearing_code - sg_interbank_clearing_code - swift - za_national_clearing_code description: >- The type of routing number. See https://docs.moderntreasury.com/platform/reference/routing-detail-object for more details. 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 nullable: true description: >- If the routing detail is to be used for a specific payment type this field will be populated, otherwise null. bank_name: type: string description: The name of the bank. bank_address: $ref: '#/components/schemas/address' additionalProperties: false minProperties: 11 required: - id - object - live_mode - created_at - updated_at - discarded_at - routing_number - routing_number_type - payment_type - bank_name - bank_address routing_detail_create_request: type: object properties: routing_number: type: string description: The routing number of the bank. 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 - mx_bank_identifier - my_branch_code - nz_national_clearing_code - pl_national_clearing_code - se_bankgiro_clearing_code - sg_interbank_clearing_code - swift - za_national_clearing_code description: >- The type of routing number. See https://docs.moderntreasury.com/platform/reference/routing-detail-object for more details. 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 nullable: true description: >- If the routing detail is to be used for a specific payment type this field will be populated, otherwise null. required: - routing_number - routing_number_type routing_number_lookup_request: type: object properties: routing_number: type: string description: The routing number of the bank. routing_number_type: type: string enum: - aba - au_bsb - ca_cpa - gb_sort_code - in_ifsc - nz_national_clearing_code - se_bankgiro_clearing_code - swift - za_national_clearing_code description: >- The type of routing number. See https://docs.moderntreasury.com/platform/reference/routing-detail-object for more details. In sandbox mode we currently only support `aba` and `swift` with routing numbers '123456789' and 'GRINUST0XXX' respectively. supported_payment_types: type: array items: 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 maxItems: 32 example: - 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: >- An array of payment types that are supported for this routing number. This can include `ach`, `wire`, `rtp`, `sepa`, `bacs`, `au_becs`, and 'fednow' currently. bank_name: type: string description: The name of the bank. bank_address: $ref: '#/components/schemas/address_request' description: The address of the bank. sanctions: type: object description: >- An object containing key-value pairs, each with a sanctions list as the key and a boolean value representing whether the bank is on that particular sanctions list. Currently, this includes eu_con, uk_hmt, us_ofac, and un sanctions lists. additionalProperties: true additionalProperties: false minProperties: 5 incoming_payment_detail_create_request: type: object properties: type: type: string enum: - ach - au_becs - bacs - book - check - eft - interac - neft - nz_becs - rtp - sepa - signet - stablecoin - wire - zengin description: One of `ach`, `wire`, `check`. direction: type: string enum: - credit - debit description: One of `credit`, `debit`. amount: type: integer description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. currency: $ref: '#/components/schemas/currency' nullable: true description: Defaults to the currency of the originating account. internal_account_id: type: string format: uuid description: The ID of one of your internal accounts. virtual_account_id: type: string format: uuid nullable: true description: An optional parameter to associate the incoming payment detail to a virtual account. as_of_date: type: string format: date nullable: true description: Defaults to today. description: type: string nullable: true description: Defaults to a random description. subtype: type: string nullable: true description: >- An additional layer of classification for the type of incoming payment detail, e.g. `ethereum` for a `stablecoin` type. data: type: object nullable: true description: An object passed through to the simulated IPD that could reflect what a vendor would pass. legal_entity_update_status_request: type: object required: - status properties: status: type: string enum: - active - suspended - denied description: >- The target status for the legal entity. One of `active`, `suspended`, or `denied`. Valid transitions depend on the current status. transaction: 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 discarded_at: type: string format: date-time nullable: true amount: type: integer description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. currency: $ref: '#/components/schemas/currency' description: Currency that this transaction is denominated in. direction: type: string description: Either `credit` or `debit`. vendor_description: type: string nullable: true description: >- The transaction detail text that often appears in on your bank statement and in your banking portal. vendor_code: type: string nullable: true description: >- When applicable, the bank-given code that determines the transaction's category. For most banks this is the BAI2/BTRS transaction code. vendor_code_type: type: string enum: - bai2 - banking_circle - bankprov - bnk_dev - cleartouch - coinbase_prime - column - cross_river - currencycloud - dc_bank - dwolla - evolve - fake_vendor - goldman_sachs - iso20022 - jpmc - modern_treasury - mx - paxos - paypal - pnc - signet - silvergate - swift - us_bank - user - western_alliance nullable: true description: >- The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`, `bnk_dev`, `cleartouch`, `currencycloud`, `cross_river`, `dc_bank`, `dwolla`, `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `signet`, `silvergate`, `swift`, `us_bank`, or others. vendor_id: type: string nullable: true description: An identifier given to this transaction by the bank. as_of_date: type: string nullable: true format: date description: The date on which the transaction occurred. as_of_time: type: string nullable: true format: time description: >- The time on which the transaction occurred. Depending on the granularity of the timestamp information received from the bank, it may be `null`. as_of_timezone: type: string nullable: true description: >- The timezone in which the `as_of_time` is represented. Can be `null` if the bank does not provide timezone info. internal_account_id: type: string format: uuid description: The ID of the relevant Internal Account. 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 posted: type: boolean description: This field will be `true` if the transaction has posted to the account. vendor_customer_id: type: string nullable: true description: An identifier given to this transaction by the bank, often `null`. reconciled: type: boolean description: >- This field will be `true` if a transaction is reconciled by the Modern Treasury system. This means that it has transaction line items that sum up to the transaction's amount. details: type: object additionalProperties: type: string description: >- This field contains additional information that the bank provided about the transaction. This is structured data. Some of the data in here might overlap with what is in the `vendor_description`. For example, the OBI could be a part of the vendor description, and it would also be included in here. The attributes that are passed through the details field will vary based on your banking partner. Currently, the following keys may be in the details object: `originator_name`, `originator_to_beneficiary_information`. 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 - other description: >- The type of the transaction. Examples could be `card, `ach`, `wire`, `check`, `rtp`, `book`, or `sen`. foreign_exchange_rate: $ref: '#/components/schemas/foreign_exchange_rate' nullable: true description: Associated serialized foreign exchange rate information. custom_identifiers: type: object description: An object containing key-value pairs, each with a custom identifier as the key and a string value. additionalProperties: type: string example: key: value foo: bar modern: treasury additionalProperties: false minProperties: 23 required: - id - object - live_mode - created_at - updated_at - discarded_at - amount - currency - direction - vendor_code - vendor_code_type - vendor_id - as_of_date - as_of_time - as_of_timezone - internal_account_id - metadata - posted - vendor_customer_id - reconciled - type - foreign_exchange_rate - custom_identifiers transaction_update_request: type: object properties: metadata: type: object additionalProperties: type: string description: >- Additional data in the form of key-value pairs. Pairs can be removed by passing an empty string or `null` as the value. transaction_create_request: type: object properties: amount: type: integer description: Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. direction: type: string description: Either `credit` or `debit`. vendor_description: type: string nullable: true description: >- The transaction detail text that often appears in on your bank statement and in your banking portal. vendor_code: type: string description: >- When applicable, the bank-given code that determines the transaction's category. For most banks this is the BAI2/BTRS transaction code. nullable: true vendor_code_type: type: string description: >- The type of `vendor_code` being reported. Can be one of `bai2`, `bankprov`, `bnk_dev`, `cleartouch`, `currencycloud`, `cross_river`, `dc_bank`, `dwolla`, `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `signet`, `silvergate`, `swift`, `us_bank`, or others. nullable: true vendor_customer_id: type: string description: An identifier given to this transaction by the bank, often `null`. nullable: true as_of_date: type: string nullable: true format: date description: The date on which the transaction occurred. internal_account_id: type: string format: uuid description: The ID of the relevant Internal Account. 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 posted: type: boolean description: This field will be `true` if the transaction has posted to the account. 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 - other description: >- The type of the transaction. Examples could be `card, `ach`, `wire`, `check`, `rtp`, `book`, or `sen`. nullable: true required: - amount - direction - vendor_code - vendor_code_type - as_of_date - internal_account_id transaction_line_item: 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 discarded_at: type: string format: date-time nullable: true type: type: string enum: - originating - receiving description: >- Indicates whether the line item is `originating` or `receiving` (see https://www.moderntreasury.com/journal/beginners-guide-to-ach for more). transactable_type: type: string enum: - incoming_payment_detail - payment_order - payment_order_attempt - return - reversal nullable: true description: If a matching object exists in Modern Treasury, the type will be populated here, otherwise `null`. transactable_id: type: string nullable: true description: If a matching object exists in Modern Treasury, the ID will be populated here, otherwise `null`. amount: type: integer description: >- If a matching object exists in Modern Treasury, `amount` will be populated. Value in specified currency's smallest unit (taken from parent Transaction). description: type: string description: >- If no matching object is found, `description` will be a free-form text field describing the line item. This field may contain personally identifiable information (PII) and is not included in API responses by default. Learn more about changing your settings at https://docs.moderntreasury.com/reference/personally-identifiable-information. counterparty_id: type: string nullable: true description: The ID for the counterparty for this transaction line item. expected_payment_id: type: string nullable: true description: The ID of the reconciled Expected Payment, otherwise `null`. transaction_id: type: string description: The ID of the parent transaction. reconciliation_group_id: type: string nullable: true description: The ID of the reconciliation group this line item belongs to, otherwise `null`. reconcilable: type: boolean description: >- Describes whether this line item should be counted towards the corresponding transaction’s reconciliation. additionalProperties: false minProperties: 16 required: - id - object - live_mode - created_at - updated_at - discarded_at - type - transactable_type - transactable_id - amount - description - counterparty_id - expected_payment_id - transaction_id - reconciliation_group_id - reconcilable transaction_line_item_create_request: type: object properties: amount: type: integer description: >- If a matching object exists in Modern Treasury, `amount` will be populated. Value in specified currency's smallest unit (taken from parent Transaction). expected_payment_id: type: string format: uuid description: The ID of the reconciled Expected Payment, otherwise `null`. transaction_id: type: string format: uuid description: The ID of the parent transaction. required: - amount - transaction_id - expected_payment_id virtual_account: 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 discarded_at: type: string format: date-time nullable: true name: type: string description: The name of the virtual account. description: type: string description: An optional free-form description for internal use. nullable: true counterparty_id: type: string format: uuid description: The ID of a counterparty that the virtual account belongs to. Optional. nullable: true internal_account_id: type: string format: uuid description: The ID of the internal account that the virtual account is in. account_details: type: array description: An array of account detail objects. items: $ref: '#/components/schemas/account_detail' routing_details: type: array description: An array of routing detail objects. These will be the routing details of the internal account. items: $ref: '#/components/schemas/routing_detail' debit_ledger_account_id: type: string format: uuid description: >- The ID of a debit normal ledger account. When money enters the virtual account, this ledger account will be debited. Must be accompanied by a credit_ledger_account_id if present. nullable: true credit_ledger_account_id: type: string format: uuid description: >- The ID of a credit normal ledger account. When money enters the virtual account, this ledger account will be credited. Must be accompanied by a debit_ledger_account_id if present. nullable: true ledger_account_id: type: string format: uuid nullable: true description: >- If the virtual account links to a ledger account in Modern Treasury, the id of the ledger account will be populated here. 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 additionalProperties: false minProperties: 16 required: - id - object - live_mode - created_at - updated_at - discarded_at - name - description - counterparty_id - internal_account_id - account_details - routing_details - debit_ledger_account_id - credit_ledger_account_id - ledger_account_id - metadata virtual_account_create_request: type: object properties: name: type: string description: The name of the virtual account. description: type: string description: An optional description for internal use. counterparty_id: type: string format: uuid description: The ID of the counterparty that the virtual account belongs to. internal_account_id: type: string format: uuid description: The ID of the internal account that this virtual account is associated with. account_details: type: array items: $ref: '#/components/schemas/account_detail_create_request' description: An array of account detail objects. routing_details: type: array items: $ref: '#/components/schemas/routing_detail_create_request' description: An array of routing detail objects. debit_ledger_account_id: type: string format: uuid description: >- The ID of a debit normal ledger account. When money enters the virtual account, this ledger account will be debited. Must be accompanied by a credit_ledger_account_id if present. credit_ledger_account_id: type: string format: uuid description: >- The ID of a credit normal ledger account. When money leaves the virtual account, this ledger account will be credited. Must be accompanied by a debit_ledger_account_id if present. ledger_account: $ref: '#/components/schemas/ledger_account_create_request' description: >- Specifies a ledger account object that will be created with the virtual account. The resulting ledger account is linked to the virtual account for auto-ledgering IPDs. metadata: type: object description: Additional data represented as key-value pairs. Both the key and value must be strings. additionalProperties: type: string required: - name - internal_account_id virtual_account_update_request: type: object properties: name: type: string nullable: true counterparty_id: type: string format: uuid ledger_account_id: type: string format: uuid description: The ledger account that you'd like to link to the virtual account. metadata: type: object additionalProperties: type: string 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 nullable: true 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 format: date nullable: true description: The latest date the payment may come in. Format is yyyy-mm-dd date_lower_bound: type: string format: date nullable: true description: The earliest date the payment may come in. Format is yyyy-mm-dd counterparty_id: type: string format: uuid nullable: true description: The ID of the counterparty you expect for this payment custom_identifiers: type: object description: A hash of custom identifiers for this payment nullable: true additionalProperties: type: string additionalProperties: false minProperties: 10 required: - amount_upper_bound - amount_lower_bound - direction - internal_account_id reconciliation_group: 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 additionalProperties: false minProperties: 5 required: - id - object - live_mode - created_at - updated_at accounts_type: type: string enum: - external_accounts - internal_accounts expected_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 nullable: true description: 'One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen, sepa, signet, wire.' external_account_type: type: string enum: - base_wallet - cash - checking - crypto_wallet - ethereum_wallet - general_ledger - loan - non_resident - other - overdraft - polygon_wallet - savings - solana_wallet description: Can be `checking`, `savings` or `other`. payment_order_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 description: >- One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`, `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`. payment_order_subtype: type: string enum: - 0C - 0N - 0S - CCD - CIE - CTX - IAT - PPD - TEL - WEB - au_becs - bacs - base - chats - dk_nets - eft - ethereum - hu_ics - masav - mx_ccen - neft - nics - nz_becs - pl_elixir - polygon - ro_sent - se_bankgirot - sepa - sg_giro - sic - sknbi - solana - zengin nullable: true description: >- An additional layer of classification for the type of payment order you are doing. This field is only used for `ach` payment orders currently. For `ach` payment orders, the `subtype` represents the SEC code. We currently support `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`. x-stainless-renameMap: bacs_new_instruction: 0C bacs_cancellation_instruction: 0N bacs_conversion_instruction: 0S transaction_direction: type: string enum: - credit - debit _x-stainless-modelDefPath: $shared.transaction_direction