# Preview a fee

Source: https://business-api-docs.youhodler.com/docs/api/reference/fee-previews/fee-previews-create

Returns a non-binding fee preview for a planned operation. Pass `principal_amount` (and optionally `settlement_amount` for asymmetric flows like off-ramp). The response is wrapped in a `fee_preview` envelope.

## Request

**Request URL — POST**
```http
POST /fee-previews
```

**Request Body — application/json**
```json
{
  "operation_type": "withdrawal_crypto",
  "principal_amount": {
    "amount": "100.00",
    "currency": "USDC"
  },
  "requested_at": "2026-05-01T10:00:00Z",
  "service_type": "withdrawal_crypto",
  "settlement_amount": null,
  "subject_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b"
}
```

## Responses

**200 Operation succeeded**

Operation succeeded.

```json
{
  "fee_preview": {
    "binding": "non_binding",
    "computed_at": "2026-05-01T10:00:00Z",
    "enterprise_ca_version": 2,
    "fee_summary": {
      "components": [
        {
          "type": "network_fee",
          "amount": {
            "amount": "1.00",
            "currency": "USDC"
          },
          "payee_ref": null
        }
      ],
      "total": {
        "amount": "1.00",
        "currency": "USDC"
      }
    },
    "operation_type": "withdrawal_crypto",
    "platform_ca_version": 1
  }
}
```

**400 Invalid request payload**

Invalid request payload, query, or parameter shape.

```json
{
  "code": "invalid_request",
  "message": "Missing required field: principal_amount"
}
```

**401 Caller is not authenticated or the bearer token is invalid**

Caller is not authenticated or the bearer token is invalid.

```json
{
  "code": "unauthorized",
  "message": "Authentication required."
}
```

**403 Caller lacks the required capability or permitted scope**

Caller lacks the required capability or permitted scope.

```json
{
  "code": "forbidden_capability_scope",
  "details": {
    "reason": "scope_not_covered"
  },
  "message": "subject_ref requires a bound tenant scope on this endpoint"
}
```

**409 State conflict — the request cannot be applied to the current resource state**

State conflict — the request cannot be applied to the current resource state.

```json
{
  "code": "state_conflict",
  "details": {
    "reason": "state_conflict"
  },
  "message": "A conflicting fee preview operation is already in progress."
}
```

**422 Operation is not admissible — it violates a business rule**

Operation is not admissible — it violates a business rule, policy constraint, or lifecycle precondition specific to this resource.

```json
{
  "code": "not_admissible",
  "details": {
    "reason": "not_admissible"
  },
  "message": "Fee preview request is not admissible for this subject."
}
```

**429 Request rate limit exceeded**

Request rate limit exceeded. Retry after the delay indicated in the `details.retry_after_ms` field.

```json
{
  "code": "rate_limited",
  "details": {
    "retry_after_ms": 5000
  },
  "message": "Too many requests."
}
```

**502 Upstream service returned an unexpected error**

Upstream service returned an unexpected error.

```json
{
  "code": "upstream_error",
  "message": "An upstream service returned an unexpected error."
}
```

**503 Service is temporarily unavailable**

Service is temporarily unavailable; retry with backoff.

```json
{
  "code": "temporarily_unavailable",
  "details": {
    "reason": "service_temporarily_unavailable"
  },
  "message": "Service is temporarily unavailable."
}
```

**Related endpoints:**

- `POST` [Create withdrawal](/docs/api/reference/withdrawals/withdrawals-create) — Initiate a withdrawal after previewing fees
- `POST` [Create conversion](/docs/api/reference/conversions/conversions-create) — Initiate a conversion after previewing fees
