# Releasing Transactions Manually

Use Finix's Settlement Queue to control when to release transactions to Settlements.

For Platforms such as marketplaces or specialized ISVs, there might be a need to control when to release funds to Settlements. For example, you may not release a transaction until the sellers ship goods to buyers or enough trust has been obtained before releasing funds.

Finix offers an easy and streamlined way via API to manage holding onto and releasing funds.

## Settlement Queue Overview

If a Merchant's `settlement_queue_mode` is set to `MANUAL`, Finix will automatically place all transactions (Sales, Fees, Refunds, and ACH Returns) into a Settlement Queue that you can manage. Each transaction will have a `Settlement Queue Entry`.

When a `Settlement Queue Entry` is created, it will not be placed into `Settlement` until the `Settlement Queue Entry` is explicitly released.

## Settlement Queue Entry Auto-Release

Finix requires all Settlement Queue Entries to be released within 30 days of creation.

When an ACH return or refund is received, Finix automatically handles releasing the related entries:

- If the original transaction has **not yet been released**, Finix automatically releases both the original transaction and the ACH return or refund.
- If the original transaction has **already been released**, Finix automatically releases the ACH return or refund.

This same behavior applies to ACH credit returns on an ACH refund.

## Enabling your account to Release Transactions Manually

To enable your account to use our Settlement Queue, contact our support team. We can enable this feature at an Application level for all your merchant or only for select merchants.

## Releasing a Settlement Queue Entry

### Release Timing
Settlement Queue Entries can only be released on or after their `ready_to_settle_at` date. Attempting to release an entry before that date returns the following error: `Unable to Release Entries.`

### Step 1: Fetching a Settlement Entry Queue

To release a `Settlement Queue Entry`, you first need to find the entry you are looking for.

We offer an `entity_id` filter where you can pass in the resource you are looking for or you can instead query all Settlement Queue Entries. For more information, you can view our Settlement Queue API Reference.

```shell
# Fetch Settlement Queue Entries
curl -i -X GET \
  -u USfdccsr1Z5iVbXDyYt7hjZZ:313636f3-fac2-45a7-bff7-a334b93e7bda \
  'https://finix.sandbox-payments-api.com/settlement_queue_entries?entity_id=TRdhp3DszqDKbNvwtn7DDcUi' \
  -H 'Finix-Version: 2022-02-01'
```

### Step 2: Release Settlement Entry Queue

After finding the settlement_queue you are interested in, you then can release the funds based on your business logic.

For example, you may want to wait until someone provides a shipping label before releasing a `Transfer` or a `split_transfer`. Some customers choose to release items in bulk which our API also supports.

```json
# Release Settlement Queue Entries
curl "https://finix.sandbox-payments-api.com/settlement_queue_entries" \
    -u USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
    -H 'Content-Type: application/json' \
    -H 'Finix-Version: 2022-02-01' \
    -X PUT \
    -d '{\n        "ids": [\n            "settlement_queue_entry_3z2B57VFx6tatMwyf5VbZz",\n            "settlement_queue_entry_3zrNVXpNkq87ae9by5dMWd"\n        ],\n        "action": "RELEASE"\n    }'
```

After a Settlement Queue Entry is released, the transaction will be placed into a Settlement. Each settlement will be paid out depending on the Merchant's Payout Settings.

## Enabling a Merchant to Use Settlement Queue

To enable a `Merchant` to use the Settlement Queue, set `settlement_queue_mode: MANUAL` for the desired `Merchant`.

By default, `settlement_queue_mode` is set to `UNSET`.

### Example

To stop a `Merchant` from using the Settlement Queue, set `settlement_queue_mode: UNSET` for that `Merchant`.
