You are here:
InsPolicyService:prepareToCancelPolicy
Use this service to calculate the premium price difference before canceling a policy. The service prorates the premium, fee, and tax amounts, and calculates the premium, fee, and tax refund.
This service needs to be invoked before the InsPolicyService:cancelPolicy service.
Method: prepareToCancelPolicy
How It Works
-
Takes the
assetIdorpolicyIdand finds the policy to be canceled. -
Uses the appropriate calculation process based on the
useIsPaidFlagvalue.With
useIsPaidFlagset to false (deselected), the service prorates the policy's Total Premium For Term, Total Fee For Term, and Total Tax For Term, and calculates refunded amounts based on the Cancellation Date and Policy Paid To Date. If Policy Paid To Date is Null, the service considers the policy paid in full and uses Expiration Date.With
useIsPaidFlagset totrue(selected), the service:-
Uses payment schedules to calculate the total amount already paid for the policy. The total amount paid for the policy equals the sum of amounts in payment schedules with Is Paid set to true (selected). This amount is used in refund calculations.
-
Prorates the policy's Total Premium For Term, Total Fee For Term, and Total Tax For Term, and calculates refund amounts based on the Cancellation Date and the total amount already paid for the policy.
-
-
The service takes into consideration if the fees or taxes are refundable or not.
-
Returns the price difference between the original total premium for the policy and the canceled policy in the output JSON.
-
The refund amounts are from the policy holder's perspective. A positive amount represents a refund to the policyholder. A negative amount indicates an unpaid amount by the policyholder.
-
-
If taxes and fees are included in this policy, the
Total Tax For Term,Total Fee For Term,refundedTax, and/orrefundedFeeare also included in the output JSON.If the policy the service is canceling does not include taxes or fees, these fields are omitted from the output JSON.
Surcharges (Taxes and Fees)
This service (along with the InsPolicyService:cancelPolicy service) facilitates prorations and refunds for taxes and fees when a policy is canceled. Here's how that works:
-
The
priceDiffis essentially the refund amount, and uses the formula = (oldGrossWrittenPremium- updatedGrossWrittenPremium) +refundedTax+refundedFee. -
The updated
GrossWrittenPremiumis thePremiumAmountprorated over the policy's effective date and cancellation date. -
The new total amount is equal to the target policy’s
PremiumAmountplus theStandardTaxAmountplus theStandardFeeAmount, all prorated to the cancellation date. -
If the target policy has a
StandardTaxAmount, that value is prorated over the cancellation date and returned via theTermTaxAmountfield in the output. -
If the target policy has a
StandardFeeAmount, that value is prorated over the cancellation date and returned via theTermFeeAmountfield in the output. -
If the target policy has refundable
InsurancePolicySurchargeorAssetPricingAdjustment__crecords, the prorated refund amounts are returned via therefundedTaxandrefundedFeefields in the output. AnInsurancePolicySurchargeorAssetPricingAdjustment__cis refundable if the associatedPriceListEntry__cis refundable. The prorated refund amounts are calculated over the cancellation date and the original expiration date.
Remote Options
Input JSON
This service takes an input JSON that includes the effectiveDate (date to be canceled).
{
"Id": "02i6g000002f07VAAQ",
"effectiveDate": "08/12/2019"
}
Output JSON
The service returns the price difference calculated for the policy with the new cancellation date.
{
"Id": "02i6g000002f07VAAQ",
"output": {
"refundedFee": -3.68,
"totalFeeForTerm": 14.06,
"refundedTax": -37.93,
"totalTaxForTerm": 144.84,
"aggregateTotalPremiumForTerms": 4002.28,
"priceDiff": -420.97,
"totalPremiumForTerm": 1448.44,
"errorCode": "INVOKE-200",
"error": "OK"
}
}Output Keys and Values
Output |
Description |
|---|---|
|
The Id of the Policy (Asset) or InsurancePolicy that was updated. |
|
|

