Skip to content

Cancellation Scenarios

How to calculate refunds for different cancellation types.


Cancellation Types

  1. Full Refund - Within cooling-off period (14 days)
  2. Pro-Rata Refund - After cooling-off, refund unused time
  3. No Refund - Post-expiry or specific business rules

Scenario 1: Cooling-Off Cancellation

Customer cancels within 14 days of policy start.

// Policy details
Policy = {
    "InceptionDate": $ToDate("2024-03-01"),
    "ExpiryDate": $ToDate("2025-02-28"),
    "Premium": 566.59
};

CancellationDate = $ToDate("2024-03-10");  // 9 days after inception
CancellationReason = "Cooling Off Period - Customer changed mind";

// Check if within cooling-off
daysSinceInception = $DifferenceInDays(CancellationDate, Policy.InceptionDate);
withinCoolingOff = daysSinceInception <= 14;

if (withinCoolingOff) {
    // Full refund, no cancellation fee, refund admin fee
    $CalculateFullCancellation(0.00, true);

    refund = Cancellation.RefundAmount;
    $Log("Full refund due: £" + refund.ToString());
    $Log(Cancellation.RefundMessage);
    // "A refund is due as the policy lies within the 14 day cooling off period."
}

Result:

  • Refund: £566.59 (full premium)
  • Cancellation Fee: £0.00
  • Admin Fee: Refunded

Scenario 2: Pro-Rata Cancellation

Customer cancels mid-policy after cooling-off period.

// Policy details
Policy = {
    "InceptionDate": $ToDate("2024-01-15"),
    "ExpiryDate": $ToDate("2025-01-14"),
    "Premium": 566.59
};

CancellationDate = $ToDate("2024-07-01");  // 168 days into policy
CancellationReason = "Customer Request - No Longer Needed";

// Calculate days
totalDays = $DifferenceInDays(Policy.ExpiryDate, Policy.InceptionDate);
daysCovered = $DifferenceInDays(CancellationDate, Policy.InceptionDate);
daysRemaining = totalDays - daysCovered;

// Pro-rata refund with £25 cancellation fee, no admin fee refund
$CalculateProRataCancellation(25.00, false);

refund = Cancellation.RefundAmount;                       // Pro-rated admin fee already deducted
keptAdminFee = Cancellation.NonRefundableAdminFeeAmount;  // Admin fee not refunded
proRataPercentage = (daysRemaining / totalDays) * 100;

$Log("Days covered: " + daysCovered.ToString() + " of " + totalDays.ToString());
$Log("Pro-rata refund: " + proRataPercentage.ToString() + "% of premium");
$Log("Refund amount: £" + refund.ToString());

Calculation:

Total policy days: 365
Days covered: 168
Days remaining: 197

Pro-rata factor: 197 / 365 = 0.5397 (54%)

Premium refund: £566.59 × 0.5397 = £305.79
Less cancellation fee: £305.79 - £25.00 = £280.79

Total refund: £280.79

Scenario 3: No Refund Cancellation

Policy cancelled after expiry or under no-refund terms.

Policy = {
    "InceptionDate": $ToDate("2024-01-15"),
    "ExpiryDate": $ToDate("2025-01-14")
};

CancellationDate = $ToDate("2025-01-20");  // After expiry
CancellationReason = "Policy Expired - Customer did not renew";

// No refund
$CalculateNoRefundCancellation(0.00);

refund = Cancellation.RefundAmount;  // 0.00
$Log("No refund due - policy expired");

Complete Cancellation Workflow

