---
title: "Calculate guard cancellation refund"
method: GET
path: "/api-regulated/v1/guards/{guardId}/calculate-cancellation-refund"
tags: ["Guard"]
---

# Calculate guard cancellation refund

`GET /api-regulated/v1/guards/{guardId}/calculate-cancellation-refund`

## Request

- Base URL: `https://api.currencyguard.com`
- URL: `https://api.currencyguard.com/api-regulated/v1/guards/{guardId}/calculate-cancellation-refund`
- Auth: HTTP bearer

Calculates the refund amount and details for cancelling a guard based on guard age and maturity period.

## Path parameters

- `guardId` string, required

## Response `200`

Cancellation refund calculated

- GuardCancellationRefundDTO: Guard cancellation refund calculation details
  - `guardId` string: ID of the guard
  - `ageInMinutes` integer: Age of the guard in minutes since creation
  - `daysUntilDueDate` integer: Number of days from now until the guard due date (settlement window end)
  - `maturityInDays` integer: Maturity period of the guard in days (from original creation to current due date)
  - `refundPercentage` number: Refund percentage applicable based on age and maturity (as decimal)
  - `guardFee` number: Original guard fee paid by the client
  - `maximumRefundAmount` number: Maximum refund amount available ((guardFee - originalSalesMargin) × refundPercentage)
  - `guardCurrency` string: Guard currency code
  - `cancellable` boolean: Whether this guard can be cancelled
  - `guardStatus` string: Current status of the guard
  - `totalGuardFee` number: Total guard fee across all components in the extension chain
  - `refundCalculation` GuardCancellationRefundDTORefundCalculation: **Extensible JSONB field** - Full refund calculation including schedule and per-component breakdown This field accepts any valid JSON structure and can be extended with additional properties as needed. Note: While the structure is extensible, known fields shown in the example are subject to application validation.
  - `validationErrors` string[]: Validation errors preventing cancellation (empty if cancellable)

## Other responses

- `400`: Invalid guard ID — [`http/malformed-request`](/problems/http/malformed-request/)
- `401`: Not authenticated — [`security/authentication-failed`](/problems/security/authentication-failed/)
- `403`: Not authorized — [`security/insufficient-permissions`](/problems/security/insufficient-permissions/)
- `404`: Guard not found — [`http/resource-not-found`](/problems/http/resource-not-found/)
- `500`: Server error — [`server/internal-error`](/problems/server/internal-error/)

---

[API](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external.md) · [All operations](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external/llms.txt) · [OpenAPI document](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external/revisions/a1f3f854190d?raw)
