Please report issues and contribute improvements on GitHub!

Template payment-upon-delivery@0.7.0

Contract Ergo ^0.11.1 0819411a4981accb69c2d7c9bccc46c164ced4e200e1e599fc4a3ff9eebce30b

This is a one time payment contract upon acceptance of delivery.

Download Archive Open in Template Studio

Payment upon delivery

This is a one time payment contract upon acceptance of delivery.

Sample

Upon delivery and acceptance, "Michael" shall pay to "Diana" the cost of goods (9.99 USD) and the delivery fee (1.99 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.upondelivery.PaymentUponDeliveryContract",
    "contractId": "3c9bf8f7-1cda-4494-98c0-23f57508ee9f",
    "buyer": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Michael"
    },
    "seller": {
        "$class": "org.accordproject.cicero.contract.AccordParty",
        "partyId": "Diana"
    },
    "costOfGoods": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 9.99,
        "currencyCode": "USD"
    },
    "deliveryFee": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 1.99,
        "currencyCode": "USD"
    }
}

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "2d920dd1-4bae-11e9-8561-af645d56312b"
}

Request Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedRequest
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedRequest",
    "transactionId": "2d91e6c0-4bae-11e9-8561-af645d56312b",
    "timestamp": "2019-03-21T07:51:47.244+00:00"
}

Response Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedResponse
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedResponse",
    "transactionId": "2d920dd0-4bae-11e9-8561-af645d56312b",
    "timestamp": "2019-03-21T07:51:47.245+00:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 177.373,
        "currencyCode": "SDG"
    },
    "description": "Qui nostrud.",
    "contract": "resource:org.accordproject.payment.upondelivery.PaymentUponDeliveryContract#0304",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#7235",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#8471",
    "deadline": "2019-03-21T07:51:47.245+00:00",
    "eventId": "2d920dd2-4bae-11e9-8561-af645d56312b",
    "timestamp": "2019-03-21T07:51:47.245+00:00"
}