Fork me on GitHub

Template payment-upon-delivery@0.2.0

Contract Ergo ^0.6.0 ba865522088da6420fb0b939b04221de7c21a7fc28234bc7397031b8a755880a

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

Download Archive

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": "796b8cec-2401-4e06-a2c0-c24c9c56eda8",
    "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": "dd1b9841-a157-11e8-bed5-15302d68d0b1"
}

Request Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedRequest
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedRequest",
    "transactionId": "dd1b7130-a157-11e8-bed5-15302d68d0b1",
    "timestamp": "2018-08-16T13:25:37.859Z"
}

Response Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedResponse
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedResponse",
    "transactionId": "dd1b9840-a157-11e8-bed5-15302d68d0b1",
    "timestamp": "2018-08-16T13:25:37.860Z"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 45.113,
        "currencyCode": "KPW"
    },
    "description": "Veniam duis.",
    "contract": "resource:org.accordproject.payment.upondelivery.PaymentUponDeliveryContract#5940",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#0929",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#0069",
    "deadline": "2018-08-16T13:25:37.860Z",
    "eventId": "dd1b9842-a157-11e8-bed5-15302d68d0b1",
    "timestamp": "2018-08-16T13:25:37.860Z"
}