Fork me on GitHub

Template installment-sale@0.7.1

Contract Ergo ^0.8.0 4a0c546401ed8f0258da1a0ec6e746039081b61a1b97e99c84b215bfcc2a836e

This is a clause for a simple installment sale.

Download Archive

Installment Sale

A simple clause for a sale paid in installments.

Sample

"Dan" agrees to pay to "Ned" the total sum e10000, in the manner following:

E500 is to be paid at closing, and the remaining balance of E9500 shall be paid as follows:

E500 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 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.

                

Model Dependencies

Technical Integration

Please refer to the Cicero documentation for details and examples of how to integrate a call to a Cicero template into your application.

View the Latest code for this template on on GitHub.

Sample Instance

{
    "$class": "org.accordproject.installmentsale.InstallmentSaleContract",
    "contractId": "a1c52761-1f76-4e33-87b0-742b82286ad2",
    "BUYER": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Dan"
    },
    "SELLER": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Ned"
    },
    "INITIAL_DUE": 10000,
    "INTEREST_RATE": 1.5,
    "TOTAL_DUE_BEFORE_CLOSING": 9500,
    "MIN_PAYMENT": 500,
    "DUE_AT_CLOSING": 500,
    "FIRST_MONTH": 3
}

State Types

Type Sample JSON
org.accordproject.installmentsale.InstallmentSaleState
{
    "$class": "org.accordproject.installmentsale.InstallmentSaleState",
    "status": "WaitingForFirstDayOfNextMonth",
    "balance_remaining": 254.341,
    "next_payment_month": 22957,
    "total_paid": 132.785,
    "stateId": "41b2b8e1-bda7-11e8-b397-3b22605d0a20"
}

Request Types

Type Sample JSON
org.accordproject.cicero.runtime.Request
{
    "$class": "org.accordproject.cicero.runtime.Request",
    "transactionId": "41b1f590-bda7-11e8-b397-3b22605d0a20",
    "timestamp": "2018-09-21T14:04:29.417Z"
}
org.accordproject.installmentsale.ClosingPayment
{
    "$class": "org.accordproject.installmentsale.ClosingPayment",
    "amount": 65.647,
    "transactionId": "41b26ac0-bda7-11e8-b397-3b22605d0a20",
    "timestamp": "2018-09-21T14:04:29.420Z"
}
org.accordproject.installmentsale.Installment
{
    "$class": "org.accordproject.installmentsale.Installment",
    "amount": 151.011,
    "transactionId": "41b243b0-bda7-11e8-b397-3b22605d0a20",
    "timestamp": "2018-09-21T14:04:29.419Z"
}

Response Types

Type Sample JSON
org.accordproject.cicero.runtime.Response
{
    "$class": "org.accordproject.cicero.runtime.Response",
    "transactionId": "41b26ac1-bda7-11e8-b397-3b22605d0a20",
    "timestamp": "2018-09-21T14:04:29.420Z"
}
org.accordproject.installmentsale.Balance
{
    "$class": "org.accordproject.installmentsale.Balance",
    "balance": 185.337,
    "total_paid": 249.985,
    "transactionId": "41b291d0-bda7-11e8-b397-3b22605d0a20",
    "timestamp": "2018-09-21T14:04:29.421Z"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 253.632,
        "currencyCode": "UGX"
    },
    "description": "Quis mollit eiusmod.",
    "contract": "resource:org.accordproject.installmentsale.InstallmentSaleContract#5106",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#4371",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#2084",
    "deadline": "2018-09-21T14:04:29.425Z",
    "eventId": "41b32e10-bda7-11e8-b397-3b22605d0a20",
    "timestamp": "2018-09-21T14:04:29.425Z"
}
org.hyperledger.composer.system.Event
{
    "abstract": "this is an abstract type"
}