function ProcessCancellation(cancellationDate, reason) {
    CancellationDate = cancellationDate;
    CancellationReason = reason;

    // Validate cancellation date
    if (cancellationDate < Policy.InceptionDate) {
        return {
            "Success": false,
            "Message": "Cannot cancel before policy starts"
        };
    }

    // Calculate days since inception
    daysSinceInception = $DifferenceInDays(cancellationDate, Policy.InceptionDate);
    withinCoolingOff = daysSinceInception <= 14;

    // Post-expiry check
    afterExpiry = cancellationDate > Policy.ExpiryDate;

    if (afterExpiry) {
        // No refund after expiry
        $CalculateNoRefundCancellation(0.00);

        return {
            "Success": true,
            "Type": "NoRefund",
            "Refund": 0.00,
            "Message": "Policy expired - no refund due"
        };
    }
    else if (withinCoolingOff) {
        // Full refund within cooling-off
        $CalculateFullCancellation(0.00, true);

        return {
            "Success": true,
            "Type": "CoolingOff",
            "Refund": Cancellation.RefundAmount,
            "Message": "Full refund - cooling-off period"
        };
    }
    else {
        // Pro-rata refund
        $CalculateProRataCancellation(25.00, false);

        totalDays = $DifferenceInDays(Policy.ExpiryDate, Policy.InceptionDate);
        daysCovered = $DifferenceInDays(cancellationDate, Policy.InceptionDate);
        daysRemaining = totalDays - daysCovered;

        return {
            "Success": true,
            "Type": "ProRata",
            "Refund": Cancellation.RefundAmount,
            "DaysCovered": daysCovered,
            "DaysRemaining": daysRemaining,
            "CancellationFee": 25.00,
            "Message": "Pro-rata refund calculated"
        };
    }
}

// Execute cancellation
result = ProcessCancellation($ToDate("2024-07-01"), "Customer request");

if (result.Success) {
    $Log("Cancellation processed: " + result.Type);
    $Log("Refund: £" + result.Refund.ToString());
}

Finance Agreement Considerations

When policy paid via finance:

FinanceDetails = {
    "IsPaidByFinance": true,
    "IsValidFinanceAgreement": true,
    "Deposit": 112.00,
    "EarlySettlementAmount": 150.00  // Outstanding finance balance
};

// Calculate cancellation
$CalculateProRataCancellation(25.00, false);

// Refund calculation considers finance
// If finance agreement active, refund goes to finance company
// Customer receives: pro-rata refund - early settlement amount

grossRefund = Cancellation.RefundAmount;  // e.g., £280.79
customerRefund = grossRefund - FinanceDetails.EarlySettlementAmount;

if (customerRefund < 0) {
    // Customer owes finance company
    $Log("Customer owes: £" + ($Abs(customerRefund)).ToString());
} else {
    // Customer receives refund
    $Log("Customer refund: £" + customerRefund.ToString());
}

Ledger Analysis After Cancellation

$CalculateProRataCancellation(25.00, false);

// Ledger contains cancellation entries
cancellationEntries = Ledger.Filter((e) =>
    e.LedgerSection == "Cancellation");

// Show refund breakdown
entryIndex = 0;
while (entryIndex < cancellationEntries.Length) {
    entry = cancellationEntries[entryIndex];
    entryIndex++;
    $Log(entry.Description + ": £" + entry.GrossAmount.ToString());
}

// Example ledger output:
// "Cancellation Fee: £25.00"
// "Policy Refund: -£280.79"  (negative = refund)
// "Net Refund: £255.79"

Business Rules Examples

No Refund for Specific Products

if (Product.Code == "EVENT_INSURANCE") {
    // Event insurance typically no refund
    $CalculateNoRefundCancellation(0.00);
    $Log("Event insurance - no refund as per policy terms");
}

Minimum Retained Premium

function CalculateWithMinimumRetained(cancellationDate) {
    // Calculate normal pro-rata
    $CalculateProRataCancellation(25.00, false);

    calculatedRefund = Cancellation.RefundAmount;
    minimumRetainedPremium = 100.00;
    premiumPaid = Policy.Premium;

    // Ensure minimum retained
    maxRefund = premiumPaid - minimumRetainedPremium;

    if (calculatedRefund > maxRefund) {
        // Adjust refund to retain minimum
        adjustedRefund = maxRefund;
        $Log("Refund capped - minimum premium retained");
        return adjustedRefund;
    }

    return calculatedRefund;
}

Testing Cancellation Logic

// Test cooling-off boundary
function TestCoolingOffBoundary() {
    inceptionDate = $ToDate("2024-01-01");

    // Day 14 - should be full refund
    day14 = $AddDays(inceptionDate, 14);
    days14 = $DifferenceInDays(day14, inceptionDate);
    $Log("Day 14: " + days14.ToString() + " days - " + (days14 <= 14 ? "COOLING OFF" : "PRO-RATA"));

    // Day 15 - should be pro-rata
    day15 = $AddDays(inceptionDate, 15);
    days15 = $DifferenceInDays(day15, inceptionDate);
    $Log("Day 15: " + days15.ToString() + " days - " + (days15 <= 14 ? "COOLING OFF" : "PRO-RATA"));
}

TestCoolingOffBoundary();

Next Steps