Please report issues and contribute improvements on GitHub!

Template payment-upon-delivery@0.8.0

Contract ^0.12.0 6c71dbfd539e44c4a684cf91a7032866cec8d22da675a190fcd58ac3a48b7d3d

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": "18231408-fe4d-49bd-ac39-c5ad97d15136",
    "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": "cc254380-575d-11e9-9ffa-db0629e5d319"
}

Request Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedRequest
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedRequest",
    "transactionId": "cc251c70-575d-11e9-9ffa-db0629e5d319",
    "timestamp": "2019-04-05T00:46:38.007-04:00"
}

Response Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedResponse
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedResponse",
    "transactionId": "cc251c71-575d-11e9-9ffa-db0629e5d319",
    "timestamp": "2019-04-05T00:46:38.008-04:00"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 123.802,
        "currencyCode": "PYG"
    },
    "description": "Minim occaecat occaecat occaecat nisi.",
    "contract": "resource:org.accordproject.payment.upondelivery.PaymentUponDeliveryContract#0117",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#4442",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#7207",
    "deadline": "2019-04-05T00:46:38.008-04:00",
    "eventId": "cc254381-575d-11e9-9ffa-db0629e5d319",
    "timestamp": "2019-04-05T00:46:38.008-04:00"
}