Payment Upon Delivery

payment-upon-delivery@0.9.1 Contract ^0.13.0 c97fda784d514cf4d9c8e5fc42bb45d1e3444682c7f17ad5fee38ac3ea3d0417

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

Download Archive Open in Template Studio Open in VSCode Web

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": "17fb67da-9dd8-4f05-960d-d9958144cb11",
    "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": "2dcb30d1-b399-11e9-a415-2f2abeed0243"
}

Request Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedRequest
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedRequest",
    "transactionId": "2dcb09c0-b399-11e9-a415-2f2abeed0243",
    "timestamp": "2019-07-31T09:43:29.117-04:00"
}

Response Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedResponse
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedResponse",
    "transactionId": "2dcb30d0-b399-11e9-a415-2f2abeed0243",
    "timestamp": "2019-07-31T09:43:29.117-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": 37.284,
        "currencyCode": "TND"
    },
    "description": "Duis sit cillum excepteur cillum.",
    "contract": "resource:org.accordproject.payment.upondelivery.PaymentUponDeliveryContract#0526",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#2341",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#7986",
    "deadline": "2019-07-31T09:43:29.118-04:00",
    "eventId": "2dcb57e0-b399-11e9-a415-2f2abeed0243",
    "timestamp": "2019-07-31T09:43:29.118-04:00"
}