Full Payment Upon Demand

Author: Accord Project

full-payment-upon-demand@0.8.0 Contract ^0.21.0 f886664fdf4bc7219619d72b568a5f81ce287c737c3a539f1d3eeab817e21b28

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

Download Archive Download Compiled 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",
    "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"
    },
    "contractId": "e2a9ba98-ec35-4b1f-968e-df4df5a5e6a8"
}

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": "67b014c0-cd1d-11ea-920c-ade26666d144"
}

Request Types

Type Sample JSON
org.accordproject.payment.fullupondemand.PaymentDemand
{
    "$class": "org.accordproject.payment.fullupondemand.PaymentDemand",
    "transactionId": "67afc6a0-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:47:56.554-04:00"
}
org.accordproject.payment.PaymentReceived
{
    "$class": "org.accordproject.payment.PaymentReceived",
    "transactionId": "67afc6a1-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:47:56.554-04:00"
}

Response Types

Type Sample JSON
org.accordproject.cicero.runtime.Response
{
    "$class": "org.accordproject.cicero.runtime.Response",
    "transactionId": "67afedb1-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:47:56.555-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": 159.399,
        "currencyCode": "BGN"
    },
    "description": "Adipisicing consectetur nulla adipisicing.",
    "contract": "resource:org.accordproject.payment.fullupondemand.FullPaymentUponDemandTemplate#3136",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#5536",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#9445",
    "deadline": "2020-07-23T15:47:56.556-04:00",
    "eventId": "67b014c1-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:47:56.556-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.