Payment Upon Signature

Author: Accord Project

payment-upon-signature@0.9.0 Contract ^0.21.0 58b12cb2e26fb5ef28435bf02e8f23fe0839740f23d6b3fb756f2d4aeeb1fee3

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",
    "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"
    },
    "contractId": "4ee1e301-77fd-4bc1-92bd-50ae3a4d320f"
}

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": "INITIALIZED",
    "stateId": "8df598d2-cd1d-11ea-920c-ade26666d144"
}

Request Types

Type Sample JSON
org.accordproject.payment.PaymentReceived
{
    "$class": "org.accordproject.payment.PaymentReceived",
    "transactionId": "8df571c0-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:49:00.764-04:00"
}
org.accordproject.signature.ContractSigned
{
    "$class": "org.accordproject.signature.ContractSigned",
    "contract": "resource:org.accordproject.payment.uponsignature.PaymentUponSignatureContract#0848",
    "transactionId": "8df54ab0-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:49:00.764-04:00"
}

Response Types

Type Sample JSON
org.accordproject.cicero.runtime.Response
{
    "$class": "org.accordproject.cicero.runtime.Response",
    "transactionId": "8df598d0-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:49:00.765-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": 207.344,
        "currencyCode": "INR"
    },
    "description": "Aliquip amet est.",
    "contract": "resource:org.accordproject.payment.uponsignature.PaymentUponSignatureContract#8557",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#0640",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#3308",
    "deadline": "2020-07-23T15:49:00.765-04:00",
    "eventId": "8df598d3-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:49:00.765-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.