Simple Late Delivery and Penalty

Author: Accord Project

simplelatedeliveryandpenalty@0.8.1 Contract ^0.20.10 2b44db1fff5d1ccba7a15964347d8b31d32c1a65cc5915ddccc467f1de56d876

A Late Delivery And Penalty clause (simple).

Download Archive Open in Template Studio

A Late Delivery And Penalty (Simple)

A Late Delivery And Penalty clause (simple).

Template Text

Late Delivery and Penalty. In case of delayed delivery of Goods, "Betty Buyer" shall pay to "Steve Seller" a penalty amounting to 10.5% of the total value of the Goods for every 2 days of delay. The total amount of penalty shall not, however, exceed 55% of the total value of the delayed goods. If the delay is more than 15 days, the Buyer is entitled to terminate this Contract.

Late Delivery and Penalty. In case of delayed delivery of Goods, "Betty Buyer" shall pay to "Steve Seller" a penalty amounting to 10.5% of the total value of the Goods for every 2 days of delay. The total amount of penalty shall not, however, exceed 55% of the total value of the delayed goods. If the delay is more than 15 days, the Buyer is entitled to terminate this Contract.
Late Delivery and Penalty. In case of delayed delivery of Goods, {{buyer}} shall pay to {{seller}} a penalty amounting to {{penaltyPercentage}}% of the total value of the Goods for every {{penaltyDuration}} of delay. The total amount of penalty shall not, however, exceed {{capPercentage}}% of the total value of the delayed goods. If the delay is more than {{maximumDelay}}, the Buyer is entitled to terminate this Contract.
{
    "$class": "org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyContract",
    "contractId": "31365d0c-5633-40fb-bc6a-0229c60128bf",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Betty Buyer"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Steve Seller"
    },
    "penaltyDuration": {
        "$class": "org.accordproject.time.Duration",
        "amount": 2,
        "unit": "days"
    },
    "penaltyPercentage": 10.5,
    "capPercentage": 55,
    "maximumDelay": {
        "$class": "org.accordproject.time.Duration",
        "amount": 15,
        "unit": "days"
    }
}

Template Model

namespace org.accordproject.simplelatedeliveryandpenalty

import org.accordproject.cicero.contract.* from https://models.accordproject.org/cicero/contract.cto
import org.accordproject.cicero.runtime.* from https://models.accordproject.org/cicero/runtime.cto
import org.accordproject.time.* from https://models.accordproject.org/v2.0/time.cto

/**
 * Defines the data model for the LateDeliveryAndPenalty template.
 * This defines the structure of the abstract syntax tree that the parser for the template
 * must generate from input source text.
 */
asset SimpleLateDeliveryAndPenaltyContract extends AccordContract {
  o AccordParty buyer
  o AccordParty seller
  o Duration penaltyDuration
  o Double penaltyPercentage
  o Double capPercentage
  o Duration maximumDelay
}

/**
 * Defines the input data required by the template
 */
transaction SimpleLateDeliveryAndPenaltyRequest extends Request {
  o DateTime agreedDelivery
  o DateTime deliveredAt optional
  o Double goodsValue
}

/**
 * Defines the output data for the template
 */
transaction SimpleLateDeliveryAndPenaltyResponse extends Response {
  o Double penalty
  o Boolean buyerMayTerminate
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "159da9c0-7b6c-11ea-b280-c173749a9e96"
}

Request Types

Type Sample JSON
org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyRequest
{
    "$class": "org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyRequest",
    "agreedDelivery": "2020-04-10T16:44:33.755-04:00",
    "deliveredAt": "2020-04-10T16:44:33.755-04:00",
    "goodsValue": 107.485,
    "transactionId": "159d82b0-7b6c-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:44:33.755-04:00"
}

Response Types

Type Sample JSON
org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyResponse
{
    "$class": "org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyResponse",
    "penalty": 129.914,
    "buyerMayTerminate": true,
    "transactionId": "159d82b1-7b6c-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:44:33.755-04:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 176.188,
        "currencyCode": "DKK"
    },
    "description": "Ipsum mollit ut in.",
    "contract": "resource:org.accordproject.simplelatedeliveryandpenalty.SimpleLateDeliveryAndPenaltyContract#9144",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#8054",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#7881",
    "deadline": "2020-04-10T16:44:33.756-04:00",
    "eventId": "159da9c1-7b6c-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:44:33.756-04:00"
}

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