Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
Add PaymentInstruction graphic.
Browse files Browse the repository at this point in the history
  • Loading branch information
msporny committed Jun 18, 2016
1 parent f9003ed commit 32fd511
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 78 deletions.
166 changes: 88 additions & 78 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,82 +288,6 @@ <h2>The Data Model</h2>

</section>

<section>
<h2>Core Message Components</h2>

<section>
<h3><dfn>FinancialAmount</dfn></h3>
<p>
A <a><code>FinancialAmount</code></a> is used to express a scalar financial
value.
</p>
<dl>
<dt><code><dfn>currency</dfn></code></dt>
<dd>
<code>currency</code> is a string containing a three-character alphaneumeric
code for the currency as defined by [[!ISO4217]] or a URL for a currency
identifier. For example, <code>"USD"</code> for US Dollars or
<code>"https://example.com/currencies/experimental-XYZ"</code> for a new
experimental currency.
</dd>
<dt><code><dfn>amount</dfn></code></dt>
<dd>
A string containing the decimal monetary value. The string MUST use a single
U+002E FULL STOP character as the decimal separator. All other characters
must be characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).
<div class="note">
The string should match the regular expression
<code>^[0-9]+(\.[0-9]+)?$</code>.
</div>
</dd>
</dl>

<p>The following example shows how to represent $55.00 US Dollars.</p>
<pre class="example highlight" title="$55 US Dollars expressed as JSON">
{
"amount": "55.00",
"currency": "USD"
}
</pre>
</section>

<section>
<h3><dfn>PaymentTerms</dfn></h3>

<p>
<a><code>PaymentTerms</code></a> express the type of payment method,
amount, and other information under which a transaction may be fulfilled.
</p>
<dl>
<dt><code>paymentMethod</code></dt>
<dd>
One or more payment method identifiers (as defined in
an associated payment method specification). For example,
<code>"VisaLegacy"</code> or
<code>"https://newnetwork.example.com/methods/SuperCard"</code>

</dd>
<dt><code>paymentAmount</code></dt>
<dd>
The <a>FinancialAmount</a> requested by the <a>payee</a>. The value may also be
a set of <a>FinancialAmount</a>s that express the desired amount in
different currencies.
</dd>
</dl>

<pre class="example highlight"
title="Payment for $4.35 USD may be fulfilled using non-tokenized Visa and Mastercard expressed as JSON">
{
"paymentMethod": ["VisaLegacy", "MasterCardLegacy"],
"paymentAmount": {
"amount": "4.35",
"currency": "USD"
}
</pre>

</section>
</section>

<section>
<h2>Core Messages</h2>

Expand All @@ -374,6 +298,15 @@ <h3><dfn>PaymentInstruction</dfn></h3>
A <a><code>PaymentInstruction</code></a> expresses a payment that is requested
by a <a>payee</a>.
</p>


<figure>
<img style="margin: auto; display: block;" width="50%" src="payment-instruction.svg">
<figcaption style="text-align: center;">
- The contents of a PaymentInstruction message.
</figcaption>
</figure>

<dl>
<dt><code>type</code></dt>
<dd>
Expand All @@ -394,7 +327,7 @@ <h3><dfn>PaymentInstruction</dfn></h3>
</dd>
<dt><code>paymentTerms</code></dt>
<dd>
One or more <a>PaymentTerm</a>s that the <a>payee</a> will
One or more <a>PaymentTerms</a> that the <a>payee</a> will
accept as payment.
</dd>
</dl>
Expand All @@ -415,7 +348,7 @@ <h3><dfn>PaymentInstruction</dfn></h3>

<p class="issue" data-number="3" title="Validation of values that may contain more than one item">
Whether or not values that may contain one or more items, such as
<code>acceptablePayment</code> above should throw an error during validation
<code>paymentTerms</code> above should throw an error during validation
if they are not an array is under discussion. That is, should we say that
values that could contain more than one item MUST always be wrapped in an array?
</p>
Expand Down Expand Up @@ -474,6 +407,83 @@ <h3><dfn>PaymentResponse</dfn></h3>
};
</pre>
</section>

<section>
<h2>Supporting Datatypes</h2>

<section>
<h3><dfn>FinancialAmount</dfn></h3>
<p>
A <a><code>FinancialAmount</code></a> is used to express a scalar financial
value.
</p>
<dl>
<dt><code><dfn>currency</dfn></code></dt>
<dd>
<code>currency</code> is a string containing a three-character alphaneumeric
code for the currency as defined by [[!ISO4217]] or a URL for a currency
identifier. For example, <code>"USD"</code> for US Dollars or
<code>"https://example.com/currencies/experimental-XYZ"</code> for a new
experimental currency.
</dd>
<dt><code><dfn>amount</dfn></code></dt>
<dd>
A string containing the decimal monetary value. The string MUST use a single
U+002E FULL STOP character as the decimal separator. All other characters
must be characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).
<div class="note">
The string should match the regular expression
<code>^[0-9]+(\.[0-9]+)?$</code>.
</div>
</dd>
</dl>

<p>The following example shows how to represent $55.00 US Dollars.</p>
<pre class="example highlight" title="$55 US Dollars expressed as JSON">
{
"amount": "55.00",
"currency": "USD"
}
</pre>
</section>

<section>
<h3><dfn>PaymentTerms</dfn></h3>

<p>
<a><code>PaymentTerms</code></a> express the type of payment method,
amount, and other information under which a transaction may be fulfilled.
</p>
<dl>
<dt><code>paymentMethod</code></dt>
<dd>
One or more payment method identifiers (as defined in
an associated payment method specification). For example,
<code>"VisaLegacy"</code> or
<code>"https://newnetwork.example.com/methods/SuperCard"</code>

</dd>
<dt><code>paymentAmount</code></dt>
<dd>
The <a>FinancialAmount</a> requested by the <a>payee</a>. The value may also be
a set of <a>FinancialAmount</a>s that express the desired amount in
different currencies.
</dd>
</dl>

<pre class="example highlight"
title="Payment for $4.35 USD may be fulfilled using non-tokenized Visa and Mastercard expressed as JSON">
{
"paymentMethod": ["VisaLegacy", "MasterCardLegacy"],
"paymentAmount": {
"amount": "4.35",
"currency": "USD"
}
</pre>

</section>
</section>

</section>

<section>
Expand Down
Loading

0 comments on commit 32fd511

Please sign in to comment.