> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing Transactions

> To monitor and manage transactions efficiently, you can retrieve transaction data, add memos, and attach receipts using the available API endpoints.

## Retrieving transactions

For a dashboard-like view, you can [fetch transactions](/reference/transactions/get-all-transactions) by company, user, or card ID. The response includes:

* **Cursor-based pagination** for handling large datasets.
* **Transaction types** categorized by a `type` field.
* **Structured schemas** for different transaction types.

This allows for efficient querying and filtering of transaction records.

### Transaction Types

You can [fetch transactions](/reference/transactions/get-all-transactions) by type as well. Use the `type` param and set below types:

`Fees` - refers to the fees charged through the Rain [Charge User API](/reference/users/charge-a-user-a-custom-fee) or [Charge Company API](/reference/companies/charge-a-company-a-custom-fee)

`Spend` - refers to regular spend transactions of the cardholder.

`Collateral` - refers to transactions related to the user's or company's collateral contract.

`Payment` - refers to payments made (usually via Liquidation event) against the posted balance of the user or company.

## Adding a memo to a transaction

To store additional context about a transaction, update it by passing a value to the `memo` field.

### Example: Updating a transaction with a memo

Use the [update transaction](/reference/transactions/update-a-transaction) endpoint to attach a memo. The memo will be stored and returned with the transaction details.

## Managing transaction receipts

For `spend` transactions, you can attach and retrieve receipts to enhance record-keeping.

### Attaching a receipt

* Use the [upload receipt](/reference/transactions/upload-a-transactions-receipt) endpoint.
* Send the receipt file as a `multipart/form-data` payload under the `receipt` key.

### Fetching a receipt

* Call the [get transaction receipt](/reference/transactions/get-a-transactions-receipt) endpoint.
* The receipt will be returned as an `application/octet-stream`.
