Fork me on GitHub

Template payment-upon-delivery@0.5.0

Contract Ergo ^0.9.1 41aabb0c5185a0a076413571fccc3c3d96831ab18c9b01f07c36410bb7d61abe

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": "d32465e7-0983-45cd-a3df-7888729fb5f0",
    "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": "61c1f762-dd3f-11e8-a95c-95b9dbcf241c"
}

Request Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedRequest
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedRequest",
    "transactionId": "61c1f760-dd3f-11e8-a95c-95b9dbcf241c",
    "timestamp": "2018-10-31T19:01:32.758Z"
}

Response Types

Type Sample JSON
org.accordproject.payment.upondelivery.DeliveryAcceptedResponse
{
    "$class": "org.accordproject.payment.upondelivery.DeliveryAcceptedResponse",
    "transactionId": "61c1f761-dd3f-11e8-a95c-95b9dbcf241c",
    "timestamp": "2018-10-31T19:01:32.758Z"
}

Events Types

Type Sample JSON
org.accordproject.cicero.runtime.PaymentObligation
{
    "$class": "org.accordproject.cicero.runtime.PaymentObligation",
    "amount": {
        "$class": "org.accordproject.money.MonetaryAmount",
        "doubleValue": 47.11,
        "currencyCode": "BIF"
    },
    "description": "Laboris occaecat fugiat.",
    "contract": "resource:org.accordproject.payment.upondelivery.PaymentUponDeliveryContract#9429",
    "promisor": "resource:org.accordproject.cicero.contract.AccordParty#5408",
    "promisee": "resource:org.accordproject.cicero.contract.AccordParty#8726",
    "deadline": "2018-10-31T19:01:32.759Z",
    "eventId": "61c21e70-dd3f-11e8-a95c-95b9dbcf241c",
    "timestamp": "2018-10-31T19:01:32.759Z"
}