Full Payment Upon Demand

full-payment-upon-demand@0.7.0 Contract ^0.20.0 ab368de8706b73c58acde08ec04c289a6ea7d118523608c63cb898ead0715168

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

Download Archive Open in Template Studio Open in VSCode Web

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": "0b6c865e-7441-4182-b0b8-917f78ae7337",
    "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": "5adf1cd1-42fa-11ea-8b78-dde257dbceb0"
}

Request Types

Type Sample JSON
org.accordproject.payment.fullupondemand.PaymentDemand
{
    "$class": "org.accordproject.payment.fullupondemand.PaymentDemand",
    "transactionId": "5adeceb0-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:22.203-05:00"
}
org.accordproject.payment.PaymentReceived
{
    "$class": "org.accordproject.payment.PaymentReceived",
    "transactionId": "5adeceb1-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:22.203-05:00"
}

Response Types

Type Sample JSON
org.accordproject.cicero.runtime.Response
{
    "$class": "org.accordproject.cicero.runtime.Response",
    "transactionId": "5adef5c1-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:22.204-05: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": 31.958,
        "currencyCode": "PLN"
    },
    "description": "Id amet Lorem officia.",
    "contract": "resource:org.accordproject.payment.fullupondemand.FullPaymentUponDemandTemplate#6584",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#4225",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#9642",
    "deadline": "2020-01-29T19:49:22.205-05:00",
    "eventId": "5adf1cd2-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:22.205-05: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.