Full Payment Upon Demand

Author: Accord Project

full-payment-upon-demand@0.9.0 Contract ^0.22.0 2e78a04c1386df2343384b71fac1b861fa471526299a8c6a8b697d0a07f495b2

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

Download Archive Download Compiled 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",
    "buyer": "resource:org.accordproject.party.Party#Dan",
    "seller": "resource:org.accordproject.party.Party#Jerome",
    "value": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 3.14,
        "currencyCode": "EUR"
    },
    "contractId": "d3b7e05a-d889-4604-b4bf-3c72eb773d4c",
    "$identifier": "d3b7e05a-d889-4604-b4bf-3c72eb773d4c"
}

Template Model

namespace org.accordproject.payment.fullupondemand

import org.accordproject.contract.* from https://models.accordproject.org/accordproject/contract.cto
import org.accordproject.party.* from https://models.accordproject.org/accordproject/party.cto
import org.accordproject.runtime.* from https://models.accordproject.org/accordproject/runtime.cto
import org.accordproject.obligation.* from https://models.accordproject.org/accordproject/obligation.cto
import org.accordproject.money.MonetaryAmount from https://models.accordproject.org/money@0.2.0.cto
import org.accordproject.payment.PaymentReceived from https://models.accordproject.org/payment/payment@0.2.0.cto

// Template model
asset FullPaymentUponDemandTemplate extends Contract {
  --> Party buyer
  --> Party seller
  o MonetaryAmount value
}

// Request
transaction PaymentDemand extends Request {
}

asset FullPaymentUponDemandState extends State {
  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",
    "$identifier": "7c89e540-a77b-11eb-9770-7ddd576a12c2"
}

Request Types

Type Sample JSON
org.accordproject.payment.fullupondemand.PaymentDemand
{
    "$class": "org.accordproject.payment.fullupondemand.PaymentDemand",
    "$timestamp": "2021-04-27T13:10:37.715-04:00"
}
org.accordproject.payment.PaymentReceived
{
    "$class": "org.accordproject.payment.PaymentReceived",
    "$timestamp": "2021-04-27T13:10:37.715-04:00"
}

Response Types

Type Sample JSON
org.accordproject.runtime.Response
{
    "$class": "org.accordproject.runtime.Response",
    "$timestamp": "2021-04-27T13:10:37.715-04:00"
}

Events Types

Type Sample JSON
concerto.Event
{
    "abstract": "this is an abstract type"
}
org.accordproject.obligation.PaymentObligation
{
    "$class": "org.accordproject.obligation.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 100.403,
        "currencyCode": "TZS"
    },
    "description": "Ad.",
    "$identifier": "7c89e541-a77b-11eb-9770-7ddd576a12c2",
    "contract": "resource:org.accordproject.payment.fullupondemand.FullPaymentUponDemandTemplate#0877",
    "promisor": "resource:org.accordproject.party.Party#6299",
    "promisee": "resource:org.accordproject.party.Party#0533",
    "deadline": "2021-04-27T13:10:37.716-04:00",
    "$timestamp": "2021-04-27T13:10:37.716-04:00"
}

Technical Integration

Please refer to the Accord Project documentation for how to use a template or integrate it within your application.

View the Latest code for this template on GitHub.