# mercury_client v1.0.0 - Table of Contents

> A complete, production-grade Elixir client for the Mercury Banking API (accounts, transactions, recipients, invoices, payments, treasury, webhooks, and more), with typed errors, retry with backoff, and lazy auto-paginating streams.

## Pages

- [Mercury](readme.md)
- [Changelog](changelog.md)
- [LICENSE](license.md)

## Modules

- [Mercury.Account](Mercury.Account.md): A Mercury bank account.
- [Mercury.AccountStatement](Mercury.AccountStatement.md): A monthly bank statement for an account.
- [Mercury.Attachment](Mercury.Attachment.md): A file attachment with a short-lived presigned download URL.
- [Mercury.Card](Mercury.Card.md): A Mercury debit or credit card.
- [Mercury.CaseConverter](Mercury.CaseConverter.md): 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.
- [Mercury.Category](Mercury.Category.md): An expense category.
- [Mercury.CreditAccount](Mercury.CreditAccount.md): A Mercury credit account (charge card / line of credit).
- [Mercury.Customer](Mercury.Customer.md): A Mercury customer (accounts-receivable contact).
- [Mercury.Event](Mercury.Event.md): A Mercury audit-log event.
- [Mercury.InternalTransferResponse](Mercury.InternalTransferResponse.md): Both legs (debit and credit) of a completed internal transfer.
- [Mercury.Invoice](Mercury.Invoice.md): A Mercury accounts-receivable invoice.
- [Mercury.InvoiceAttachment](Mercury.InvoiceAttachment.md): A file attached to an invoice.
- [Mercury.InvoiceLineItem](Mercury.InvoiceLineItem.md): A line item on an invoice.
- [Mercury.OAuth2Token](Mercury.OAuth2Token.md): The response from a successful OAuth2 token exchange.
- [Mercury.OrganizationInfo](Mercury.OrganizationInfo.md): The Mercury organisation (business entity) associated with the API token.
- [Mercury.Pagination](Mercury.Pagination.md): Builds lazy, auto-paginating `Stream`s over Mercury list endpoints.
- [Mercury.QueryParams](Mercury.QueryParams.md): 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.

- [Mercury.Recipient](Mercury.Recipient.md): A Mercury payment recipient.
- [Mercury.RecipientAttachment](Mercury.RecipientAttachment.md): A tax form attached to a recipient.
- [Mercury.SafeRequest](Mercury.SafeRequest.md): A Simple Agreement for Future Equity (SAFE) request.
- [Mercury.SendMoneyApprovalRequest](Mercury.SendMoneyApprovalRequest.md): A send-money request that requires approval before execution.
- [Mercury.Transaction](Mercury.Transaction.md): A Mercury transaction (a payment, deposit, fee, or transfer).
- [Mercury.TreasuryAccount](Mercury.TreasuryAccount.md): A Mercury Treasury investment account.
- [Mercury.TreasuryStatement](Mercury.TreasuryStatement.md): A statement for a Treasury account.
- [Mercury.TreasuryTransaction](Mercury.TreasuryTransaction.md): A transaction on a Treasury account.
- [Mercury.User](Mercury.User.md): A Mercury platform user.
- [Mercury.Webhook](Mercury.Webhook.md): A registered Mercury webhook endpoint.

- Client
  - [Mercury](Mercury.md): A complete, production-grade Elixir client for the [Mercury Banking
API](https://docs.mercury.com/reference).
  - [Mercury.Client](Mercury.Client.md): 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.
  - [Mercury.Page](Mercury.Page.md): A single page of results from a `list/2` call, along with cursors for
fetching the next or previous page.
  - [Mercury.Retry](Mercury.Retry.md): 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.

- Errors
  - [Mercury.APIError](Mercury.APIError.md): 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).

  - [Mercury.AuthenticationError](Mercury.AuthenticationError.md): Raised for HTTP 401 Unauthorized responses — the API key is missing or invalid.
  - [Mercury.ConflictError](Mercury.ConflictError.md): Raised for HTTP 409 Conflict responses (e.g. a reused `idempotencyKey`).

  - [Mercury.Error](Mercury.Error.md): Classification helpers for Mercury exceptions — mirrors `errors.As` style
checks from the reference Go SDK, adapted to pattern matching.
  - [Mercury.NetworkError](Mercury.NetworkError.md): Wraps a low-level transport failure (connection refused, DNS failure, etc).
  - [Mercury.NotFoundError](Mercury.NotFoundError.md): Raised for HTTP 404 Not Found responses.
  - [Mercury.RateLimitError](Mercury.RateLimitError.md): Raised for HTTP 429 Too Many Requests responses.
  - [Mercury.ServerError](Mercury.ServerError.md): Raised for HTTP 5xx Server Error responses. Automatically retried.
  - [Mercury.TimeoutError](Mercury.TimeoutError.md): Raised when a request exceeds the client's configured timeout.
  - [Mercury.ValidationError](Mercury.ValidationError.md): Raised for HTTP 400 Bad Request responses.

- Resources
  - [Mercury.Accounts](Mercury.Accounts.md): The Mercury Accounts API — bank accounts, cards, statements, and sending
money from an account.

  - [Mercury.Attachments](Mercury.Attachments.md): The Mercury Attachments API — file attachment metadata and download URLs.
  - [Mercury.Categories](Mercury.Categories.md): The Mercury Categories API — expense categories.
  - [Mercury.Credit](Mercury.Credit.md): The Mercury Credit API — credit accounts.
  - [Mercury.Customers](Mercury.Customers.md): The Mercury Customers API — accounts-receivable customers.
  - [Mercury.Events](Mercury.Events.md): The Mercury Events API — an audit log of account and org changes.
  - [Mercury.Invoices](Mercury.Invoices.md): The Mercury Invoices API — accounts-receivable invoices.
  - [Mercury.OAuth2](Mercury.OAuth2.md): Helpers for Mercury's OAuth2 authorization flow (partner integrations).
  - [Mercury.Organization](Mercury.Organization.md): The Mercury Organization API — the org tied to the API token, and partner onboarding.
  - [Mercury.Payments](Mercury.Payments.md): Mercury payment and transfer APIs: internal transfers between accounts in
the same org, and send-money requests that require approval.

  - [Mercury.Recipients](Mercury.Recipients.md): The Mercury Recipients API — payment recipients and their tax form attachments.
  - [Mercury.SafeRequests](Mercury.SafeRequests.md): The Mercury SAFEs API — Simple Agreements for Future Equity.
  - [Mercury.Transactions](Mercury.Transactions.md): The Mercury Transactions API for cross-account transaction lookups,
updates, and attachments.
  - [Mercury.Treasury](Mercury.Treasury.md): The Mercury Treasury API — investment accounts, transactions, and statements.
  - [Mercury.Users](Mercury.Users.md): The Mercury Users API — platform users on the organization.
  - [Mercury.Webhooks](Mercury.Webhooks.md): The Mercury Webhooks API — registering endpoints, and verifying inbound
webhook delivery signatures.

