Payment upon delivery
This is a one time payment contract upon acceptance of delivery.
This is a one time payment contract upon acceptance of delivery.
This is a one time payment contract upon acceptance of delivery.
Upon delivery and acceptance, "Michael" shall pay to "Diana" the cost of goods (9.99 USD) and the delivery fee (1.99 USD).
Upon delivery and acceptance, "Michael" shall pay to "Diana" the cost of goods (9.99 USD) and the delivery fee (1.99 USD).
Upon delivery and acceptance, {{buyer}} shall pay to {{seller}} the cost of goods ({{costOfGoods}} {{currencyCode}}) and the delivery fee ({{deliveryFee}} {{currencyCode}}).
{
"$class": "org.accordproject.paymentupondelivery@0.1.0.TemplateModel",
"buyer": "resource:org.accordproject.party.Party#Michael",
"seller": "resource:org.accordproject.party.Party#Diana",
"costOfGoods": {
"$class": "org.accordproject.money.MonetaryAmount",
"doubleValue": 9.99,
"currencyCode": "USD"
},
"deliveryFee": {
"$class": "org.accordproject.money.MonetaryAmount",
"doubleValue": 1.99,
"currencyCode": "USD"
},
"$identifier": "14a1a72f-99da-4d76-947d-d62b26e98c68",
"clauseId": "14a1a72f-99da-4d76-947d-d62b26e98c68"
}
namespace org.accordproject.paymentupondelivery@0.1.0
import org.accordproject.contract@0.2.0.Clause from https://models.accordproject.org/accordproject/contract@0.2.0.cto
import org.accordproject.runtime@0.2.0.{Request,Response} from https://models.accordproject.org/accordproject/runtime@0.2.0.cto
/**
* The template model
*/
@template
asset TemplateModel extends Clause {
o String buyer
o String seller
o Double costOfGoods
o Double deliveryFee
o String currencyCode
}
transaction DeliveryAcceptedRequest extends Request {}
transaction DeliveryAcceptedResponse extends Response {
o Double totalAmount
o String currencyCode
}
// Event emitted when a payment obligation is triggered
event PaymentObligationEvent {
o Double amount
o String currencyCode
o String description
}
Find the full logic for this template on on GitHub.
| Type | Sample JSON |
|---|---|
| org.accordproject.runtime@0.2.0.State | |
| Type | Sample JSON |
|---|---|
| org.accordproject.paymentupondelivery@0.1.0.DeliveryAcceptedRequest | |
| org.accordproject.runtime@0.2.0.Request | |
| Type | Sample JSON |
|---|---|
| org.accordproject.paymentupondelivery@0.1.0.DeliveryAcceptedResponse | |
| org.accordproject.runtime@0.2.0.Response | |
| Type | Sample JSON |
|---|
Please refer to the Accord Project documentation for how to use a template or integrate it within your application.
View the Latest code for this template on GitHub.