# Blockchain Off-Ramp Transfers
> Blockchain Off-Ramp Transfers move funds from a Blockchain Address to an Account. They're automatically created when funds land in a Blockchain Address.

[Events](https://increase.com/documentation/events.md) will be generated for this resource. The possible event categories are: `blockchain_offramp_transfer.created` and `blockchain_offramp_transfer.updated`.

## The Blockchain Off-Ramp Transfer object
### Example
```json
{
  "amount": 10000,
  "created_at": "2020-01-31T23:59:59Z",
  "destination_account_id": "account_in71c4amph0vgo2qllky",
  "id": "blockchain_offramp_transfer_sqd2x3ti6u2sy91v696m",
  "initiating_transaction_hash": "0xcd7c2ab9e2075a3be3740c3a1f6e6e2c112e37d6b3f4a15e9e3e5a93b82c2c0a",
  "source_blockchain_address_id": "blockchain_address_tijjpqp9t5d358ehydqi",
  "status": "settled",
  "token": "usdc",
  "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
  "type": "blockchain_offramp_transfer"
}
```
### Attributes
- `amount` (integer)
  The transfer amount in USD cents.

- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was created.

- `destination_account_id` (string)
  The Account the funds were transferred into.

- `id` (string)
  The Blockchain Off-Ramp Transfer's identifier.

- `initiating_transaction_hash` (string)
  The transaction hash of the blockchain transaction that initiated this transfer.

- `source_blockchain_address_id` (string)
  The Blockchain Address from which the transfer originated.

- `status` (enum)
  The lifecycle status of the transfer.
  Cases:
  * `pending_settlement` (The transfer is pending settlement at Increase.)
  * `settled` (The transfer has been settled and funds have been credited.)

- `token` (enum)
  The token that was received.
  Cases:
  * `usdc` (A USD stablecoin issued by Circle.)

- `transaction_id` (string, nullable)
  The Transaction crediting the Account once the transfer is settled.

- `type` (string)
  A constant representing the object's type. For this resource it will always be `blockchain_offramp_transfer`.

## List Blockchain Off-Ramp Transfers
GET /blockchain_offramp_transfers

### Example
```curl
curl \
  --url "${INCREASE_URL}/blockchain_offramp_transfers?destination_account_id=account_in71c4amph0vgo2qllky" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.

- `destination_account_id` (string, optional)
  Filter Blockchain Off-Ramp Transfers to those for the specified Account.

- `source_blockchain_address_id` (string, optional)
  Filter Blockchain Off-Ramp Transfers to those from the specified Blockchain Address.

- `status.in` (array of enums, optional)
  Return results whose value is in the provided list. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
  Cases:
  * `pending_settlement` (The transfer is pending settlement at Increase.)
  * `settled` (The transfer has been settled and funds have been credited.)

- `created_at.after` (string, optional)
  Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.before` (string, optional)
  Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_after` (string, optional)
  Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

- `created_at.on_or_before` (string, optional)
  Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.

### Returns a Blockchain Off-Ramp Transfer List object:
```json
{
  "data": [
    {
      "amount": 10000,
      "created_at": "2020-01-31T23:59:59Z",
      "destination_account_id": "account_in71c4amph0vgo2qllky",
      "id": "blockchain_offramp_transfer_sqd2x3ti6u2sy91v696m",
      "initiating_transaction_hash": "0xcd7c2ab9e2075a3be3740c3a1f6e6e2c112e37d6b3f4a15e9e3e5a93b82c2c0a",
      "source_blockchain_address_id": "blockchain_address_tijjpqp9t5d358ehydqi",
      "status": "settled",
      "token": "usdc",
      "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
      "type": "blockchain_offramp_transfer"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Retrieve a Blockchain Off-Ramp Transfer
GET /blockchain_offramp_transfers/{blockchain_offramp_transfer_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/blockchain_offramp_transfers/blockchain_offramp_transfer_sqd2x3ti6u2sy91v696m" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `blockchain_offramp_transfer_id` (string, required)
  The identifier of the Blockchain Off-Ramp Transfer.

## Sandbox: Create a Blockchain Off-Ramp Transfer
POST /simulations/blockchain_offramp_transfers
> Simulates receiving funds at a [Blockchain Address](#blockchain-addresses). This creates a new Blockchain Off-Ramp Transfer.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/blockchain_offramp_transfers" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "amount": 10000,
    "initiating_transaction_hash": "0xcd7c2ab9e2075a3be3740c3a1f6e6e2c112e37d6b3f4a15e9e3e5a93b82c2c0a",
    "source_blockchain_address_id": "blockchain_address_tijjpqp9t5d358ehydqi"
  }'
```

### Body Parameters
- `amount` (integer, required)
  The transfer amount in USD cents.

- `initiating_transaction_hash` (string, required)
  The transaction hash of the blockchain transaction that initiated this transfer.

- `source_blockchain_address_id` (string, required)
  The identifier of the Blockchain Address that received the funds.

## Sandbox: Settle a Blockchain Off-Ramp Transfer
POST /simulations/blockchain_offramp_transfers/{blockchain_offramp_transfer_id}/settle
> Simulates the settlement of a [Blockchain Off-Ramp Transfer](#blockchain-offramp-transfers). This credits the funds to the associated Account.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/simulations/blockchain_offramp_transfers/blockchain_offramp_transfer_sqd2x3ti6u2sy91v696m/settle" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `blockchain_offramp_transfer_id` (string, required)
  The identifier of the Blockchain Off-Ramp Transfer you wish to settle.