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

# Manage money movements

> Accept deposits, create withdrawals, and show users their account history.

Users fund their account by depositing supported tokens on-chain, and can withdraw them again. Both are asynchronous: start them through the API, then confirm the result with webhook events and the resource's status.

> [!NOTE]
>
> The account must be `active` with a `safe_address` before you accept deposits or create withdrawals. See [Onboard a user](https://docs.gnosispay.com/platform-integration/user-onboarding/onboarding).

## Accept deposits

**1. Get the supported tokens**

Call [`GET /accounts/{account_id}/available-tokens`](https://docs.gnosispay.com/api-reference/partner-api/accounts/list-available-deposit-tokens) before showing any deposit options. Only offer the tokens this returns.

**2. Show the deposit address**

Read the deposit address from the account's funding configuration, under `funding.config`. Show it together with the chain the account is configured for.

**3. Tell the user what to send**

Ask the user to send only a supported token, and only on the configured chain. Make this clear in your UI. Tokens sent on the wrong chain, or unsupported tokens, may not be credited.

**4. Listen for events**

Listen for deposit and balance [webhook events](platform-integration/webhook/webhooks).

**5. Reconcile**

Confirm the deposit with [`GET /deposits/{deposit_id}`](https://docs.gnosispay.com/api-reference/partner-api/deposits/get-a-deposit) and the account balance with [`GET /accounts/{account_id}/balances`](https://docs.gnosispay.com/api-reference/partner-api/accounts/get-account-balances).

> [!WARNING]
>
> Don't make funds spendable based on a transaction hash alone. Rely on the deposit status and the current account balance.

## Create a withdrawal

**1. Check the available amount**

Call `GET /accounts/{account_id}/balances`. Use the token's `max_instant_withdraw` as the most the user can withdraw, and don't let them enter more.

**2. Create the withdrawal**

Call `POST /withdrawals` with the account, the token contract address, and the amount in the token's base units.

**3. Store the withdrawal ID**

Store the returned `withdrawal_id` against your user record.

**4. Track the result**

Listen for withdrawal [webhook events](https://docs.gnosispay.com/platform-integration/webhook/webhooks), and confirm the final state with [`GET /withdrawals/{withdrawal_id}`](https://docs.gnosispay.com/api-reference/partner-api/withdrawals/get-a-withdrawal).

> [!TIP]
>
> Token amounts are strings paired with a `decimals` value. Convert between display amounts and base units with a decimal or big-integer library, never with floating-point numbers. For example, 25 USDC with 6 decimals is `"25000000"`.

## Build account activity

The Partner API exposes each activity type as its own resource. There is no combined account-statement endpoint. List each resource with the same `account_id`:

| Activity | Endpoint |
| - | - |
| Card transactions | [`GET /card-transactions?account_id={account_id}`](https://docs.gnosispay.com/api-reference/partner-api/card-transactions/list-card-transactions) |
| Deposits | [`GET /deposits?account_id={account_id}`](https://docs.gnosispay.com/api-reference/partner-api/deposits/list-deposits) |
| Withdrawals | [`GET /withdrawals?account_id={account_id}`](https://docs.gnosispay.com/api-reference/partner-api/withdrawals/list-withdrawals) |

Page through each collection independently. If your product needs one timeline, merge the results in your backend and sort them by `created_at`. Don't share a pagination cursor between resources.

Card transaction items represent changing payment lifecycles rather than raw card-network events. Read [Read card transactions](https://docs.gnosispay.com/platform-integration/cards/card-transactions.md) before mapping their status and `amounts.billing` and `amounts.merchant` fields.

> [!NOTE]
>
> Before any deposit, withdrawal, balance, or activity call, check that the `account_id` belongs to the user making the request.


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