Template payment-upon-delivery@0.9.0

Contract ^0.13.0 dce9ef7adc44723569f7405297ee1cf1dd407007d0a1d7dfb9cd21df1c4514b9

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": "414723ce-fa48-4511-9b37-6786c15e65a0",
    "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": "7b45aa70-9cce-11e9-9a6f-d5f6456622aa"
}

Request Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedRequest
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedRequest",
    "transactionId": "7b458360-9cce-11e9-9a6f-d5f6456622aa",
    "timestamp": "2019-07-02T09:37:05.686-04:00"
}

Response Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedResponse
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedResponse",
    "transactionId": "7b458361-9cce-11e9-9a6f-d5f6456622aa",
    "timestamp": "2019-07-02T09:37:05.686-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": 130.235,
        "currencyCode": "DZD"
    },
    "description": "Laboris tempor est sit elit.",
    "contract": "resource:org.accordproject.payment.upondelivery.PaymentUponDeliveryContract#1166",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#7248",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#4823",
    "deadline": "2019-07-02T09:37:05.687-04:00",
    "eventId": "7b45aa71-9cce-11e9-9a6f-d5f6456622aa",
    "timestamp": "2019-07-02T09:37:05.687-04:00"
}