Modules
A complete, production-grade Elixir client for the Mercury Banking API.
The base exception for Mercury HTTP API errors that don't map to a more specific exception (e.g. HTTP 403 Forbidden, or any unrecognised status).
A Mercury bank account.
A monthly bank statement for an account.
The Mercury Accounts API — bank accounts, cards, statements, and sending money from an account.
A file attachment with a short-lived presigned download URL.
The Mercury Attachments API — file attachment metadata and download URLs.
Raised for HTTP 401 Unauthorized responses — the API key is missing or invalid.
A Mercury debit or credit card.
Converts the (snake_case, idiomatic-Elixir) keys of maps and keyword lists
you pass to create/update functions into the camelCase keys the
Mercury API expects, recursively.
The Mercury Categories API — expense categories.
An expense category.
Holds configuration for talking to the Mercury Banking API and is passed
as the first argument to every function in Mercury.Accounts,
Mercury.Transactions, and the other resource modules.
Raised for HTTP 409 Conflict responses (e.g. a reused idempotencyKey).
The Mercury Credit API — credit accounts.
A Mercury credit account (charge card / line of credit).
A Mercury customer (accounts-receivable contact).
The Mercury Customers API — accounts-receivable customers.
Classification helpers for Mercury exceptions — mirrors errors.As style
checks from the reference Go SDK, adapted to pattern matching.
A Mercury audit-log event.
The Mercury Events API — an audit log of account and org changes.
Both legs (debit and credit) of a completed internal transfer.
A Mercury accounts-receivable invoice.
A file attached to an invoice.
A line item on an invoice.
The Mercury Invoices API — accounts-receivable invoices.
Wraps a low-level transport failure (connection refused, DNS failure, etc).
Raised for HTTP 404 Not Found responses.
Helpers for Mercury's OAuth2 authorization flow (partner integrations).
The response from a successful OAuth2 token exchange.
The Mercury Organization API — the org tied to the API token, and partner onboarding.
The Mercury organisation (business entity) associated with the API token.
A single page of results from a list/2 call, along with cursors for
fetching the next or previous page.
Builds lazy, auto-paginating Streams over Mercury list endpoints.
Mercury payment and transfer APIs: internal transfers between accounts in the same org, and send-money requests that require approval.
Normalizes the keyword lists / maps passed as list-endpoint filters into a
clean keyword list suitable for Req's :params option: nil values are
dropped (matching the reference SDK's omitempty semantics) and atoms are
stringified.
Raised for HTTP 429 Too Many Requests responses.
A Mercury payment recipient.
A tax form attached to a recipient.
The Mercury Recipients API — payment recipients and their tax form attachments.
Controls retry behaviour for transient failures (rate limiting and 5xx
server errors). Retries use exponential backoff with jitter, and honour
the Retry-After header when Mercury returns one on a 429.
A Simple Agreement for Future Equity (SAFE) request.
The Mercury SAFEs API — Simple Agreements for Future Equity.
A send-money request that requires approval before execution.
Raised for HTTP 5xx Server Error responses. Automatically retried.
Raised when a request exceeds the client's configured timeout.
A Mercury transaction (a payment, deposit, fee, or transfer).
The Mercury Transactions API for cross-account transaction lookups, updates, and attachments.
The Mercury Treasury API — investment accounts, transactions, and statements.
A Mercury Treasury investment account.
A statement for a Treasury account.
A transaction on a Treasury account.
A Mercury platform user.
The Mercury Users API — platform users on the organization.
Raised for HTTP 400 Bad Request responses.
A registered Mercury webhook endpoint.
The Mercury Webhooks API — registering endpoints, and verifying inbound webhook delivery signatures.