Fork me on GitHub

Template one-time-payment@0.9.0

Contract Ergo ^0.8.0 5878ea3a62edd84185b22004549cb25e0c35f986acf350f166e73194a353ea04

Full Payment Upon Signature

Download Archive

Full Payment Upon Signature

This is a one-time full payment contract applicable at signature of the contract.

Sample

Upon the signing of this Agreement, "Dan" shall pay the total purchase price to "Steve" in the amount of 0.01 USD.
                

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": "ee2d7759-c2ea-41a5-9bca-7c0cc6bef0c5",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Dan"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Steve"
    },
    "totalPurchasePrice": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 0.01,
        "currencyCode": "USD"
    }
}

State Types

Type Sample JSON
org.accordproject.payment.onetime.OneTimePaymentState
{
    "$class": "org.accordproject.payment.onetime.OneTimePaymentState",
    "status": "UNINITIALIZED",
    "stateId": "089e7ee0-b5f5-11e8-98f1-f70046c609b7"
}

Request Types

Type Sample JSON
org.accordproject.cicero.runtime.Request
{
    "$class": "org.accordproject.cicero.runtime.Request",
    "transactionId": "089e57d0-b5f5-11e8-98f1-f70046c609b7",
    "timestamp": "2018-09-11T19:01:05.101Z"
}
org.accordproject.payment.onetime.PaymentReceivedRequest
{
    "$class": "org.accordproject.payment.onetime.PaymentReceivedRequest",
    "transactionId": "089e57d1-b5f5-11e8-98f1-f70046c609b7",
    "timestamp": "2018-09-11T19:01:05.101Z"
}

Response Types

Type Sample JSON
org.accordproject.cicero.runtime.Response
{
    "$class": "org.accordproject.cicero.runtime.Response",
    "transactionId": "089e57d2-b5f5-11e8-98f1-f70046c609b7",
    "timestamp": "2018-09-11T19:01:05.101Z"
}
org.accordproject.payment.onetime.PaymentReceivedResponse
{
    "$class": "org.accordproject.payment.onetime.PaymentReceivedResponse",
    "transactionId": "089e57d3-b5f5-11e8-98f1-f70046c609b7",
    "timestamp": "2018-09-11T19:01:05.101Z"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 204.555,
        "currencyCode": "NPR"
    },
    "description": "Fugiat culpa nisi.",
    "contract": "resource:org.accordproject.payment.onetime.OneTimePaymentContract#5440",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#1840",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#4839",
    "deadline": "2018-09-11T19:01:05.102Z",
    "eventId": "089e7ee1-b5f5-11e8-98f1-f70046c609b7",
    "timestamp": "2018-09-11T19:01:05.102Z"
}
org.hyperledger.composer.system.Event
{
    "abstract": "this is an abstract type"
}