> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zyf.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# getDepositStatus

> Fetch the custody handover, credit, and allocation lifecycle for a registered deposit.

Fetch the current lifecycle state for a deposit registered via [`logDeposit`](https://docs.zyf.ai/docs/sdk/api/log-deposit) or [`sendDeposit`](https://docs.zyf.ai/docs/sdk/api/send-deposit).

The SDK calls `GET /api/v1/users/deposits/{depositId}/v2`, which includes allocation fields. The legacy `GET /api/v1/users/deposits/{depositId}` route returns handover and credit only.

Use this for one-off checks. To await credit after `handover_pending`, use [`waitForDepositCredit`](https://docs.zyf.ai/docs/sdk/api/wait-for-deposit-credit). To await allocation after credit, use [`waitForDepositPosition`](https://docs.zyf.ai/docs/sdk/api/wait-for-deposit-position).

Requires `connectAccount()` on the **same** `ZyfaiSDK` instance.

## Signature

```typescript theme={null}
getDepositStatus(depositId: string): Promise<DepositLifecycleResponse>
```

## Parameters

| Parameter | Type | Required | Description |
| - | - | :-: | - |
| `depositId` | `string` | ✅ | Lifecycle UUID from `logDeposit().deposit.id` or `sendDeposit().registration.id` |

## Returns

Current deposit lifecycle state.

## Return Type

```typescript theme={null}
type DepositLifecycleStatus =
  | "handover_pending"
  | "credited"
  | "recovered_to_eoa"
  | "position_pending"
  | "positioned";

type DepositPositionOutcome =
  | "pending"
  | "positioned"
  | "skipped"
  | "failed";

interface DepositLifecycleResponse {
  id: string;
  status: DepositLifecycleStatus;
  balanceCredited: boolean;
  statusUrl: string;
  positionOutcome?: DepositPositionOutcome | null;
  crosschain?: boolean;
  executionTxHash?: string | null;
}
```

| Field | Description |
| - | - |
| `status` | Custody, credit, and allocation lifecycle stage |
| `balanceCredited` | Whether this deposit has been added to the Safe balance |
| `statusUrl` | Authenticated API path for polling (used internally by the SDK) |
| `positionOutcome` | Allocation result when rebalance has run (`skipped` if deploy was not attempted) |
| `crosschain` | Whether this deposit used a crosschain path |
| `executionTxHash` | Bridge or execution tx when `crosschain` is true |

> [!NOTE]
>
> Treat a deposit as spendable on the Safe when `balanceCredited === true` and `status !== "recovered_to_eoa"`. `handover_pending` means the transfer is recorded but not yet credited. `position_pending` / `positioned` mean credit completed and allocation may still be in progress or done.

## Example

```typescript theme={null}
const result = await sdk.logDeposit(8453, txHash, "100000000");

const status = await sdk.getDepositStatus(result.deposit.id);
console.log(status.status);
console.log(status.balanceCredited);

if (status.balanceCredited && status.status !== "recovered_to_eoa") {
  console.log("Deposit is credited on the Safe");
}
```

## Related methods

* [`waitForDepositCredit`](https://docs.zyf.ai/docs/sdk/api/wait-for-deposit-credit) — poll until credited
* [`waitForDepositPosition`](https://docs.zyf.ai/docs/sdk/api/wait-for-deposit-position) — poll until positioned or skipped


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.