Idempotency-Key header so the request is safe to retry. See Idempotency.
Amounts
All monetary amounts are expressed in minor units (cents). For example,125000 represents $1,250.00. Currency defaults to USD.
Always calculate amounts in cents on your server before sending them to the API. Avoid floating-point arithmetic: represent dollars as integers in your data model and multiply by 100 only at serialization time.
Deduction date vs. delivery date
Two dates appear on every payment:deductionDate- the date you request Melio to debit the originating (internal) account. You provide this when creating the payment.deliveryDate- the estimated date the payee receives funds. Melio calculates and returns this in the response based on the chosendeliveryPreference. You cannot set it directly.
Delivery preferences
Choose adeliveryPreference whose rail matches the receiving account’s type. Sending a preference for the wrong rail is rejected with 400.
Payment delivery speed depends on the
deliveryPreference you choose. When paying from a bank account, ACH-based deliveries are bound by daily ACH cutoff times: a payment submitted before the cutoff on a business day starts processing that day, while one submitted after the cutoff (or on a weekend or bank holiday) rolls over to the next business day. RTP payments are not tied to these cutoffs and can be sent 24/7, including weekends and holidays.Because the exact date depends on the rail, the cutoff, and the submission time, present the user with the estimated delivery date for each available delivery option before creating a payment, using POST /tools/delivery-eta.The preference’s rail must match the receiving account’s
A fast variant that is ineligible is rejected with
type. For example, standard-ach and same-day-ach require an external account with type: ach; standard-check requires type: check. All fast variants (same-day-ach, rtp, express-check, overnight-check, instant-domestic-wire, instant-virtual-card) additionally require an ACH originating account and pass a per-payment eligibility check. A fast variant that is ineligible is rejected with
400 and never silently downgraded. Use the Eligibility tool to check first.Compliance
Every payment requires acompliance object, discriminated by type. It captures the purpose of the transfer and satisfies regulatory requirements. goods-and-services is the only supported type today.
compliance.card object on POST /v2/payments.
Bank-funded (ACH) payments do not need either. This page covers what to send, why the card networks require it, and how to collect it from your users without adding a form to every payment.
Why the card networks need this
A payout funded by a card is not a transfer — it is a card transaction, and the counterparty you are paying is the merchant on it. Under the card networks’ payment-facilitator rules, a transaction presented on behalf of another business must carry that business’s own details: the networks treat the sponsored business as the merchant of record, and require a facilitator to identify it on every authorization. Visa, Mastercard and American Express each require the sub-merchant’s identifier, name, location and category code to be sent with the transaction.The MCC classifies the counterparty’s business
An MCC is a four-digit code describing a business’s primary line of trade -5045 is computers and peripherals, 7372 is prepackaged software, 8931 is accounting and bookkeeping services. Once assigned, it drives three separate decisions that all happen before a payment settles:
- Whether the transaction is allowed at all. Some categories are restricted or outright prohibited on certain card products, and others require the acquirer to register the business with the scheme first. A prohibited MCC is not a fee problem - the payment is declined.
- What the transaction costs. Interchange is priced partly by category, with higher-risk lines of business priced higher. The B2B interchange programs that make commercial-card acceptance economic are conditioned on the right category being present.
- How the issuer treats it. Category drives rewards eligibility, spend controls, and the fraud models an issuer runs at authorization time.
- Some MCCs are prohibited for some card networks. American Express in particular accepts a narrower set than Visa or Mastercard, and a funding source that would otherwise work becomes unavailable for that counterparty.
- A card payment can also fail after it is scheduled, with an invalid-MCC failure from the processor, if the category does not hold up downstream.
The merchant address identifies where that business is
Alongside the name and category, the authorization message carries the merchant’s location the card acceptor’s city, state and country. It is a small field, and it does a lot of work:- It is what the cardholder sees. The acceptor name and location string is the descriptor that lands on the card statement, and it is usually shown to the cardholder verbatim.
- It classifies the transaction as domestic or cross-border, which changes both the rules that apply and the price.
- It feeds fraud scoring at authorization, and it is part of the record if the transaction is later disputed.
What we do with them
Both values are stored against the counterparty, not the individual payment, so they persist for the next payment to the same receiving account:merchantCategoryCodeis saved as the counterparty’s MCC and sent with the card transaction.merchantAddressis saved on the counterparty record.
Collecting this from your users
You need these details once per counterparty, not once per payment. The pattern that works:- Ask when the counterparty is created, alongside the bank details - while the user is already entering the payee’s information and has it in front of them.
- Store both against your own record of that counterparty.
- Replay them on every card payment. They are cheap to send, and resending keeps the record current.
- Only prompt again when something changes - a corrected address, or a category that was rejected.
Editing payments
You can update a payment withPATCH /payments/{id} only while its status is scheduled. The editable fields are:
amount(may be rejected with400when your partner configuration does not allow amount changes, or when the payment spans multiple bills)deductionDatedeliveryPreferencenoteToSelfnoteToRecipientexternalIdmetadata
in-progress, it is locked: a PATCH returns 409 PAYMENT_NOT_EDITABLE, and a cancel returns 409 PAYMENT_NOT_CANCELABLE.
Notes
Two separate note fields let you attach free-text context to a payment:noteToSelf- a payer-private memo, never shown to the recipient. Use it for internal memos or reference numbers.noteToRecipient- shown to the payment recipient. Use it to communicate invoice numbers, PO references, or payment context.
Related
- Payment lifecycle - statuses, transitions, and webhooks.
- Delivery ETA - preview delivery dates.
- Fee Calculator - preview fees.
- Eligibility - check fast-payment eligibility.
- Idempotency - safe payment creation.