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.
Request
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'
Response
[{  
  "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:
{
  "destination": {
    "payment_rail": "wire",
    "currency": "usd",
    "external_account_id": "310f23a7-9d15-4a67-b96f-bfe2acf26b00",
    "imad": "20240701MMASDFO9000528"
  }
}
For ACH:
{
  "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.
StateDescription
in_reviewA 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_receivedAcknowledges that Bridge has received your funds and is now processing them on your customer’s behalf.
payment_submittedIndicates that Bridge has sent the payment and is awaiting verification. Timing varies by rail: minutes (Crypto), hours (Wires), or days (ACH Push).
payment_processedThe 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.
undeliverableBridge was unable to send the funds. Common reasons include invalid routing/account numbers or unsupported asset types at the destination.
returnedThe payment was sent but failed, and the funds have been returned to Bridge.
refundedFunds that were returned have been delivered to the configured crypto return address destination (learn more here).
errorA problem prevented Bridge from processing the transaction. Manual intervention may be required. Contact Bridge if you haven’t already been notified.
canceledThe transaction has been canceled and queued for return. Reasons may include falling below the minimum route threshold or AML/EFE rejection.
Please note that a drain will always progress from funds_receivedpayment_submittedpayment_processed. It can never go backwards.