All pages
Powered by GitBook
1 of 1

Loading...

Make premature termination

Use case

In this example, we will review how to terminate an active contract prematurely (before the contract reaches its end date). We will use the deposit contract that was previously created.

Use case data
API parameters with values

The contract header is ID-1696407222. See the page for more details.

...contracts/ID-1696407222/...

The active contract version is ID-1696407267. See the page for more details.

.../versions/ID-1696407267/...

The deposit contract is terminated without any of the interest it has accrued during the term period.

Sample API call

To terminate an active contract prematurely, make the following API call.

deposit-api.sandbox.tuumplatform.com/api/v2/contracts/{headerId}/versions/{versionId}/prepare-for-termination

See more information about the prepare deposit contract for termination endpoint in the Tuum developer portal.

Sample request

Below is an example request body of the API call for changing deposit contract payout details.

{
  "terminationType": "WITHOUT_INTEREST",
  "comment": "Closing contract"
}
curl --location 'https://deposit-api.sandbox.tuumplatform.com/api/v1/contracts/ID-1696407222/versions/ID-1696407267/prepare-for-termination' \
--header 'x-channel-code: SYSTEM' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjQtMDMtMTVUMTg6MzM6MzYiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIuRVUiLCJleHAiOjE3MTA1Mjc2MTZ9.v5803cMEIrcXdTAnbWPEzODtlb0_YKspKRosMtjNyRg' \
--header 'Content-Type: application/json' \
--data '{
  "terminationType": "WITHOUT_INTEREST",
  "comment": "Closing contract"
}'

Sample response

Below you will find an example response body to the API call above

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "headerId": "ID-1696407222",
        "personId": "ID-2660",
        "accountId": "ID-1012",
        "applicationId": null,
        "offerId": "ID-1718024051",
        "depositGroupCode": "TIME_DEPOSIT",
        "depositTypeCode": "PREMIUM",
        "contractNumber": "PR-EE-1000",
        "countryCode": "EE",
        "channelCode": "BACKOFFICE",
        "tenantCode": "MB",
        "depositClassCode": "PREMIUM_CUSTOMER",
        "headerActivationDate": "2026-04-04",
        "headerClosingDate": null,
        "activeVersion": {
            "versionId": "ID-1696407267",
            "headerId": "ID-1696407222",
            "versionNumber": 1,
            "statusCode": "TERMINATING",
            "preparationDate": "2026-04-04",
            "signingDate": null,
            "activationDate": "2026-04-04",
            "endDate": "2026-07-04",
            "closingDate": null,
            "period": 3,
            "periodTypeCode": "MONTH",
            "interestRate": 0.25,
            "interestPaymentFrequencyCode": "MONTH",
            "prolongCode": "PRINCIPAL",
            "countryCode": "EE",
            "cancelReasonCode": null,
            "lastCreditReceiveDate": "2026-04-06",
            "lastSigningDate": null,
            "changeTypeCode": "NEW_CONTRACT",
            "components": [
                {
                    "componentId": "ID-1718024140",
                    "versionId": "ID-1718024026",
                    "componentTypeCode": "PRI",
                    "initialMoney": {
                        "amount": 5000.00,
                        "currencyCode": "EUR"
                    },
                    "balanceMoney": {
                        "amount": 4995.00,
                        "currencyCode": "EUR"
                    },
                    "calculationMethod": null,
                    "rateBaseCode": null,
                    "rate": null,
                    "accruedUntil": null,
                    "paymentDay": 4,
                    "paymentInterval": 1,
                    "baseInvalidFromDate": null
                },
                {
                    "componentId": "ID-1718024141",
                    "versionId": "ID-1718024026",
                    "componentTypeCode": "INT",
                    "initialMoney": {
                        "amount": 0.00,
                        "currencyCode": "EUR"
                    },
                    "balanceMoney": {
                        "amount": 0.00,
                        "currencyCode": "EUR"
                    },
                    "calculationMethod": {
                        "daysInMonth": "30",
                        "daysInYear": 360
                    },
                    "rateBaseCode": null,
                    "rate": 0.25,
                    "accruedUntil": "2026-06-04",
                    "paymentDay": 4,
                    "paymentInterval": 1,
                    "baseInvalidFromDate": "2026-06-04"
                }
            ],
            "totalInterestMoney": {
                "amount": 3.13,
                "currencyCode": "EUR"
            },
            "totalInterestAccruedMoney": {
                "amount": 0.25,
                "currencyCode": "EUR"
            },
            "channelCode": "BACKOFFICE",
            "tenantCode": "MB",
            "terminationType": "WITHOUT_INTEREST",
            "nextPayoutDate": "2026-07-04",
            "payoutDetails": {
                "name": "Test Account",
                "accountNumber": {
                    "value": "EE111236525217358748",
                    "type": "IBAN"
                },
                "financialInstitutionId": null,
                "referenceNumber": null,
                "countryCode": null
            }
        },
        "personTypeCode": "P",
        "taxResidencyCountryCode": "EE",
        "taxExempt": false,
        "rateBaseCode": null
    }
}

Result

As a result, the deposit contract is set to the TERMINATING status.

Once the Tuum system completes the internal verification process, the contract will automatically be set to the TERMINATED status. The payout of the principal, or principal with interest, will be made to the servicing or payout account.

"terminationType": "WITHOUT_INTEREST"
find deposit contract
find deposit contract