# Create Settlement

Create a new settlement with the specified execution interval and locked rate.

Important Notes:
- Specified destinationMemberId must be a valid member ID that has an active corridor. Verify availability through /v2/settlement-context endpoint.
- Rate ID must be obtained from /v2/settlement-rates endpoint first
- Settlement amount cannot exceed the corridor's maximum limit available in /v2/settlement-context API

Execution Intervals:
- IMMEDIATE: Settlement executed as soon as possible (0 hours)
- ONE_HOUR to SIX_HOURS: Settlement scheduled for future execution

Settlement States After Creation:
- S100_SCHEDULED: If execution interval is in the future
- S200_RECEIVED: If immediate execution is requested

Endpoint: POST /v2/settlements
Version: 1.1.0

## Request fields (application/json):

  - `destinationMemberId` (string, required)
    Unique identifier of the destination member.

  - `settlementAmt` (number, required)
    Amount to settle in source currency (e.g., USD).

  - `rateId` (string, required)
    Locked rate identifier obtained from /v2/settlement-rates endpoint.

This ID guarantees the exchange rate for this settlement.
Must be valid and not expired when settlement is created.

  - `executionInterval` (string, required)
    Settlement execution interval determining when the settlement will be processed.

- IMMEDIATE: Execute settlement as soon as possible (0 hours delay)
- ONE_HOUR to SIX_HOURS: Schedule settlement for future execution

Execution intervals allow members to optimize settlement timing based on:
- Market conditions and rate forecasts
- Business requirements and cash flow needs
- Operational schedules and working hours
    Enum: "IMMEDIATE", "ONE_HOUR", "TWO_HOURS", "THREE_HOURS", "FOUR_HOURS", "FIVE_HOURS", "SIX_HOURS"

  - `notes` (string)
    Optional notes or description for this settlement.

## Response 200 fields (application/json):

  - `settlementId` (string)
    Unique settlement identifier.

  - `settlementStatus` (string)
    Current status of the settlement in the processing lifecycle.

Status Flow:
1. S100_SCHEDULED - Settlement scheduled for future execution
2. S200_RECEIVED - Settlement received and validated, ready for processing
3. S300_IN_PROGRESS - Settlement actively being processed
4. S400_FIAT_WITHDRAWAL_IN_PROGRESS - Final fiat currency withdrawal in progress

Terminal States:

5. S500_TERMINATED - Settlement cancelled or terminated
6. S600_COMPLETED - Settlement successfully completed
7. S700_FAILED - Settlement failed during processing
    Enum: "S100_SCHEDULED", "S200_RECEIVED", "S300_IN_PROGRESS", "S400_FIAT_WITHDRAWAL_IN_PROGRESS", "S500_TERMINATED", "S600_COMPLETED", "S700_FAILED"

  - `settlementAmt` (number)
    Original settlement amount in source currency.

  - `pendingAmt` (number)
    Amount still pending processing in source currency.

  - `rate` (number)
    Exchange rate applied to this settlement. This rate was locked when the settlement was created.

  - `settlementAmtReceived` (number)
    Actual amount received in destination currency. Populated when settlement is completed (S600_COMPLETED status).

  - `sourceCcy` (string)
    Source currency code (ISO 4217 3-letter format).

  - `destinationCcy` (string)
    Destination currency code (ISO 4217 3-letter format).

  - `sourceMemberId` (string)
    Source member identifier.

  - `destinationMemberId` (string)
    Destination member identifier.

  - `notes` (string)
    Notes or description provided when creating the settlement.

  - `creationTime` (string)
    Timestamp when the settlement was created (ISO 8601 format).

  - `completionTime` (string)
    Timestamp when the settlement was completed (ISO 8601 format).

  - `dueDate` (string)
    Expected completion date/time for this settlement. Based on execution interval and processing time estimates.

## Response 400 fields (application/json):

  - `code` (string)

  - `message` (string)

  - `detail` (string)

## Response 404 fields (application/json):

  - `code` (string)

  - `message` (string)

  - `detail` (string)


