Fork me on GitHub

Template one-time-payment@0.2.0

Contract Ergo ^0.4.4 22528bb9eeb82596612d30dce8960252c093b12f94d0aafe841e7ca351431241

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": "2e2a93cd-9378-414d-a914-e0e83c0e3bf0",
    "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": "9e38af60-795b-11e8-9e1a-f1b99981beac"
}

Request Types

Type Sample JSON
org.accordproject.payment.onetime.InitPaymentRequest
{
    "$class": "org.accordproject.payment.onetime.InitPaymentRequest",
    "transactionId": "9e388850-795b-11e8-9e1a-f1b99981beac",
    "timestamp": "2018-06-26T16:11:43.829Z"
}

Response Types

Type Sample JSON
org.accordproject.payment.onetime.InitPaymentResponse
{
    "$class": "org.accordproject.payment.onetime.InitPaymentResponse",
    "transactionId": "9e388851-795b-11e8-9e1a-f1b99981beac",
    "timestamp": "2018-06-26T16:11:43.830Z"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 96.083,
        "currencyCode": "MOP"
    },
    "description": "Voluptate ea.",
    "contract": "resource:org.accordproject.payment.onetime.OneTimePaymentContract#5638",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#3420",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#2487",
    "deadline": "2018-06-26T16:11:43.830Z",
    "eventId": "9e38af61-795b-11e8-9e1a-f1b99981beac",
    "timestamp": "2018-06-26T16:11:43.830Z"
}