Fork me on GitHub

Template one-time-payment@0.4.0

Contract Ergo ^0.4.4 26e978ffc4583edf205d4e363f7eddd061819f1aa68dda41478fbbdeb3c15498

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": "7ed16a65-5e39-4415-84c9-1e39b20ccefd",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Dan"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "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": "b26e5a44-85ed-11e8-bfc4-b186147bdb41"
}

Request Types

Type Sample JSON
org.accordproject.payment.onetime.InitRequest
{
    "$class": "org.accordproject.payment.onetime.InitRequest",
    "transactionId": "b26e3330-85ed-11e8-bfc4-b186147bdb41",
    "timestamp": "2018-07-12T16:07:38.211Z"
}
org.accordproject.payment.onetime.PaymentReceivedRequest
{
    "$class": "org.accordproject.payment.onetime.PaymentReceivedRequest",
    "transactionId": "b26e5a40-85ed-11e8-bfc4-b186147bdb41",
    "timestamp": "2018-07-12T16:07:38.212Z"
}

Response Types

Type Sample JSON
org.accordproject.payment.onetime.InitResponse
{
    "$class": "org.accordproject.payment.onetime.InitResponse",
    "transactionId": "b26e5a41-85ed-11e8-bfc4-b186147bdb41",
    "timestamp": "2018-07-12T16:07:38.212Z"
}
org.accordproject.payment.onetime.PaymentReceivedResponse
{
    "$class": "org.accordproject.payment.onetime.PaymentReceivedResponse",
    "transactionId": "b26e5a42-85ed-11e8-bfc4-b186147bdb41",
    "timestamp": "2018-07-12T16:07:38.212Z"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 29.864,
        "currencyCode": "LYD"
    },
    "description": "Aliquip minim.",
    "contract": "resource:org.accordproject.payment.onetime.OneTimePaymentContract#4409",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#4365",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#9762",
    "deadline": "2018-07-12T16:07:38.212Z",
    "eventId": "b26e5a45-85ed-11e8-bfc4-b186147bdb41",
    "timestamp": "2018-07-12T16:07:38.212Z"
}
org.hyperledger.composer.system.Event
{
    "abstract": "this is an abstract type"
}