Skip to content

Mercury: List invoice payments

Mercury invoices.listInvoicePayments: arguments, response, policy and SDK examples.

← Invoices operations · Get started

Operation mercury.listinvoicepayments

Provider route: GET /ar/invoices/{invoiceId}/payments. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/mercury with npm, or alter-sdk-mercury with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { MercuryIntegration } from "@alter-ai/mercury";
async function execute(input: Parameters<MercuryIntegration["invoices"]["listInvoicePayments"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new MercuryIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.invoices.listInvoicePayments(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_mercury import MercuryIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = MercuryIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.invoices.list_invoice_payments(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.invoiceIdstringRequired within parentID for the invoice.
Format: uuid

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand List invoice payments — response body

Referenced models: List invoice payments — response body

List invoice payments — response body
FieldTypePresenceDescription and constraints
$objectRootThe payments applied to an invoice, oldest first. Payments that were removed
from the invoice are not included.
paymentsarrayRequired within parentThe payments applied to the invoice.
payments[]ModelEach itemExpand List invoice payments — response body — payments item

Referenced models: List invoice payments — response body — payments item

List invoice payments — response body — payments item
FieldTypePresenceDescription and constraints
$objectRootA payment applied to an invoice. Exactly one of @transaction@, @cardCharge@,
or @manual@ is present, matching @type@.
amountJSONRequired within parent
amount (allOf 1)ModelAll variants applyExpand Request to send money — response body — amount value
amount (allOf 2)JSONAll variants applyThe amount of the payment applied to this invoice.
appliedDateJSONRequired within parent
appliedDate (allOf 1)stringAll variants applyFormat: date
appliedDate (allOf 2)JSONAll variants applyThe date the payment was applied to the invoice. For payments marked as paid or matched in
Mercury, the date entered then; otherwise the date Mercury received the payment.
cardChargeJSONOptional
cardCharge (anyOf 1)JSONAlternative
cardCharge (anyOf 1) (allOf 1)ModelAll variants applyExpand List invoice payments — response body — payments item card Charge Present when @type@ is @card Charge@ brand, last4
cardCharge (anyOf 1) (allOf 2)JSONAll variants applyPresent when @type@ is @cardCharge@.
cardCharge (anyOf 2)nullAlternative
createdAtJSONRequired within parent
createdAt (allOf 1)stringAll variants applyFormat: yyyy-mm-ddThh:MM:ssZ
createdAt (allOf 2)JSONAll variants applyWhen the payment was recorded.
currencyCodeJSONRequired within parent
currencyCode (allOf 1)stringAll variants apply
currencyCode (allOf 2)JSONAll variants applyISO 4217 currency code of the amount. Always "USD".
idJSONRequired within parent
id (allOf 1)stringAll variants applyID for the invoice payment.
Format: uuid
id (allOf 2)JSONAll variants applyThe ID of the payment.
manualJSONOptional
manual (anyOf 1)JSONAlternative
manual (anyOf 1) (allOf 1)ModelAll variants applyExpand List invoice payments — response body — payments item manual Present when @type@ is @manual@ method
manual (anyOf 1) (allOf 2)JSONAll variants applyPresent when @type@ is @manual@.
manual (anyOf 2)nullAlternative
transactionJSONOptional
transaction (anyOf 1)JSONAlternative
transaction (anyOf 1) (allOf 1)ModelAll variants applyExpand List invoice payments — response body — payments item transaction Present when @type@ is @transaction@ counterparty Name, id, kind, matched By, status
transaction (anyOf 1) (allOf 2)JSONAll variants applyPresent when @type@ is @transaction@.
transaction (anyOf 2)nullAlternative
typeJSONRequired within parent
type (allOf 1)stringAll variants applyKnown values: transaction, cardCharge, manual
type (allOf 2)JSONAll variants applyWhere the money for the payment came from.

Referenced models: Request to send money — response body — amount value, List invoice payments — response body — payments item card Charge Present when @type@ is @card Charge@ brand, last4, List invoice payments — response body — payments item manual Present when @type@ is @manual@ method, List invoice payments — response body — payments item transaction Present when @type@ is @transaction@ counterparty Name, id, kind, matched By, status

Request to send money — response body — amount value
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)numberAlternativeA positive dollar amount with at least 1 cent.
Format: double
Minimum: 0.01
$ (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
List invoice payments — response body — payments item card Charge Present when @type@ is @card Charge@ brand, last4
FieldTypePresenceDescription and constraints
$objectRootDetails of a card payment made by your customer through the invoice.
brandJSONRequired within parent
brand (allOf 1)stringAll variants applyKnown values: amex, cartesBancaires, diners, discover, eftposAu, girocard, jaywan, jcb, link, mastercard, troy, unionpay, visa, unknown
brand (allOf 2)JSONAll variants applyThe brand of the card that was charged.
last4stringRequired within parentThe last 4 digits of the card that was charged.
List invoice payments — response body — payments item manual Present when @type@ is @manual@ method
FieldTypePresenceDescription and constraints
$objectRootDetails of a payment received outside Mercury and marked as paid.
methodJSONRequired within parent
method (allOf 1)stringAll variants applyKnown values: cash, check, card, other
method (allOf 2)JSONAll variants applyHow the payment was made.
List invoice payments — response body — payments item transaction Present when @type@ is @transaction@ counterparty Name, id, kind, matched By, status
FieldTypePresenceDescription and constraints
$objectRootDetails of a payment made by a transaction in one of your Mercury accounts.
counterpartyNamestringRequired within parentThe name of the party that sent the money.
idJSONRequired within parent
id (allOf 1)stringAll variants applyID for this transaction
Format: uuid
id (allOf 2)JSONAll variants applyThe ID of the transaction. For payments that Mercury routed to the invoice's
destination account, this is the ID of the routing transfer.
kindJSONRequired within parent
kind (allOf 1)ModelAll variants applyExpand Get transaction by ID — response body — kind string
kind (allOf 2)JSONAll variants applyThe kind of the transaction that paid the invoice.
matchedByJSONRequired within parent
matchedBy (allOf 1)stringAll variants applyKnown values: automatic, manual
matchedBy (allOf 2)JSONAll variants applyWhether the transaction was matched to the invoice automatically or by a user.
statusJSONRequired within parent
status (allOf 1)stringAll variants applyKnown values: pending, sent, cancelled, failed, reversed, blocked
status (allOf 2)JSONAll variants applyThe status of the transaction that paid the invoice.

Referenced models: Get transaction by ID — response body — kind string

Get transaction by ID — response body — kind string
FieldTypePresenceDescription and constraints
$stringRootKnown values: externalTransfer, internalTransfer, outgoingPayment, creditCardCredit, creditCardTransaction, debitCardCredit, debitCardTransaction, cardInternationalTransactionFee, cardInternationalTransactionFeeRebate, cardInternationalTransactionFeeReversal, cardInternationalTransactionFeeRebateReversal, incomingDomesticWire, checkDeposit, incomingInternationalWire, treasuryTransfer, currencyCloudReturn, wireFee, personalBankingSubscriptionFee, billingEngineSubscriptionFee, expenseReimbursement, exogenousWireDrawdown, interestPayment, other

SDK function policy ID: mercury.listinvoicepayments. Catalog operation: mercury:listInvoicePayments. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.