# monzo_client v1.0.0 - Table of Contents

> A complete, production-grade Elixir client for the Monzo API: OAuth2, Accounts, Balance, Pots, Transactions, Feed Items, Attachments, Transaction Receipts, and Webhooks. Zero required dependencies.

## Pages

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

## Modules

- [Monzo](Monzo.md): A complete, production-grade Elixir client for the [Monzo API](https://docs.monzo.com).
- [Monzo.Auth.Token](Monzo.Auth.Token.md): The response returned by Monzo's token endpoint.
- [Monzo.Auth.WhoAmI](Monzo.Auth.WhoAmI.md): Metadata Monzo returns about the currently configured access token.
- [Monzo.Balances](Monzo.Balances.md): The Balance resource: reading an account's current balance.
- [Monzo.Merchant.Address](Monzo.Merchant.Address.md): Physical address of a transaction's merchant.
- [Monzo.Receipt.Item](Monzo.Receipt.Item.md): A single line item on a receipt.
- [Monzo.Receipt.Merchant](Monzo.Receipt.Merchant.md): Optional merchant metadata for a receipt.
- [Monzo.Receipt.Payment](Monzo.Receipt.Payment.md): One payment method applied to the receipt.
- [Monzo.Receipt.SubItem](Monzo.Receipt.SubItem.md): A nested line item within an `Item` (e.g. modifiers on a dish).
- [Monzo.Receipt.Tax](Monzo.Receipt.Tax.md): A tax line applied to the receipt as a whole.

- Resources
  - [Monzo.Accounts](Monzo.Accounts.md): The Accounts resource: listing the user's Monzo current accounts.
  - [Monzo.Attachments](Monzo.Attachments.md): The Attachments resource: the three-step flow of requesting an upload
URL, uploading raw bytes to storage, and registering the file against a
transaction.

  - [Monzo.Auth](Monzo.Auth.md): The OAuth2 authentication flow: building the authorization URL,
exchanging a code, refreshing tokens, logging out, and token introspection.
  - [Monzo.Balance](Monzo.Balance.md): Balance information for a Monzo account.
  - [Monzo.FeedItems](Monzo.FeedItems.md): The Feed Items resource: posting items to a user's Monzo feed.
  - [Monzo.Pots](Monzo.Pots.md): The Pots resource: listing pots and moving money into/out of them.
  - [Monzo.Receipts](Monzo.Receipts.md): The Transaction Receipts resource. Unlike every other Monzo resource,
this endpoint is JSON-bodied rather than form-encoded.

  - [Monzo.Transactions](Monzo.Transactions.md): The Transactions resource: retrieving, listing (with lazy pagination),
and annotating transactions.

  - [Monzo.Webhooks](Monzo.Webhooks.md): The Webhooks resource: registering callback URLs, and parsing/validating
inbound event deliveries.

- Entities
  - [Monzo.Account](Monzo.Account.md): A Monzo current account.
  - [Monzo.Attachment](Monzo.Attachment.md): A file registered against a transaction.
  - [Monzo.Merchant](Monzo.Merchant.md): Merchant details for a transaction, present when expanded.
  - [Monzo.Pot](Monzo.Pot.md): A Monzo savings pot attached to a current account.
  - [Monzo.Receipt](Monzo.Receipt.md): A detailed, itemised receipt attached to a transaction.
  - [Monzo.Transaction](Monzo.Transaction.md): A single ledger entry on a Monzo account.
  - [Monzo.Webhook](Monzo.Webhook.md): A registered callback URL for an account.
  - [Monzo.Webhook.Event](Monzo.Webhook.Event.md): An inbound webhook delivery.

- Errors
  - [Monzo.Error.APIError](Monzo.Error.APIError.md): Raised/returned for any non-2xx HTTP response from the Monzo API.
  - [Monzo.Error.NetworkError](Monzo.Error.NetworkError.md): Raised for network-level failures (DNS, connection refused, etc).
  - [Monzo.Error.TimeoutError](Monzo.Error.TimeoutError.md): Raised when a request exceeds the configured timeout.
  - [Monzo.Error.ValidationError](Monzo.Error.ValidationError.md): Raised for invalid SDK usage caught client-side, before any request is sent.
  - [Monzo.Error.WebhookVerificationError](Monzo.Error.WebhookVerificationError.md): Raised by webhook parsing/verification helpers when a payload cannot be
trusted (malformed JSON, unexpected shape, or an unexpected account id).

- Internals
  - [Monzo.Client](Monzo.Client.md): Immutable client configuration passed to every `Monzo` resource function.
  - [Monzo.HTTP](Monzo.HTTP.md): Core HTTP request engine shared by every resource module: URL/query/body
encoding, bearer auth, jittered exponential-backoff retries on transient
(429/5xx/network) failures, and a single automatic refresh-and-retry on
401s when the client has a token store configured.
  - [Monzo.HTTP.Adapter](Monzo.HTTP.Adapter.md): Behaviour for the low-level HTTP transport used by `Monzo.HTTP`.
  - [Monzo.HTTP.HttpcAdapter](Monzo.HTTP.HttpcAdapter.md): Default Monzo.HTTP.Adapter implementation, built on Erlang's `:httpc`.
  - [Monzo.JSON](Monzo.JSON.md): A small, dependency-free JSON encoder/decoder.
  - [Monzo.Pagination](Monzo.Pagination.md): Generic, lazy pagination built on `Stream.resource/3` for Monzo list
endpoints that are ordered oldest-first and support a `since` cursor
plus a page `limit`.

  - [Monzo.Security](Monzo.Security.md): Small, dependency-free cryptographic helpers used by the OAuth2 flow:
CSRF state token generation and constant-time comparison.

  - [Monzo.TokenStore](Monzo.TokenStore.md): A supervised `GenServer` holding the current access/refresh token pair
for one Monzo user, and performing the actual refresh call.

