Full Payment Upon Demand

Author: Accord Project

full-payment-upon-demand@0.7.1 Contract ^0.20.10 02667523a3bfbf7ac2965db3509b718a168ba12c09d16f9a4970b20d58d53d0d

This is a one-time full payment clause applicable on demand.

Download Archive Open in Template Studio

Full Payment upon Demand

Payment made when a single milestone is reached

Template Text

After execution of this Agreement, "Dan" shall pay the full purchase price to "Jerome" in the amount of 3.14 EUR upon demand by "Jerome".

After execution of this Agreement, "Dan" shall pay the full purchase price to "Jerome" in the amount of 3.14 EUR upon demand by "Jerome".
After execution of this Agreement, {{buyer}} shall pay the full purchase price to {{seller}} in the amount of {{value}} upon demand by {{seller}}.
{
    "$class": "org.accordproject.payment.fullupondemand.FullPaymentUponDemandTemplate",
    "contractId": "4d87276a-c55d-404e-8315-7c5bdc47a136",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Dan"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Jerome"
    },
    "value": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 3.14,
        "currencyCode": "EUR"
    }
}

Template Model

namespace org.accordproject.payment.fullupondemand

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.money.MonetaryAmount from https://models.accordproject.org/money.cto
import org.accordproject.payment.PaymentReceived from https://models.accordproject.org/payment/payment.cto

// Template model
asset FullPaymentUponDemandTemplate extends AccordContract {
  o AccordParty buyer
  o AccordParty seller
  o MonetaryAmount value
}

// Request
transaction PaymentDemand extends Request {
}

asset FullPaymentUponDemandState extends AccordContractState {
  o ContractLifecycleStatus status default = "INITIALIZED"
}

enum ContractLifecycleStatus {
  o INITIALIZED
  o OBLIGATION_EMITTED
  o COMPLETED
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.payment.fullupondemand.FullPaymentUponDemandState
{
    "$class": "org.accordproject.payment.fullupondemand.FullPaymentUponDemandState",
    "status": "INITIALIZED",
    "stateId": "dfb06d20-7b6b-11ea-b280-c173749a9e96"
}

Request Types

Type Sample JSON
org.accordproject.payment.fullupondemand.PaymentDemand
{
    "$class": "org.accordproject.payment.fullupondemand.PaymentDemand",
    "transactionId": "dfb04610-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:43:03.281-04:00"
}
org.accordproject.payment.PaymentReceived
{
    "$class": "org.accordproject.payment.PaymentReceived",
    "transactionId": "dfb04611-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:43:03.281-04:00"
}

Response Types

Type Sample JSON
org.accordproject.cicero.runtime.Response
{
    "$class": "org.accordproject.cicero.runtime.Response",
    "transactionId": "dfb04613-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:43:03.281-04:00"
}

Events Types

Type Sample JSON
org.accordproject.base.Event
{
    "abstract": "this is an abstract type"
}
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 227.613,
        "currencyCode": "ALL"
    },
    "description": "Sit dolore reprehenderit anim.",
    "contract": "resource:org.accordproject.payment.fullupondemand.FullPaymentUponDemandTemplate#0884",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#2224",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#2010",
    "deadline": "2020-04-10T16:43:03.282-04:00",
    "eventId": "dfb06d21-7b6b-11ea-b280-c173749a9e96",
    "timestamp": "2020-04-10T16:43:03.282-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.