Payment Upon Signature

Author: Accord Project

payment-upon-signature@0.8.2 Contract ^0.20.10 e371a307f688d5499143d4e2d9acc07d1bc420da478b2bd1aae19404068659a1

This is a generic payment clause applicable to any type of contract that requires some payment at the time of signature.

Download Archive Download Compiled Archive Open in Template Studio

Payment Upon Signature

This is a generic payment clause applicable to any type of contract that requires some payment at the time of signature.

Template Text

Upon the signing of this Agreement, "Dave" shall pay 50 USD to "Dan".

Upon the signing of this Agreement, "Dave" shall pay 50 USD to "Dan".
Upon the signing of this Agreement, {{buyer}} shall pay {{amount}} to {{seller}}.
{
    "$class": "org.accordproject.payment.uponsignature.PaymentUponSignatureContract",
    "contractId": "5e0db464-4c26-4509-920b-9ef208389de5",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Dave"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Dan"
    },
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 50,
        "currencyCode": "USD"
    }
}

Template Model

namespace org.accordproject.payment.uponsignature

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

asset PaymentUponSignatureState extends AccordContractState {
  o ContractLifecycleStatus status
}

enum ContractLifecycleStatus {
  o INITIALIZED
  o OBLIGATION_EMITTED
  o COMPLETED
}

/**
 * The template model
 */
asset PaymentUponSignatureContract extends AccordContract {
  o AccordParty buyer
  o AccordParty seller
  o MonetaryAmount amount
}

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.payment.uponsignature.PaymentUponSignatureState
{
    "$class": "org.accordproject.payment.uponsignature.PaymentUponSignatureState",
    "status": "OBLIGATION_EMITTED",
    "stateId": "059bb5f3-cb7e-11ea-a120-8d15cef0831b"
}

Request Types

Type Sample JSON
org.accordproject.payment.PaymentReceived
{
    "$class": "org.accordproject.payment.PaymentReceived",
    "transactionId": "059b8ee0-cb7e-11ea-a120-8d15cef0831b",
    "timestamp": "2020-07-21T20:14:30.862+02:00"
}
org.accordproject.signature.ContractSigned
{
    "$class": "org.accordproject.signature.ContractSigned",
    "contract": "resource:org.accordproject.payment.uponsignature.PaymentUponSignatureContract#4108",
    "transactionId": "059af2a0-cb7e-11ea-a120-8d15cef0831b",
    "timestamp": "2020-07-21T20:14:30.858+02:00"
}

Response Types

Type Sample JSON
org.accordproject.cicero.runtime.Response
{
    "$class": "org.accordproject.cicero.runtime.Response",
    "transactionId": "059bb5f1-cb7e-11ea-a120-8d15cef0831b",
    "timestamp": "2020-07-21T20:14:30.863+02: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": 98.038,
        "currencyCode": "COP"
    },
    "description": "Adipisicing proident velit.",
    "contract": "resource:org.accordproject.payment.uponsignature.PaymentUponSignatureContract#8000",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#4825",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#7263",
    "deadline": "2020-07-21T20:14:30.864+02:00",
    "eventId": "059bdd00-cb7e-11ea-a120-8d15cef0831b",
    "timestamp": "2020-07-21T20:14:30.864+02: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.