---
title: "Update Payment Order"
method: PATCH
path: "/payment_orders/{id}"
---

# Update Payment Order

`PATCH /payment_orders/{id}`

## Request

- Base URL: `https://app.moderntreasury.com/api`
- URL: `https://app.moderntreasury.com/api/payment_orders/{id}`
- Auth: HTTP basic

Update a payment order

## Path parameters

- `id` string, required

## Request body

- object
  - `status` string: To cancel a payment order, use `cancelled`. To redraft a returned payment order, use `needs_approval`. To undo approval on a denied or approved payment order, use `needs_approval`.
  - `metadata` string, json: Additional data in the form of key-value pairs. Pairs can be removed by passing an empty string or null as the value.
  - `receiving_account_id` string: When using receiving_account_id, you may pass the id of an external account or an internal account. If an external account is passed, you must pass a value for counterparty_id.
  - `counterparty_id` string: Required when receiving_account_id is passed the ID of an external account.
  - `type` string: One of `ach`, `eft`, `wire`, `check`, `book`, `rtp`, `sepa`, `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.
  - `subtype` string: 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.
  - `amount` integer: 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` string: 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.
  - `originating_account` string
  - `currency` string: Must conform to ISO 4217. Defaults to the currency of the originating account.
  - `process_after` string, date: If present, Modern Treasury will not [process](ref:payment-orders) the payment until after this time. If `process_after` is past the [cutoff](ref:ach-timings) 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](ref:timestamps).
  - `effective_date` string, date: Format is YYYY-MM-DD
  - `priority` string: 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.
  - `description` string: An optional description for internal use.
  - `statement_descriptor` string: 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` string: 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.
  - `purpose` string: For `wire`, this is usually the purpose which is transmitted via the "InstrForDbtrAgt" field in the ISO20022 file. If you are using Currencycloud, this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit [CPA Code](https://www.tdcommercialbanking.com/wbb/help/English/wbwEFTCPACodes.html) that will be attached to the payment.
  - `line_items` object[]: An array of line items that must sum up to the `amount` of the payment order. For more information see [Line Items](ref:line-item-object)
    - `amount` integer
    - `metadata` string, json
    - `description` string
    - `accounting_category_id` string
  - `originating_party_name` string: 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.
  - `originating_party_address` object: Address of the originating party of the payment order. If present, this overwrites the `party_address` on the payment order.
    - `line1` string
    - `line2` string
    - `locality` string
    - `region` string
    - `postal_code` string
    - `country` string
  - `ultimate_originating_party_name` string: 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` string: 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.
  - `charge_bearer` string: The party that will pay the fees for the payment order. Read [Charge Bearer](https://docs.moderntreasury.com/payments/docs/charge-bearer) to learn more about possible values and how they get serialized
  - `nsf_protected` boolean: 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.
  - `ledger_transaction` object: The ledger transaction object which will be either created on the success of this API call if a ledger_transaction_id does not yet exist with this PO, or updated if it does. An update will happen atomically with the update on the PO.
    - `description` string: An optional free-form description for internal use. Maximum of 1000 characters allowed.
    - `metadata` string, json: Metadata to be added to the ledger transaction. Must be a JSON object.
    - `effective_at` string, date-time: Format: ISO8601 to 6 decimal places. Defaults to time of insertion in the DB if not provided
    - `ledger_entries` object[]
      - `amount` integer, required: Supports any int value up to 10³⁶.
      - `direction` string, required: One of `credit` or `debit`.
      - `ledger_account_id` string, required
      - `lock_version` integer: 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 [this guide](https://docs.moderntreasury.com/docs/handling-concurrency#using-the-lock_version-field) for more details. This will trigger synchronous processing, which imposes an additional rate limit on the API. See [Synchronous Ledger Entry Rate Limiting](https://docs.moderntreasury.com/docs/synchronous-ledger-entry-rate-limiting) for details.
      - `pending_balance_amount` object: 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. See [this guide](https://docs.moderntreasury.com/docs/handling-concurrency#locking-on-account-balance) for more details. This will trigger synchronous processing, which imposes an additional rate limit on the API. See [Synchronous Ledger Entry Rate Limiting](https://docs.moderntreasury.com/docs/synchronous-ledger-entry-rate-limiting) for details.
        - `lt` integer
        - `lte` integer
        - `eq` integer
        - `gte` integer
        - `gt` integer
        - `not_eq` integer
      - `posted_balance_amount` object: 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. See [this guide](https://docs.moderntreasury.com/docs/handling-concurrency#locking-on-account-balance) for more details. This will trigger synchronous processing, which imposes an additional rate limit on the API. See [Synchronous Ledger Entry Rate Limiting](https://docs.moderntreasury.com/docs/synchronous-ledger-entry-rate-limiting) for details.
        - `lt` integer
        - `lte` integer
        - `eq` integer
        - `gte` integer
        - `gt` integer
        - `not_eq` integer
      - `available_balance_amount` object: 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. See [this guide](https://docs.moderntreasury.com/docs/handling-concurrency#locking-on-account-balance) for more details. This will trigger synchronous processing, which imposes an additional rate limit on the API. See [Synchronous Ledger Entry Rate Limiting](https://docs.moderntreasury.com/docs/synchronous-ledger-entry-rate-limiting) for details.
        - `lt` integer
        - `lte` integer
        - `eq` integer
        - `gte` integer
        - `gt` integer
        - `not_eq` integer
      - `show_resulting_ledger_account_balances` boolean: If true, response will include the balance of the associated ledger account for the entry and will trigger synchronous processing, which imposes an additional rate limit on the API. See [Synchronous Ledger Entry Rate Limiting](https://docs.moderntreasury.com/docs/synchronous-ledger-entry-rate-limiting) for details.
      - `metadata` string, json

---

[API](https://skmtc.dev/modern-treasury/apis/modern-treasury-api-byob.md) - [All operations](https://skmtc.dev/modern-treasury/apis/modern-treasury-api-byob/llms.txt) - [OpenAPI document](https://skmtc.dev/modern-treasury/apis/modern-treasury-api-byob/revisions/1f24e1f6b3fb?raw)
