Guard

Calculate guard cancellation refund

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

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

Path parameters

guardIdstring required

Response

Cancellation refund calculated

guardIdstring

ID of the guard

ageInMinutesinteger

Age of the guard in minutes since creation

daysUntilDueDateinteger

Number of days from now until the guard due date (settlement window end)

maturityInDaysinteger

Maturity period of the guard in days (from original creation to current due date)

refundPercentagenumber

Refund percentage applicable based on age and maturity (as decimal)

guardFeenumber

Original guard fee paid by the client

maximumRefundAmountnumber

Maximum refund amount available ((guardFee - originalSalesMargin) × refundPercentage)

guardCurrencystring

Guard currency code

cancellableboolean

Whether this guard can be cancelled

guardStatusstring

Current status of the guard

totalGuardFeenumber

Total guard fee across all components in the extension chain

refundCalculationGuardCancellationRefundDTORefundCalculation

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.

validationErrorsstring[]

Validation errors preventing cancellation (empty if cancellable)

Example response

{
  "guardId": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "ageInMinutes": 1440,
  "daysUntilDueDate": 45,
  "maturityInDays": 60,
  "refundPercentage": 0.75,
  "guardFee": 512,
  "maximumRefundAmount": 384,
  "guardCurrency": "GBP",
  "cancellable": true,
  "guardStatus": "ACTIVE",
  "totalGuardFee": 525.09
}

Changes

No recorded changes to this operation across all 1 revision of this API.