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

# End of Day Settlement

> Batch fiat payouts into a single daily settlement instead of paying out each transaction individually.

By default, every offramp transaction triggers an immediate payout to the recipient bank account. **End of Day (EOD) Settlement** changes this behaviour: individual payouts are accumulated throughout the day and settled in a single batch transfer at the end of the business day.

This is useful when a customer receives many small offramp transactions and prefers fewer, consolidated bank transfers rather than one transfer per transaction.

## How It Works

### Without EOD Settlement (default)

Each offramp transaction is processed independently. As soon as conversion completes, Iron initiates a separate fiat transfer to the recipient bank account.

```
Transaction 1 (100 USDC → EUR)  →  Payout 1 (€91.20)
Transaction 2 (250 USDC → EUR)  →  Payout 2 (€228.00)
Transaction 3 (50 USDC → EUR)   →  Payout 3 (€45.60)
```

### With EOD Settlement

Transactions are converted as they arrive, but payouts are held and combined into a single transfer at the end of the business day.

```
Transaction 1 (100 USDC → EUR)  ┐
Transaction 2 (250 USDC → EUR)  ├→  Single Payout (€364.80)
Transaction 3 (50 USDC → EUR)   ┘
```

## Enabling EOD Settlement

Set `batch_payout` to `true` when creating an offramp Autoramp. This setting applies to all transactions processed through that Autoramp.

`POST` `/autoramps`

### Request fields

| Field          | Type    | Required | Description                                                                                                     |
| -------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `batch_payout` | boolean | No       | If `true`, payouts are batched daily instead of sent individually. Defaults to `false`. Fiat destinations only. |

<Note>
  `batch_payout` only applies to offramp Autoramps with a fiat destination. It is ignored for onramp and swap Autoramps.
</Note>

### Request

<CodeGroup>
  ```bash Bash theme={null}
  curl -X POST "https://api.sandbox.iron.xyz/api/autoramps" \
    -H "Content-Type: application/json; charset=utf-8" \
    -H "IDEMPOTENCY-KEY: <your-idempotency-key>" \
    -H "X-API-Key: <your-api-key>" \
    -d '{
      "source_currencies": [{
        "type": "Crypto",
        "token": "USDC",
        "blockchain": "Ethereum"
      }],
      "destination_currency": {
        "type": "Fiat",
        "code": "EUR"
      },
      "recipient_account": {
        "type": "Fiat",
        "account_identifier": {
          "type": "SEPA",
          "iban": "DE89370400440532013000"
        }
      },
      "customer_id": "123e4567-e89b-12d3-a456-426614174000",
      "source_is_third_party": false,
      "batch_payout": true
    }'
  ```
</CodeGroup>

### Response

<CodeGroup>
  ```json theme={null}
  {
    "id": "9a7b6c5d-e3f1-4g2h-8i7j-6k5l4m3n2o1p",
    "status": "Authorized",
    "batch_payout": true,
    "deposit_rails": [
      {
        "type": "Wallet",
        "id": "xyz98765-lkjh-4321-mnop-0987654321ab",
        "blockchain": "Ethereum",
        "address": "0xYourEthereumAddress",
        "currency": {
          "type": "Crypto",
          "token": "USDC",
          "blockchain": "Ethereum"
        }
      }
    ],
    "created_at": "2025-01-20T13:45:23Z"
  }
  ```
</CodeGroup>

## Transaction Lifecycle

When EOD Settlement is enabled, transactions follow a modified lifecycle where conversion happens immediately but the fiat payout is deferred until end of day.

| Step             | What happens                                               | Webhook event                                 |
| ---------------- | ---------------------------------------------------------- | --------------------------------------------- |
| Deposit received | Crypto arrives at the Autoramp deposit address             | `transaction`                                 |
| Conversion       | Crypto is converted to fiat at the current or locked rate  | `transaction_status` (`ConversionInProgress`) |
| Awaiting batch   | Converted fiat amount is held for end-of-day settlement    | `transaction_status` (`PayoutPending`)        |
| Batch payout     | All pending amounts are paid out in a single fiat transfer | `transaction_status` (`Completed`)            |

<Tip>
  Individual transactions are still tracked separately. Only the fiat payout step is batched — you retain full visibility into every transaction via the API and webhooks.
</Tip>

## Webhooks

When EOD Settlement is enabled, webhook behaviour changes slightly:

* **`transaction` and `transaction_status` events** are still emitted for each individual transaction as it is received and converted.
* The `transaction_status` for individual transactions will reflect the conversion state. The payout portion settles at end of day.
* A final `transaction_status` webhook with `transaction_status: "Completed"` is sent once the batched payout has been executed and confirmed.

## Fees

Fee deduction works the same way regardless of whether EOD Settlement is enabled. Fees (transaction fee, banking fee, network fee) are calculated and applied per transaction according to your [fee profile](/fees-and-invoices).

The banking fee is charged once per batched payout rather than per individual transaction, which can reduce overall costs for high-frequency offramp flows.

## Constraints

* **Fiat destinations only.** `batch_payout` is ignored for crypto-to-crypto swaps and onramp Autoramps. It only applies when the destination is a fiat bank account (offramp).
* **Autoramp-level setting.** The batch behaviour is configured per Autoramp. You can have some Autoramps with immediate payouts and others with EOD settlement for the same customer.
* **Cannot be changed after creation.** To switch between immediate and batched payouts, create a new Autoramp with the desired setting.

## When to Use EOD Settlement

| Scenario                                                  | Recommended                                             |
| --------------------------------------------------------- | ------------------------------------------------------- |
| High-frequency offramps (many small transactions per day) | **Yes** — reduces bank transfer volume and banking fees |
| Treasury management with daily reconciliation             | **Yes** — one settlement per day simplifies accounting  |
| Real-time payouts required by end customers               | **No** — use default immediate payouts                  |
| Low-frequency offramps (a few transactions per week)      | **No** — batching provides little benefit               |

## Sandbox Testing

In Sandbox, you can simulate the full EOD Settlement flow.

<Steps>
  <Step title="Create an offramp Autoramp with batch_payout enabled">
    Use the request above with `"batch_payout": true`.
  </Step>

  <Step title="Approve the Autoramp">
    ```bash theme={null}
    curl -X PUT "https://api.sandbox.iron.xyz/api/sandbox/autoramp/<autoramp_id>" \
      -H "Content-Type: application/json" \
      -H "X-API-Key: $API_KEY" \
      -d '"Approved"'
    ```
  </Step>

  <Step title="Create multiple sandbox transactions">
    ```bash theme={null}
    curl -X POST "https://api.sandbox.iron.xyz/api/sandbox/transaction" \
      -H "Content-Type: application/json" \
      -H "IDEMPOTENCY-KEY: $(uuidgen)" \
      -H "X-API-Key: $API_KEY" \
      -d '{
        "autoramp_id": "<autoramp_id>",
        "amount": "100"
      }'
    ```

    Repeat to create several transactions against the same Autoramp.
  </Step>

  <Step title="Complete the transactions">
    ```bash theme={null}
    curl -X PUT "https://api.sandbox.iron.xyz/api/sandbox/transaction/<transaction_id>/state" \
      -H "Content-Type: application/json" \
      -H "IDEMPOTENCY-KEY: $(uuidgen)" \
      -H "X-API-Key: $API_KEY" \
      -d '{ "state": "Completed" }'
    ```
  </Step>
</Steps>

<Note>
  In Sandbox, batch settlement is simulated — transactions complete immediately when you advance their state rather than waiting for end of day.
</Note>
