Transactions List

Transactions List

Certified

List Mercury transactions

Retrieve transactions for a specific Mercury bank account with automatic offset-based pagination and filtering.

yaml
type: io.kestra.plugin.mercury.transactions.List

List Mercury transactions into memory

yaml
id: list_mercury_transactions
namespace: company.team

tasks:
  - id: list_transactions
    type: io.kestra.plugin.mercury.transactions.List
    apiToken: "{{ secret('MERCURY_API_TOKEN') }}"
    accountId: "d0e567d8-76a7-11e9-a22d-0b33e9de0755"
    fetchType: FETCH

Stream Mercury transactions to internal storage

yaml
id: store_mercury_transactions
namespace: company.team

tasks:
  - id: store_transactions
    type: io.kestra.plugin.mercury.transactions.List
    apiToken: "{{ secret('MERCURY_API_TOKEN') }}"
    accountId: "d0e567d8-76a7-11e9-a22d-0b33e9de0755"
    fetchType: STORE
Properties

Account ID

The unique identifier (UUID) of the Mercury account whose transactions to list.

Mercury API token

API token for authentication with the Mercury API.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaulthttps://api.mercury.com/api/v1

Mercury API base URL

Base URL for the Mercury API. Override for the Mercury sandbox (https://api-sandbox.mercury.com/api/v1). Must use HTTPS, except for loopback hosts (localhost, 127.0.0.1, ::1) during local testing.

End date filter

Latest date to filter transactions. Format: YYYY-MM-DD or ISO 8601 string. Mercury defaults to the current date when omitted.

DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE

Fetch mode

Controls how results are returned: FETCH to return all rows in memory, FETCH_ONE for the first row, STORE to stream records as ION into internal storage, or NONE to skip collecting outputs.

Default1000

Results per page

Maximum number of transactions to return per page. Minimum 1, maximum 1000. Default is 1000.

Possible Values
ASCDESC

Sort order

Sort order for transactions. Allowed values: ASC or DESC. Defaults to DESC in the Mercury API when omitted.

Default100

Maximum pages to retrieve

Safety cap on the number of pages fetched during pagination. Minimum 1. Default is 100.

Start date filter

Earliest date to filter transactions. Format: YYYY-MM-DD or ISO 8601 string. Mercury defaults to 30 days prior to the current date when omitted.

Possible Values
PENDINGSENTCANCELLEDFAILEDREVERSEDBLOCKED

Transaction status filter

Filter transactions by status: PENDING, SENT, CANCELLED, FAILED, REVERSED, or BLOCKED.

The first transaction fetched

The first transaction retrieved. Only populated when fetchType is FETCH_ONE.

Definitions
accountIdstring

Account ID

The external-facing account identifier for the Mercury account that owns this transaction.

amountnumber

Transaction amount

The amount of the transaction in USD. Can be negative for outgoing payments or fees, and positive for incoming deposits.

attachmentsarray
SubTypeobject

Attachments

File attachments associated with the transaction, such as receipts and invoices.

bankDescriptionstring

Bank description

Bank description text as reported on bank statements.

cardIdstring

Card ID

ID of the card behind this transaction, present on card payments and refunds (debit or credit); null otherwise.

categoryDataobject

Category data

Expense category details for transaction classification.

checkNumberstring

Check number

Check number present for check deposits and mailed checks; null otherwise.

compliantWithReceiptPolicyboolean

Compliant with receipt policy

Whether the transaction complies with the company's receipt policy.

counterpartyIdstring

Counterparty ID

The unique identifier for the counterparty.

counterpartyNamestring

Counterparty name

Name of the counterparty involved in the transaction.

counterpartyNicknamestring

Counterparty nickname

Nickname assigned to the counterparty, if any.

createdAtstring
Formatdate-time

Created at

Timestamp when the transaction record was created, in ISO 8601 UTC format.

creditAccountPeriodIdstring

Credit account period ID

ID of the credit account statement period, if applicable.

currencyExchangeInfoobject

Currency exchange info

Information on currency conversions for international transactions.

dashboardLinkstring

Dashboard link

The direct URL to view the transaction in the Mercury dashboard.

detailsobject

Transaction details

Transaction method details such as card info, electronic routing, or wire routing info.

estimatedDeliveryDatestring
Formatdate-time

Estimated delivery date

The estimated delivery timestamp for the transaction, in ISO 8601 UTC format.

externalMemostring

External memo

External memo attached to the payment.

failedAtstring
Formatdate-time

Failed at

Timestamp when the transaction failed, if applicable, in ISO 8601 UTC format.

feeIdstring

Fee ID

ID of the associated fee transaction, if any.

generalLedgerCodeNamestring

General ledger code name

Deprecated GL code name. Preserved for backwards compatibility.

glAllocationsarray
SubTypeobject

General ledger allocations

GL code allocations assigned via accounting software integrations.

hasGeneratedReceiptboolean

Has generated receipt

Whether a receipt was automatically generated.

idstring

Transaction ID

The unique identifier (UUID) for this transaction.

kindstring

Transaction kind

Kind of transaction, such as outgoingPayment, externalTransfer, internalTransfer, or creditCardTransaction.

merchantobject

Merchant details

Merchant information for card transactions, including MCC, merchant ID, and local currency data.

mercuryCategorystring

Mercury category

High-level merchant category assigned by Mercury.

notestring

User note

Internal user note attached to the transaction.

postedAtstring
Formatdate-time

Posted at

Timestamp when the transaction settled and posted to the ledger, in ISO 8601 UTC format.

reasonForFailurestring

Reason for failure

Description of why the transaction failed, if applicable.

relatedTransactionsarray
SubTypeobject

Related transactions

Related transactions such as refunds, fee reversals, or chargebacks.

requestIdstring

Request ID

ID returned from /account/: id/request-send-money if created via a payment request.

statusstring

Transaction status

Current status of the transaction. Possible values: pending, sent, cancelled, failed, reversed, blocked.

trackingNumberstring

Tracking number

Tracking number for wire, RTP, or ACH payments; null otherwise.

The transactions fetched

List of retrieved transactions. Only populated when fetchType is FETCH.

Definitions
accountIdstring

Account ID

The external-facing account identifier for the Mercury account that owns this transaction.

amountnumber

Transaction amount

The amount of the transaction in USD. Can be negative for outgoing payments or fees, and positive for incoming deposits.

attachmentsarray
SubTypeobject

Attachments

File attachments associated with the transaction, such as receipts and invoices.

bankDescriptionstring

Bank description

Bank description text as reported on bank statements.

cardIdstring

Card ID

ID of the card behind this transaction, present on card payments and refunds (debit or credit); null otherwise.

categoryDataobject

Category data

Expense category details for transaction classification.

checkNumberstring

Check number

Check number present for check deposits and mailed checks; null otherwise.

compliantWithReceiptPolicyboolean

Compliant with receipt policy

Whether the transaction complies with the company's receipt policy.

counterpartyIdstring

Counterparty ID

The unique identifier for the counterparty.

counterpartyNamestring

Counterparty name

Name of the counterparty involved in the transaction.

counterpartyNicknamestring

Counterparty nickname

Nickname assigned to the counterparty, if any.

createdAtstring
Formatdate-time

Created at

Timestamp when the transaction record was created, in ISO 8601 UTC format.

creditAccountPeriodIdstring

Credit account period ID

ID of the credit account statement period, if applicable.

currencyExchangeInfoobject

Currency exchange info

Information on currency conversions for international transactions.

dashboardLinkstring

Dashboard link

The direct URL to view the transaction in the Mercury dashboard.

detailsobject

Transaction details

Transaction method details such as card info, electronic routing, or wire routing info.

estimatedDeliveryDatestring
Formatdate-time

Estimated delivery date

The estimated delivery timestamp for the transaction, in ISO 8601 UTC format.

externalMemostring

External memo

External memo attached to the payment.

failedAtstring
Formatdate-time

Failed at

Timestamp when the transaction failed, if applicable, in ISO 8601 UTC format.

feeIdstring

Fee ID

ID of the associated fee transaction, if any.

generalLedgerCodeNamestring

General ledger code name

Deprecated GL code name. Preserved for backwards compatibility.

glAllocationsarray
SubTypeobject

General ledger allocations

GL code allocations assigned via accounting software integrations.

hasGeneratedReceiptboolean

Has generated receipt

Whether a receipt was automatically generated.

idstring

Transaction ID

The unique identifier (UUID) for this transaction.

kindstring

Transaction kind

Kind of transaction, such as outgoingPayment, externalTransfer, internalTransfer, or creditCardTransaction.

merchantobject

Merchant details

Merchant information for card transactions, including MCC, merchant ID, and local currency data.

mercuryCategorystring

Mercury category

High-level merchant category assigned by Mercury.

notestring

User note

Internal user note attached to the transaction.

postedAtstring
Formatdate-time

Posted at

Timestamp when the transaction settled and posted to the ledger, in ISO 8601 UTC format.

reasonForFailurestring

Reason for failure

Description of why the transaction failed, if applicable.

relatedTransactionsarray
SubTypeobject

Related transactions

Related transactions such as refunds, fee reversals, or chargebacks.

requestIdstring

Request ID

ID returned from /account/: id/request-send-money if created via a payment request.

statusstring

Transaction status

Current status of the transaction. Possible values: pending, sent, cancelled, failed, reversed, blocked.

trackingNumberstring

Tracking number

Tracking number for wire, RTP, or ACH payments; null otherwise.

The total number of transactions returned

For FETCH this matches the size of rows, for FETCH_ONE 0 or 1, for STORE the count of stored records, and 0 for NONE.

Formaturi

URI of stored results

The URI of the file containing ION-formatted records in internal storage. Only populated when fetchType is STORE.