Please report issues and contribute improvements on GitHub!

Template payment-upon-delivery@0.8.1

Contract ^0.12.0 42f036112f553a70b2bcfe4361202b7943ec25dc03e45ed72bbf11b17e9a9b2a

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": "36ae971b-bb50-4479-b1b3-887dacee4e49",
    "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": "9e885641-60ab-11e9-ba69-a3cec1fc66e2"
}

Request Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedRequest
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedRequest",
    "transactionId": "9e882f30-60ab-11e9-ba69-a3cec1fc66e2",
    "timestamp": "2019-04-17T00:56:22.691+00:00"
}

Response Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedResponse
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedResponse",
    "transactionId": "9e885640-60ab-11e9-ba69-a3cec1fc66e2",
    "timestamp": "2019-04-17T00:56:22.692+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": 92.427,
        "currencyCode": "VND"
    },
    "description": "In consequat.",
    "contract": "resource:org.accordproject.payment.upondelivery.PaymentUponDeliveryContract#3359",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#0318",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#2300",
    "deadline": "2019-04-17T00:56:22.693+00:00",
    "eventId": "9e887d50-60ab-11e9-ba69-a3cec1fc66e2",
    "timestamp": "2019-04-17T00:56:22.693+00:00"
}