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

# Drains

A liquidation address automatically drains any funds sent to it and distributes those funds as the liquidation address is configured. Each time the address is drained, this creates a drain record.

## Fetching drain history

Example request to fetch the drain history of your liquidation address. Check out the [API reference](/api-reference/liquidation-addresses/get-drain-history-of-a-liquidation-address).

```bash Request theme={null}
curl --request GET \
     --url 'https://api.bridge.xyz/v0/customers/cust_123/liquidation_addresses/addr_123/drains' \
     --header 'Api-Key: <Api-Key>' \
     --header 'accept: application/json'
```

```json Response theme={null}
[{  
  "id": "drain_123",  
  "amount": "1.0",  
  "currency": "usd",  
  "state": "payment_processed",  
  "created_at": "2023-05-05T19:39:14.316Z",
  "destination": {
    "payment_rail": "ethereum",
    "currency": "usdc",
    "to_address": "0xb5a18db2e404fd5d234f1bec969cb071bed86f82",
  },
  "destination_tx_hash": "0x063834efe214f4199b1ad7181ce8c5ced3e15d271c8e866da7c89e86ee629cfb",
  "deposit_tx_hash": "0x39debb5d410baddbae5755a8bb98827722b05f5f0e29e428239bf30fc7af2891"
 },  
 {  
  "id": "drain_456",  
  "amount": "1.0",  
  "currency": "usd",  
  "state": "payment_processed",  
  "created_at": "2023-05-04T18:39:14.316Z",
  "destination": {
    "payment_rail": "ethereum",
    "currency": "usdc",
    "to_address": "0xb5a18db2e404fd5d234f1bec969cb071bed86f82",
  },
  "destination_tx_hash": "0x83f5ec78fdde7c48ad32cf2d7ec151fef578a0b6b123e37211a438521b234628",
  "deposit_tx_hash": "0xe6d166219539d0c875a7a4e0806f43ca117a3aaa42440cf875b6e3398fb09060"
}]
```

## **Additional Fields**

### **Destination**

The `destination` field will also return additional information when available. This information will be available when the transaction has been fully processed. The information available depends on the destination configuration of the Liquidation Address.

**For wires:**

```json theme={null}
{
  "destination": {
    "payment_rail": "wire",
    "currency": "usd",
    "external_account_id": "310f23a7-9d15-4a67-b96f-bfe2acf26b00",
    "imad": "20240701MMASDFO9000528"
  }
}
```

**For ACH:**

```json theme={null}
{
  "destination": {
    "payment_rail": "ach",
    "currency": "usd",
    "external_account_id": "310f23a7-9d15-4a67-b96f-bfe2acf26b00",
    "trace_number": "718268532664263"
  }
}
```

## **Drain States**

The drain state refers to the current state of a drain.

| **State**               | **Description**                                                                                                                                                                                                                                                                |
| :---------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `in_review`             | A temporary state that is rarely triggered. Typically resolves automatically within seconds. If unconfirmed after 24 hours, Bridge will contact the developer with next steps.                                                                                                 |
| `funds_received`        | Acknowledges that Bridge has received your funds and is now processing them on your customer's behalf.                                                                                                                                                                         |
| `payment_submitted`     | Bridge submitted the crypto payment. <br /><br />**Important:** the transaction hash provided at this stage may be preliminary and is not guaranteed to be final. Please use the transaction hash returned in the `payment_processed` state as the finalized transaction hash. |
| `payment_processed`     | The payment has been successfully completed. Funds have reached the destination. Depending on configuration, metadata such as `destination_tx_hash` (on-chain), `imad` (wires), or `trace_number` (ACH) may be included.                                                       |
| `undeliverable`         | Bridge was unable to send the funds. Common reasons include invalid routing/account numbers or unsupported asset types at the destination.                                                                                                                                     |
| `returned`              | The payment was sent but failed, and the funds have been returned to Bridge.                                                                                                                                                                                                   |
| `missing_return_policy` | In order for us to return the crypto deposit, we need you to configure a crypto return policy with us. Please refer [here](/platform/orchestration/more/returns#returning-crypto-deposits).                                                                                    |
| `refunded`              | Funds that were returned have been delivered to the configured crypto return address destination (learn more [here](/platform/orchestration/more/returns#returning-crypto-deposits)).                                                                                          |
| `refund_in_flight`      | A refund has been initiated and is in progress.                                                                                                                                                                                                                                |
| `refund_failed`         | A refund attempt failed.                                                                                                                                                                                                                                                       |
| `error`                 | A problem prevented Bridge from processing the transaction. Manual intervention may be required. Contact Bridge if you haven't already been notified.                                                                                                                          |
| `canceled`              | The transaction has been canceled and queued for return. Reasons may include falling below the minimum route threshold or AML/EFE rejection.                                                                                                                                   |

<Note>
  Please note that a drain will always progress from `funds_received` → `payment_submitted` → `payment_processed`. It can never go backwards.
</Note>
