Fork me on GitHub

Template one-time-payment@0.1.0

Contract Ergo ^0.4.4

This is a one time payment contract applicable at execution of that contract.

Download Archive

One Time Payment Contract

This is a one time payment contract applicable at execution of that contract.

Sample

An initial payment of 0.01 USD shall be made by "Dan" to "Steve" upon execution of this Agreement.

                

Model Dependencies

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 on GitHub.

Sample Instance

{
    "$class": "org.accordproject.payment.onetime.OneTimePaymentContract",
    "contractId": "49d9e135-07da-4a3f-bde1-0727250c349b",
    "partyA": "Dan",
    "partyB": "Steve",
    "initialAmount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 0.01,
        "currencyCode": "USD"
    }
}

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "c81dd820-794a-11e8-8ca1-7d833b1ca035"
}

Request Types

Type Sample JSON
org.accordproject.payment.onetime.MyRequest
{
    "$class": "org.accordproject.payment.onetime.MyRequest",
    "transactionId": "c81db110-794a-11e8-8ca1-7d833b1ca035",
    "timestamp": "2018-06-26T14:11:12.673Z"
}

Response Types

Type Sample JSON
org.accordproject.payment.onetime.MyResponse
{
    "$class": "org.accordproject.payment.onetime.MyResponse",
    "transactionId": "c81db111-794a-11e8-8ca1-7d833b1ca035",
    "timestamp": "2018-06-26T14:11:12.673Z"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 143.054,
        "currencyCode": "ZWL"
    },
    "description": "Quis.",
    "contract": "resource:org.accordproject.payment.onetime.OneTimePaymentContract#5881",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#8846",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#2298",
    "deadline": "2018-06-26T14:11:12.674Z",
    "eventId": "c81dd821-794a-11e8-8ca1-7d833b1ca035",
    "timestamp": "2018-06-26T14:11:12.674Z"
}