FTOS_BP_CalculateRepaymentSchedule

Returns an array of json records representing the calculated installments of a repayment schedule, that must be stored and presented as in the picture bellow, customized for every project:

Syntax

The FTOS_BP_CalculateRepaymentSchedule custom endpoint is called from within the Endpoint API endpoint. Visit the Endpoint API page for more details.

Copy
POST <host_address>/ftosapi/automation-processors/actions/FTOS_BP_CalculateRepaymentSchedule
Content-Type: application/json
            
{
  "jsonParam": {
    "ScheduleType": "<schedule_type_name>",
    "ProductType": "<product_type_name>",
    "InterestPercent": <annual_interest_rate_for_calculation>,
    "Amount": <financed_amount>,
    "AdvanceAmount": <advance_amount>,
    "HolidayShift": <true_or_false>,
    "HolidayCountry": "<holiday_country_calendar_name>",
    "RealInstallmentNo": <actual_number_of_installments>,
    "InstallmentsNo": <number_of_installments>,
    "GracePeriodInterest": <number_of_installments_with_grace_period_for_interest>,
    "GracePeriodPrincipal": <number_of_installments_with_grace_period_for_principal>,
    "PeriodicityType": "<schedule_periodicity_type>",
    "LastDueDate": "date_of_last_installment_unmodified_for_recalculation",
    "BlockInstallmentNo": <number_of_installment_blocked_for_recalculation>,
    "IsLocked": <1_or_0>,
    "BlockAmount": <value_of_capital_blocked_for_recalculation>,
    "BlockInterestAmount": <value_of_interest_for_grace_period>,
    "ActivationDate": "contract_actiovation_date",
    "InstallmentDay": <day_of_month_for_each_installment>,
    "InstallmentMethod": "<installment_calculation_method_ActualMonth_or_NextMonth>",    
    "StartDateForUnusage": "<starting_date_for_calculating_interest_for_unused_amount yyyy-mm-dd>",
    "ExpiryDateForOD": "<last_date_for_overdraft yyyy-mm-dd>"
    "MaturityDate": "<contract_end_date>",   
    "InterestCapitalization": <interest_capitalization_value>,
    "UpFrontValue": <up_front_value>,
    "Commission": [
        {
        "SourceValue":<commission_value>,
        "SourcePercent":<commission_percent>
        "FeePeriodicityType":"<commission_periodicity_type>",
        "GracePeriodFee":<commission_grace_period>,
        "BlockFeeAmount":<commission_blocked_amount_for_recalculation>,
        "FeeDate":"<commission_date>",
        "FeeName":"<commission_name>",
        "IsUpfront": <whether_first_commission_value_is_paid_at_activation_date_with_values_0_1>}
        ],
    "Insurance": [
        {
        "SourceValue":<insurance_value>,
        "SourcePercent":<insurance_percent>
        "InsurancePeriodicityType":"<insurance_periodicity_type>",
        "GracePeriodInsurance":<insurance_grace_period>,
        "BlockInsuranceAmount":<insurance_blocked_amount_for_recalculation>,
        "InsuranceDate":"<insurance_date>",
        "InsuranceName":"<insurance_name>",
        "InsuranceClassName": "<insurance_class_name>",
        "IsUpfront": <whether_first_insurance_value_is_paid_at_activation_date_with_values_0_1>}
        ],
        "DeferDueDate": <defer_due_date_with_values_0_1>,
    "FirstDueDate": "<contract_first_due_date>",
    "ContractPeriod": <number_of_contract_periods>,
    "HolidayMethod": "<holiday_method>",
    "MultipleInterestRates": [
      {
        "InterestRate": <interest_percent>,
        "FromInstNo": <from_installment_number>
        "ToInstNo": <to_installment_number>
      }
      ],
    "BandedInterestRates": [],
    "UnusedAmount": <unused_amount>  
}

Here's a list of the available parameters:

Parameter Description
host_address URL of the FintechOS Platform server.
access_token Access token used to connect to the API endpoint. For details, see GetToken.
user_name The username of an existing user account on the FintechOS Platform, previously used to get the access token.
Data Key-value pairs of any input parameters to be passed to the internal endpoint in JSON format. Double quotes that enclose string parameter values must be escaped with backslash characters, eg.: \"string value\".
ScheduleType Mandatory. The name of the Payment Schedule found in the FTOS_BP_PaymentScheduleType entity.
ProductType Mandatory. The periodicity of the schedule. The possible values are the names of the records from the FTOS_CB_PeriodicityType entity.
InterestPercent Mandatory. The interest rate for the calculation, defined at the banking product level. The interest rate must be annual, so if you are using a monthly interest rate, you must transform it into an annual rate, multiplying it with 12.
Amount Mandatory. The financed amount, usually also containing the residual value if present, but not the advance value.
InstallmentsNo Mandatory. The number of installments.
PeriodicityType Mandatory. The periodicity of the schedule. The possible values are the names of the records from the FTOS_CB_PeriodicityType entity.
InstallmentDay Mandatory. The day of month for each installment.
AdvanceAmount Optional. The advance value, where AdvanceAmount + Amount = CreditValue.
GracePeriodInterest Optional. The number of installments having grace period applied on the Interest column.
GracePeriodPrincipal Optional. The number of installments having grace period applied on the Principal column.
LastDueDate Optional. The date of the last installment unmodified for recalculation.
BlockInstallmentNo Optional. The installment number that is blocked for recalculation.
BlockAmount Optional. The value of the capital that is blocked for recalculation.
ActivationDate Optional. The activation date of the contract. This is considered at the adjustment of the first installment for the columns that have Effective Rate as calculation method.
FirstDueDate Optional. The due date of the first installment.
BlockInterestAmount Optional. The value of the interest for the grace period if recalculation includes the grace period.
HolidayShift Optional. The system takes into account not working days/ national holidays, according to the sent value. If true and Sunday or Saturday are defined as nonworking days, then the DueDate excepts these dates.
CalculateDAE Optional. Specifies whether to show the effective annual interest rate: for 0 or null, the DAE is not displayed; for 1, only the DAE percent is displayed, and for 2, the original schedule containing a column wiht DAE percent is displayed.
installmentValue Optional. If there is a locked value for installments, this value should be provided here (equal installments).
principalValue Optional. If there is a locked value for principal, this value should be provided here (equal principal).
InstallmentMethod Optional. The method for calculating the installment (Actual Month or Next Month).
MaturityDate Optional. The date for the end of the contract.
InterestCapitalization Optional. Specifies if the interest is capitalized for deposit calculation.
UpFrontValue Optional. The amount for upfront commissions, taxes, insurances paid once at the beginning of the contract.
ResidualValue Optional. The residual value amount for insurance business.
ResidualInInstallment Optional. The method of display for the residual value: for 0, it is displayed in a new schedule line, for 1, it is displayed in the last schedule line.
Commission Optional. An array [] of commissions with periodicity different than Once
SourceValue Within the Commission object of the request. The value of the commission when the commission is a defined as value. Mandatory if the line is present, and mutually exclusive if the SourcePercent is present.
SourcePercent Within the Commission object of the request. The percent of the commission when the commission is defined as a percentage. Mandatory if the line is present, and mutually exclusive if the SourceValue is present.
FeePeriodicityType Within the Commission object of the request. The periodicity of the commission. Mandatory if the line is present.
GracePeriodFee Optional, within the Commission object of the request. It can have its own grace period for a number of installments
BlockFeeAmount Optional, within the Commission object of the request. The blocked amount is case of recalculation.
FeeDate Within the Commission object of the request. The date of the fee being applied to the contract. Mandatory if the line is present.
FeeName Within the Commission object of the request. The fee name from the FTOS_BP_Commission entity selected from the banking product level. Mandatory if the line is present.
IsUpfront Optional, within the Commission object of the request. For commissions that are included into the payment schedule and the first commission value is paid at the activation date. Possible values: 0,1. The parameter is optional and if it is not included into the JSON request, the value comes from payment schedule detail column setting.
Insurance Optional. An array [] of insurances with periodicity different than Once.
SourceValue Within the Insurance object of the request. The value of the insurance when the insurance is defined as value. Mandatory if the line is present, and mutually exclusive if the SourcePercent is present.
SourcePercent Within the Insurance object of the request. The percent of the insurance when the insurance is defined as a percentage. Mandatory if the line is present, and mutually exclusive if the SourceValue is present.
InsurancePeriodicityType Within the Insurance object of the request. The periodicity of the insurance. Mandatory if the line is present.
GracePeriodInsurance Optional, within the Insurance object of the request. It can have its own grace period for a number of installments.
BlockInsuranceAmount Optional, within the Insurance object of the request. The blocked amount is case of recalculation.
InsuranceDate Within the Insurance object of the request. The date of the insurance applied to the contract. Mandatory if the line is present.
InsuranceName Within the Insurance object of the request. The insurance name from the FTOS_BP_Insurance entity selected from the banking product. Optional if InsuranceClassId is present.
InsuranceClassId Within the Insurance object of the request. The insurance class from the FTOS_BP_ScheduleElementClass entity selected on the FTOS_BP_Insurance entity when defining the insurance. Optional if InsuranceId is present.
IsUpfront Optional, within the Insurance object of the request. For insurances that are included into the payment schedule and the first commission value is paid at the activation date. Possible values: 0,1. The parameter is optional and if it is not included into the JSON request, the value comes from payment schedule detail column setting.
MultipleInterestRates Optional. An array [] of interest rates.
InterestRate Optional, within the MultipleInterestRates object of the request. The interest percent defined as interest type = Collection on the banking product Dimensions > Interest List > Interest level.
FromInstNo Optional, within the MultipleInterestRates object of the request. The From installment number defined as interest type = Collection on the banking product Dimensions > Interest List > Interest level.
ToInstNo Optional, within the MultipleInterestRates object of the request. The To installment number defined as interest type = Collection on the banking product Dimensions > Interest List > Interest level.
CapitalPercent Optional. The percentage field defined at the banking product level (Credit Card) in the Details tab, representing a percentage to be applied as a formula to the schedule detail principal column.

Response

The response is an array of json records representing the calculated installments of a repayment schedule.

Example