# Review deposits and withdrawals

Source: https://docs.settlemint.com/docs/console/asset-lifecycle/custody-gateway-review
Clear, freeze, refuse, return and recover a client's gateway records, follow a deposit that waits for custody, and clear a client flag.

Each gateway has its own records. Its "Deposits" tab lists every deposit with the stage it is in, its "Withdrawals" tab lists every withdrawal request, and its "Unsupported" tab lists coins the gateway does not accept. Most records move on their own. You step in when a record rests at a stage that waits for a person. [The stage reference](https://docs.settlemint.com/docs/api-reference/guides/custody-gateway-stages) lists every stage and who moves it.

## Before you start [#before-you-start]

- The screener actions need a wallet with the screener role, and the gateway manager actions need the gateway manager role. A button your wallet cannot use says "Your wallet needs the screener role for this action." or names the gateway manager role. [Set up the custody gateway](https://docs.settlemint.com/docs/console/asset-lifecycle/custody-gateway-setup) says how roles are granted.
- Some manager actions need a second approver. They then wait on the "Approvals" tab, as [Approve custody gateway changes](https://docs.settlemint.com/docs/console/asset-lifecycle/custody-gateway-approvals) describes.
- Every action asks you to confirm with your wallet verification.

## Find the records that wait for you [#find-the-records-that-wait-for-you]

1. Open "Asset lifecycle", "Custody gateway", then the gateway.
2. Open "Deposits". Search by deposit id or sender, and use "Open" and "Done" to separate records that still move from records that ended.
3. Read the "Stage" column. "Quarantined, awaiting screener", "Frozen", "Mint refused" and "Awaiting custody" are the stages that rest. The "Sender" column says "Sender confirmed" or "Sender unconfirmed".
4. Open "Withdrawals" for requests. Select "Frozen only" to list frozen requests. "In review" and "Awaiting payout address" are the stages that wait for a person or for the client.

Select a row to open its record, or open "Record actions" on the row for the actions that apply to it right now. The menu offers only the actions the record can take.

## Act on a deposit [#act-on-a-deposit]

| Action | Offered when | What happens |
| --- | --- | --- |
| **Confirm sender** | The deposit is open and its sender is not confirmed. | Records who sent the coins. Return, refuse and the return of a custodian's coins need it. |
| **Clear** | The deposit is "Quarantined" and the gateway is not paused. | The screener accepts it. The gateway mints the receipts and forwards the coins. |
| **Refuse** | The deposit is "Quarantined", its sender is confirmed and the gateway is not paused. | The coins go back to the confirmed sender. It cannot be undone. |
| **Freeze** | The deposit is "Quarantined" or "Awaiting custody" and was never frozen. | The record stops moving until the freeze expires or someone unfreezes it. The client's time limits pause while it is held. |
| **Unfreeze** | The freeze is live. | The record goes back to the stage it was frozen from. It is disabled once the record is reported. |
| **Renew freeze** | The record was frozen before, the freeze has ended and the record is not reported. | Moves the expiry out by another full period. |
| **Report** | The freeze is live and the record is not reported. | Marks the record as reported. The freeze no longer expires and nobody can unfreeze it. |
| **Return** | The sender is confirmed, the gateway is not paused, and the deposit is quarantined or holds its coins. | The value goes back to the sender. It cannot be undone. |
| **Recover** | The deposit holds its coins: frozen, or "Mint refused". | The coins move to the "Destination wallet" you name. It cannot be undone. |

Clear, Refuse and Confirm sender are the screener's. Freeze is open to the screener and to gateway managers. Unfreeze, Renew freeze, Report, Return and Recover are the gateway managers'. A "Mint refused" deposit is retried by the keeper once the cause is fixed, and you can return or recover it while it waits.

Frozen is not a separate stored stage. The "Stage" column shows "Frozen" while the freeze is live, and the record keeps the stage it was frozen from underneath.

## Act on a withdrawal [#act-on-a-withdrawal]

| Action | Offered when | What happens |
| --- | --- | --- |
| **Clear** | The request is "In review", needs screening and is not frozen. | The screener clears screening or the travel-rule check. |
| **Approve** | The request is "In review", needs approval and is not frozen. | Gives the gateway managers' approval the request waits for. Once screening is done, the request waits for funds. |
| **Reject** | The request is "In review" or "Awaiting payout address" and not frozen. | The receipts go back to the client. It cannot be undone. |
| **Freeze** | The request is open and was never frozen. | As for a deposit. |
| **Unfreeze**, **Renew freeze**, **Report** | As for a deposit. | As for a deposit. |
| **Return** | The freeze is live. | Returns the frozen request's receipts to the client. |
| **Unfulfil** | The request is "Claimable". | The reserved coins move back to funding and the request waits for funds again. |

Clear, Reject and Freeze are the screener's. Reject and Freeze are also open to gateway managers. Approve, Unfreeze, Renew freeze, Report, Return and Unfulfil are the gateway managers'. The client's own steps, cancel, collect and choosing a payout address, are not in this list.

A request whose automatic payout failed shows "Payout failed" with the reason in its row.

## Follow a deposit that waits for custody [#follow-a-deposit-that-waits-for-custody]

A coin can be set to wait for custody. The gateway then mints the receipts and holds them in the client's wallet until the custodian accepts the coins it forwarded. The deposit rests at "Awaiting custody" and the row says how much is "held for custody".

1. Open the deposit. The "Custodian answer" fact reads "Waiting for the custodian" until the custodian answers.
2. When the custodian accepts, the fact reads "Custodian accepted the coins" and the deposit settles. The keeper reports the answer. You take no step.
3. When the custodian sends the coins back, the fact reads "Custodian sent the coins back". Select "Return to sender" to send the coins to the confirmed sender and burn the held receipts. If the sender is not confirmed, "Confirm sender" first, or use "Recover" to send the coins to a wallet you name. Afterwards the fact reads "Coins returned to sender".

A deposit that is "Awaiting custody" can also be frozen. The freeze does not hide the custodian's answer: a return the keeper reports is still recorded, and the record stays frozen.

## Handle coins the gateway does not accept [#handle-coins-the-gateway-does-not-accept]

Open "Unsupported" for a gateway. It lists coins sent to the gateway that no enabled coin covers, with the status "Unsupported", "Returned", "Enabled", "Recovered" or "Ignored". The actions are "Confirm sender", "Return" to the confirmed sender, "Recover" to a wallet you name, "Enable as deposit" once a gateway manager has enabled the coin, and "Ignore", which closes the record and leaves the coins at the gateway address. "Enable as deposit" opens a new deposit record under the current terms.

## When a client is flagged [#when-a-client-is-flagged]

The gateway flags a client when a verification claim it requires is revoked or expires, or when screening reports a hit on a payout address. The flag freezes what the client could move.

1. Open the gateway's "Overview" tab. The "Client flag" card reads "The client is flagged. New withdrawals are refused until the flag clears." A client without a flag reads "The client is not flagged."
2. Read the flags, each with the verification it concerns by name, its trigger, "Verification revoked", "Verification expired" or "Screening hit", and when it was raised.
3. Read "Actions taken". Each row names an action, "Freeze withdrawal", "Freeze deposit" or "Suspend payout address", the record it hit and its state, "Waiting", "Sent", "Done" or "Refused". The fan-out freezes the client's open deposits and withdrawals and suspends its payout addresses. It also suggests freezing the whole client with the row "Suggest freezing the client", which points to the "Freeze client" button under "Pause, freeze and close". Nothing freezes the whole client until someone selects that button.
4. Clear the flag. When the provider issues or renews the claim, the flag clears on its own and the card says "Verification issued again" or "Verification renewed". To clear a reviewed flag yourself, select "Clear flag" and confirm. Clearing ends the flags listed on the card. A flag raised after the page loaded stays open.
5. Check what came back. Once no flag is open, the frozen withdrawals and deposits unfreeze. Reported records stay frozen, and suspended payout addresses stay suspended. The "After clearing" column says what happened to each: "Unfrozen", "Kept frozen, reported", "Kept suspended" or "Unfreeze refused". A freeze the gateway refused because the record was frozen before reads "Frozen before" once the flag clears, and "Freeze ends" says when an ended freeze ended.
6. If "A freeze ended while the flag stands" shows, open each record marked "Renew freeze" and renew it. Gateway managers approve the renewal with a checker.
7. Reinstate a suspended payout address. Clearing the flag does not do it. A gateway manager reinstates the address after review through the [API](https://docs.settlemint.com/docs/api-reference/guides/custody-gateway-api#reinstate-a-payout-address).

## You should see [#you-should-see]

- The record's "Stage" column shows the stage you expected, and "Submitted. The record updates once the network settles it." appears after each action. Indexed reads can lag the chain by a short moment, so refresh the tab if the stage has not changed.

## Related pages [#related-pages]

- [Set up the custody gateway](https://docs.settlemint.com/docs/console/asset-lifecycle/custody-gateway-setup)
- [Deposit and withdrawal stages](https://docs.settlemint.com/docs/api-reference/guides/custody-gateway-stages)
- [When a client's claim is revoked or expires](https://docs.settlemint.com/docs/concepts/custody-and-signing/custody-gateway#when-a-clients-claim-is-revoked-or-expires)
- [Wallet deposits and withdrawals in the Investor portal](https://docs.settlemint.com/docs/concepts/operating/investor-portal-wallet-transfers)
