Skip to main content
PATCH
Update a payment

Authorizations

api-key
string
header
required

Headers

Melio-Sonar-Token
string

Signed MelioSonar session token from the initiating device, used for risk evaluation; invalid or expired tokens return 400 INVALID_SONAR_TOKEN.

Melio-Entity-Id
string
required

Entity the request operates on — an entity id (ent_<uuid>) or me (the partner's sole entity).

Path Parameters

paymentId
string
required

Body

application/json

Fields that can be changed on a payment before it begins processing. All fields are optional; only supplied fields are updated.

amount
integer

Minor units (cents). Amount changes may be rejected (400) when they are not enabled for your account.

deductionDate
string<date>

The debit/schedule date

deliveryPreference
enum<string>

See CreatePaymentRequest.deliveryPreference. The preference's rail must match the payment's receiving account, and only the values allowed for the payment's originating account are accepted (card-funded ACH/wire payments use same-day-ach / instant-domestic-wire); fast variants remain subject to the per-payment eligibility check and are rejected with 400 when ineligible.

Available options:
standard-ach,
same-day-ach,
rtp,
standard-check,
express-check,
overnight-check,
domestic-wire,
instant-domestic-wire,
virtual-card,
instant-virtual-card,
counterparty-choice,
international-fx,
fast-international-fx,
international-gusd
noteToSelf
string

Payer-private memo, never shown to the recipient

noteToRecipient
string

Note shown to the payment recipient

externalId
string

Your own unique identifier for the resource. Unique per partner per resource type (reusing one returns 409 DUPLICATE_EXTERNAL_ID). Distinct from the Idempotency-Key header, which dedupes the request rather than identifying the resource.

Maximum string length: 255
Pattern: ^[A-Za-z0-9_-]+$
metadata
object

Free-form string key/value pairs stored and returned verbatim, never interpreted by Melio. Up to 500 keys; each key 1 to 40 chars and may not contain square brackets ([ ], reserved for the metadata[key] filter); value ≤100 chars. The whole object must serialize to at most 128KB of JSON. Filterable via metadata[key].

Response

The updated payment.

deliveryPreference
enum<string>
required

Effective delivery preference. Reflects the faster variant when one was applied, otherwise the receiving rail's normal-speed value. Card-funded ACH and wire payments always report the fast name (same-day-ach / instant-domestic-wire) — a card collect is immediate, so those payments deliver at the fast speed.

Available options:
standard-ach,
same-day-ach,
rtp,
standard-check,
express-check,
overnight-check,
domestic-wire,
instant-domestic-wire,
virtual-card,
instant-virtual-card,
counterparty-choice,
international-fx,
fast-international-fx,
international-gusd
fees
object[]
required

The fees charged for this payment. Includes both the originator-side and receiver-side fees; use chargeTo on each item to tell them apart. Always present — an empty array when no fees have been recorded yet (e.g. a freshly created payment). Receiver-side fees appear when the receiver upgraded the payment (see receiverUpgrade): rtp and same-day-ach are netted — deducted from the amount the receiver is paid. An instant-virtual-card upgrade carries no fee.

id
string

Opaque payment id (pay_)

externalId
string

Your own unique identifier for the resource. Unique per partner per resource type (reusing one returns 409 DUPLICATE_EXTERNAL_ID). Distinct from the Idempotency-Key header, which dedupes the request rather than identifying the resource.

Maximum string length: 255
Pattern: ^[A-Za-z0-9_-]+$
amount
integer
currency
string
originatingAccountId
string

Internal originating account id (acct_)

receivingAccountId
string

External receiving account id (acct_)

deductionDate
string<date>
deliveryDate
string<date>
status
enum<string>

While a payment is being reviewed it is reported as scheduled; there is no separate review status.

Available options:
scheduled,
in-progress,
completed,
failed,
canceled
failureReason
object

Why a payment failed. Present only when status is failed, and absent otherwise.

Codes are named after the industry code that produced them - the NACHA return code for an ACH return (R02_ACCOUNT_CLOSED), CARD_ for an ISO 8583 card decline - so a code can be matched against a bank return without a translation table. Failures with no industry code behind them (a returned check, a risk decision) carry a descriptive name instead.

type says which leg of the payment failed, so the same code serves both legs: R02_ACCOUNT_CLOSED under failed-to-collect refers to the payer's account, and under failed-to-deliver to the recipient's. Always read code together with type.

message is human-readable and may be reworded at any time, so do not parse or match on it. New code values may be added within an existing type, so treat an unrecognized code as the generic code for its type (COLLECTION_FAILED, DELIVERY_FAILED or RISK_DECLINED) rather than as an error.

Example:
noteToSelf
string

Payer-private memo, never shown to the recipient

noteToRecipient
string

Note shown to the payment recipient

metadata
object

Free-form string key/value pairs stored and returned verbatim, never interpreted by Melio. Up to 500 keys; each key 1 to 40 chars and may not contain square brackets ([ ], reserved for the metadata[key] filter); value ≤100 chars. The whole object must serialize to at most 128KB of JSON. Filterable via metadata[key].

tracking
object

Delivery tracking for the payment, discriminated by type. Appears once the rail has actually reported something — absent for wire and virtual-card payments, which report nothing, and for payments whose delivery has not reached the rail yet (a scheduled payment never carries it). A present object always holds at least one identifier or timestamp; the remaining fields fill in as the delivery progresses, so treat each of them as optional.

receiverUpgrade
object

Present when the receiving party upgraded the payment from the payment notification Melio sent them. The upgrade itself is the payment's deliveryPreference (rtp, same-day-ach or instant-virtual-card) and receivingAccountId; the upgradedFrom* fields hold what you originally chose. A speed upgrade (rtp, same-day-ach) keeps the receiving account; the others move the payment to an account the receiver added (a bank account in place of a check, or a virtual card). The receiver pays for the upgrade — see the receiver-side entries in fees. An upgraded payment can no longer be updated (409 PAYMENT_UPGRADED_BY_RECEIVER).

createdAt
string<date-time>
updatedAt
string<date-time>