# Get Customer Deposits

List the EUR bank transfers the user has sent to their virtual IBANs.

## Overview

A deposit is recorded when the bank ramp's `FiatDeposit` webhook reports a transfer to one of the user's [virtual IBANs](https://docs.aureahub.com/docs/payin-initiate.md), so a transfer appears here only after the bank ramp has seen it. The endpoint reads Aurea's records and doesn't call the bank ramp.

`status` is Aurea's word: `pending`, `completed` or `failed`. A deposit becomes `completed` when the bank ramp reports it as settled, and the user then gets a push notification. `noahStatus` is the bank ramp's own (`Pending`, `Settled`, `Failed`), which only moves forward.

- **Under review.** A deposit the bank ramp holds stays `pending` with `noahSubStatus` (`AmlScreening`, `UnderReview`, `Submitted`, `Confirming`) and, when the bank ramp needs documents, `requestForInformation` (`status` `AwaitingCustomer`, `UnderReview`, `Closed` or `Completed`; `type` `Manual` or `ProofOfAddress`). The bank ramp asks the customer by email; there is no API to answer. A value the bank ramp doesn't document is `null`.
- **Refunded.** A rejected deposit is `failed` and `refunds` lists the bank ramp's refunds to the account that sent the money, each with `amount` (exact decimal text), `currency`, `status` (`Pending`, `Successful` or `Failed`) and `requestedAt`.
- `paymentMethodId` is the virtual IBAN's `id` in [Payment Methods](https://docs.aureahub.com/docs/payin-methods.md); `paymentMethodType` how the money came (`BankSepa`, …); `paymentSystemId` the transfer's id in the payment system (IMAD, UETR, trace number).
- The `status` filter accepts `under_review` and `refunded` but no deposit ever has them. `senderName` and `eddReason` are never filled (the bank ramp's sender is personal data Aurea doesn't keep) and come as `""`; `eddRequired` is always `false`.

Results are paginated with `limit` and `offset`, and `fiatAmount` is a JSON number.

Deposits belong to the user's profile in one environment. Pass `isTestnet=true` for the sandbox deposits; without it you get the production ones, and `404` when the user has no profile in that environment.

## Endpoint

### `GET /v1/ramp/bank/payin/deposits`

Authentication: bearer token required.

Returns the fiat deposits of the authenticated user's profile in one environment, newest first, with the bank ramp's status, review, request for information and refunds, and an optional status filter.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | no | pending \| completed \| failed (under_review and refunded are accepted and never match) |
| `limit` | integer | no | Page size (default 20) |
| `offset` | integer | no | Number of deposits to skip (default 0) |
| `isTestnet` | boolean | no | `true` for the sandbox profile; `false` or omitted for production. Any other value returns `400`. |

**Responses**

`200` OK

```json
{
  "deposits": [
    {
      "id": "b1e4c7a2-3d5f-4a8b-9c6e-0f2d4b6a8c13",
      "noahDepositId": "96369c50-7fd3-4222-a76d-1c054e6ea9de",
      "fiatAmount": 10.6,
      "fiatCurrency": "EUR",
      "senderName": "",
      "status": "pending",
      "eddRequired": false,
      "eddReason": "",
      "depositDate": "2026-09-17T08:12:00.000Z",
      "createdAt": "2026-09-17T08:12:30.000Z",
      "paymentMethodId": "3f5b7d9a-1c3e-4a5b-8d7f-9b1d3f5a7c9e",
      "noahStatus": "Pending",
      "noahSubStatus": "UnderReview",
      "requestForInformation": { "status": "AwaitingCustomer", "type": "Manual" },
      "refunds": [],
      "paymentMethodType": "BankSepa",
      "paymentSystemId": "A10050DE67M10F1R23BL00D7KP",
      "updatedAt": "2026-09-17T08:12:30.000Z"
    }
  ],
  "total": 1,
  "limit": 20,
  "offset": 0
}
```

`404` Not onboarded

```json
{ "statusCode": 404, "error": "NotFoundError", "message": "Customer not found" }
```

## Implementation

```javascript
async function listDeposits(token, { status, limit = 20, offset = 0, sandbox = false } = {}) {
  const params = new URLSearchParams({ limit: String(limit), offset: String(offset), isTestnet: String(sandbox) });
  if (status) params.set('status', status);

  const res = await fetch(`https://api.aureahub.com/v1/ramp/bank/payin/deposits?${params}`, {
    headers: { Authorization: `Bearer ${token}` }
  });
  if (res.status === 404) return { deposits: [], total: 0, limit, offset }; // not onboarded yet
  if (!res.ok) throw new Error(`Deposits failed: ${res.status}`);
  return res.json(); // { deposits, total, limit, offset }
}

// e.g. when the app returns to the foreground
const { deposits } = await listDeposits(token);
const inFlight = deposits.filter(d => d.status === 'pending');
const needsCustomer = deposits.filter(d => d.requestForInformation?.status === 'AwaitingCustomer'); // the bank ramp emailed the customer
const refunded = deposits.filter(d => d.refunds.length > 0);
```

---

Web version: https://docs.aureahub.com/#payin-deposits
