Installment Sale

Author: Accord Project

installment-sale@5.0.0 Contract ^0.22.0 a6e4c5279486cc7fe12b9e1f3fcabded8c4121f522518f27b116e22ffaee7d81

This is a clause for a simple installment sale.

Download Archive Download Compiled Archive Open in Template Studio Open in VSCode Web

Installment Sale

A simple clause for a sale paid in installments.

Template Text

"Dan" agrees to pay to "Ned" the total sum 10,000.00 EUR, in the manner following:

500.00 EUR is to be paid at closing, and the remaining balance of 9,500.00 EUR shall be paid as follows:

500.00 EUR or more per month on the first day of each and every month, and continuing until the entire balance, including both principal and interest, shall be paid in full -- provided, however, that the entire balance due plus accrued interest and any other amounts due here-under shall be paid in full on or before 24 months.

Monthly payments, which shall start on month 3, include both principal and interest with interest at the rate of 1.5%, computed monthly on the remaining balance from time to time unpaid.

"Dan" agrees to pay to "Ned" the total sum 10,000.00 EUR, in the manner following:

500.00 EUR is to be paid at closing, and the remaining balance of 9,500.00 EUR shall be paid as follows:

500.00 EUR or more per month on the first day of each and every month, and continuing until the entire balance, including both principal and interest, shall be paid in full -- provided, however, that the entire balance due plus accrued interest and any other amounts due here-under shall be paid in full on or before 24 months.

Monthly payments, which shall start on month 3, include both principal and interest with interest at the rate of 1.5%, computed monthly on the remaining balance from time to time unpaid.
{{BUYER}} agrees to pay to {{SELLER}} the total sum {{INITIAL_DUE as "0,0.00 CCC"}}, in the manner following:

{{DUE_AT_CLOSING as "0,0.00 CCC"}} is to be paid at closing, and the remaining balance of {{TOTAL_DUE_BEFORE_CLOSING as "0,0.00 CCC"}} shall be paid as follows:

{{MIN_PAYMENT as "0,0.00 CCC"}} or more per month on the first day of each and every month, and continuing until the entire balance, including both principal and interest, shall be paid in full -- provided, however, that the entire balance due plus accrued interest and any other amounts due here-under shall be paid in full on or before 24 months.

Monthly payments, which shall start on month {{FIRST_MONTH}}, include both principal and interest with interest at the rate of {{INTEREST_RATE}}%, computed monthly on the remaining balance from time to time unpaid.
{
    "$class": "org.accordproject.installmentsale.InstallmentSaleContract",
    "BUYER": "resource:org.accordproject.party.Party#Dan",
    "SELLER": "resource:org.accordproject.party.Party#Ned",
    "INITIAL_DUE": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 10000,
        "currencyCode": "EUR"
    },
    "INTEREST_RATE": 1.5,
    "TOTAL_DUE_BEFORE_CLOSING": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 9500,
        "currencyCode": "EUR"
    },
    "MIN_PAYMENT": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 500,
        "currencyCode": "EUR"
    },
    "DUE_AT_CLOSING": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 500,
        "currencyCode": "EUR"
    },
    "FIRST_MONTH": 3,
    "contractId": "511783c2-606d-4d94-8efa-3c7408bcca4e",
    "$identifier": "511783c2-606d-4d94-8efa-3c7408bcca4e"
}

Template Model

namespace org.accordproject.installmentsale

import org.accordproject.contract.* from https://models.accordproject.org/accordproject/contract.cto
import org.accordproject.party.* from https://models.accordproject.org/accordproject/party.cto
import org.accordproject.runtime.* from https://models.accordproject.org/accordproject/runtime.cto
import org.accordproject.obligation.* from https://models.accordproject.org/accordproject/obligation.cto
import org.accordproject.money.MonetaryAmount from https://models.accordproject.org/money@0.2.0.cto

transaction Installment extends Request {
  o MonetaryAmount amount
}

transaction ClosingPayment extends Request {
  o MonetaryAmount amount
}

transaction Balance extends Request {
  o MonetaryAmount balance
  o MonetaryAmount total_paid
}

enum ContractStatus {
  o WaitingForFirstDayOfNextMonth
  o Fulfilled
}

asset InstallmentSaleState extends State {
  o ContractStatus status
  o MonetaryAmount balance_remaining
  o Integer next_payment_month
  o MonetaryAmount total_paid
}

/**
 * The template model
 */
asset InstallmentSaleContract extends Contract {
  --> Party BUYER
  --> Party SELLER
  o MonetaryAmount INITIAL_DUE
  o Double INTEREST_RATE
  o MonetaryAmount TOTAL_DUE_BEFORE_CLOSING
  o MonetaryAmount MIN_PAYMENT
  o MonetaryAmount DUE_AT_CLOSING
  o Integer FIRST_MONTH
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.installmentsale.InstallmentSaleState
{
    "$class": "org.accordproject.installmentsale.InstallmentSaleState",
    "status": "Fulfilled",
    "balance_remaining": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 133.933,
        "currencyCode": "SHP"
    },
    "next_payment_month": 5111,
    "total_paid": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 220.379,
        "currencyCode": "RON"
    },
    "$identifier": "7fbed181-a77b-11eb-9770-7ddd576a12c2"
}

Request Types

Type Sample JSON
org.accordproject.installmentsale.ClosingPayment
{
    "$class": "org.accordproject.installmentsale.ClosingPayment",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 121.893,
        "currencyCode": "MWK"
    },
    "$timestamp": "2021-04-27T13:10:43.095-04:00"
}
org.accordproject.installmentsale.Installment
{
    "$class": "org.accordproject.installmentsale.Installment",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 199.893,
        "currencyCode": "PEN"
    },
    "$timestamp": "2021-04-27T13:10:43.095-04:00"
}

Response Types

Type Sample JSON
org.accordproject.installmentsale.Balance
{
    "$class": "org.accordproject.installmentsale.Balance",
    "balance": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 9.915,
        "currencyCode": "XDR"
    },
    "total_paid": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 17.655,
        "currencyCode": "SDG"
    },
    "$timestamp": "2021-04-27T13:10:43.096-04:00"
}

Events Types

Type Sample JSON
org.accordproject.obligation.PaymentObligation
{
    "$class": "org.accordproject.obligation.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 156.989,
        "currencyCode": "AZN"
    },
    "description": "Aute eu.",
    "$identifier": "7fbef890-a77b-11eb-9770-7ddd576a12c2",
    "contract": "resource:org.accordproject.installmentsale.InstallmentSaleContract#9109",
    "promisor": "resource:org.accordproject.party.Party#2690",
    "promisee": "resource:org.accordproject.party.Party#2859",
    "deadline": "2021-04-27T13:10:43.097-04:00",
    "$timestamp": "2021-04-27T13:10:43.097-04:00"
}

Technical Integration

Please refer to the Accord Project documentation for how to use a template or integrate it within your application.

View the Latest code for this template on GitHub.