<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-authors-datarightplus-resource-set-banking-00" submissionType="independent" category="exp" xml:lang="en" indexInclude="true">

<front>
<title>DataRight+: Banking Resource Set</title><seriesInfo value="draft-authors-datarightplus-resource-set-banking-00" stream="independent" status="experimental" name="Internet-Draft"/>
<author initials="S." surname="Low" fullname="Stuart Low"><organization>Biza.io</organization><address><postal><street/>
</postal><email>stuart@biza.io</email>
</address></author><date/>
<area>Internet</area>
<workgroup>datarightplus</workgroup>

<abstract>
<t>This is the resource set profile outlining the banking sector related endpoints.</t>
</abstract>

<note><name>Notational Conventions</name>
<t>The keywords "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>",  "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in <xref target="RFC2119"/>.</t>
</note>

</front>

<middle>

<section anchor="scope"><name>Scope</name>
<t>The scope of this document is intended to be limited to the resource server endpoints related to banking, and their associated authorisation contexts.</t>
</section>

<section anchor="terminology"><name>Terminology</name>
<t>This specification utilises the various terms outlined within <xref target="DATARIGHTPLUS-ROSETTA"/>.</t>
</section>

<section anchor="providers"><name>Providers</name>
<t>Providers which providing banking services are expected to deliver a number of resource server end points.</t>

<section anchor="authorisation-server"><name>Authorisation Server</name>
<t>In addition to other provisions incorporated within the relevant ecosystem set, the Provider authorisation server <bcp14>SHALL</bcp14>:</t>

<ol spacing="compact">
<li>Support the <xref target="RFC6749"/> <tt>scope</tt> parameter with possible values outlined within <eref target="#name-authorisation-scopes">Authorisation Scopes</eref>;</li>
</ol>

<section anchor="authorisation-scopes"><name>Authorisation Scopes</name>
<t>The Provider authorisation server <bcp14>SHALL</bcp14> utilise the following Data Set Language when seeking Consumer authorisation from a User for specific <tt>scope</tt> values:</t>
<table>
<thead>
<tr>
<th><tt>scope</tt> value</th>
<th>Data Set Language</th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>bank:accounts.basic:read</tt></td>
<td><strong>Account name, type and balance</strong></td>
</tr>

<tr>
<td/>
<td>Name of account;</td>
</tr>

<tr>
<td/>
<td>Type of account;</td>
</tr>

<tr>
<td/>
<td>Account balance;</td>
</tr>

<tr>
<td><tt>bank:accounts.detail:read</tt></td>
<td><strong>Account numbers and features</strong></td>
</tr>

<tr>
<td/>
<td>Account number;</td>
</tr>

<tr>
<td/>
<td>Interest rates;</td>
</tr>

<tr>
<td/>
<td>Fees;</td>
</tr>

<tr>
<td/>
<td>Discounts;</td>
</tr>

<tr>
<td/>
<td>Account terms;</td>
</tr>

<tr>
<td/>
<td>Account mail address;</td>
</tr>

<tr>
<td><tt>bank:transactions:read</tt></td>
<td><strong>Transaction details</strong></td>
</tr>

<tr>
<td/>
<td>Incoming and outgoing transactions;</td>
</tr>

<tr>
<td/>
<td>Amounts;</td>
</tr>

<tr>
<td/>
<td>Dates;</td>
</tr>

<tr>
<td/>
<td>Descriptions of transactions;</td>
</tr>

<tr>
<td/>
<td>Who you have sent money to and received money from; (e.g. their name)</td>
</tr>

<tr>
<td><tt>bank:regular_payments:read</tt></td>
<td><strong>Direct debits and scheduled payments</strong></td>
</tr>

<tr>
<td/>
<td>Direct debits;</td>
</tr>

<tr>
<td/>
<td>Scheduled payments;</td>
</tr>

<tr>
<td><tt>bank:payees:read</tt></td>
<td><strong>Saved payees</strong></td>
</tr>

<tr>
<td/>
<td>Names and details of accounts you have saved; (e.g. their BSB and Account Number, BPAY CRN and Biller code, or NPP PayID)</td>
</tr>
</tbody>
</table></section>
</section>

<section anchor="overlapping-scope-optimisation"><name>Overlapping Scope Optimisation</name>
<t>Alternative Data Cluster Language <bcp14>SHALL</bcp14> be used when pairs of <tt>scope</tt> value are used as follows:</t>
<table>
<thead>
<tr>
<th><tt>scope</tt> pairing</th>
<th>Data Set Language</th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>bank:accounts.basic:read</tt> and</td>
<td><strong>Account balance and details</strong></td>
</tr>

<tr>
<td><tt>bank:accounts.detail:read</tt></td>
<td>Name of account;</td>
</tr>

<tr>
<td/>
<td>Type of account;</td>
</tr>

<tr>
<td/>
<td>Account balance;</td>
</tr>

<tr>
<td/>
<td>Account number;</td>
</tr>

<tr>
<td/>
<td>Interest rates;</td>
</tr>

<tr>
<td/>
<td>Fees;</td>
</tr>

<tr>
<td/>
<td>Discounts;</td>
</tr>

<tr>
<td/>
<td>Account terms;</td>
</tr>

<tr>
<td/>
<td>Account mail address;</td>
</tr>
</tbody>
</table></section>

<section anchor="resource-server"><name>Resource Server</name>
<t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>bank:accounts.basic:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th><tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /banking/accounts</tt></td>
<td><tt>1</tt> and <tt>2</tt></td>
</tr>

<tr>
<td><tt>GET /banking/accounts/balances</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /banking/accounts/balances</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /banking/accounts/{accountId}/balance</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>bank:accounts.detail:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th><tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /banking/accounts/{accountId}</tt></td>
<td><tt>1</tt>, <tt>2</tt> and <tt>3</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>bank:regular_payments:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th><tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /banking/accounts/direct-debits</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /banking/accounts/direct-debits</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /banking/accounts/{accountId}/direct-debits</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /banking/accounts/{accountId}/payments/scheduled</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>POST /banking/payments/scheduled</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /banking/payments/scheduled</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>bank:payees:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th><tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /banking/payees</tt></td>
<td><tt>2</tt></td>
</tr>

<tr>
<td><tt>GET /banking/payees/{payeeId}</tt></td>
<td><tt>1</tt> and <tt>2</tt></td>
</tr>
</tbody>
</table><t>The Provider <bcp14>SHALL</bcp14> make available, as described further in <xref target="DATARIGHTPLUS-REDOCLY-ID1"/> endpoints, the following endpoints where the token is granted the <tt>bank:transactions:read</tt> scope value:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th><tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /banking/accounts/{accountId}/transactions</tt></td>
<td><tt>1</tt></td>
</tr>

<tr>
<td><tt>GET /banking/accounts/{accountId}/transactions/{transactionId}</tt></td>
<td><tt>1</tt></td>
</tr>
</tbody>
</table><t>In addition, the Provider <bcp14>SHALL</bcp14> deliver the following unauthenticated and generally available endpoints, in accordance with <xref target="DATARIGHTPLUS-REDOCLY-ID1"/>:</t>
<table>
<thead>
<tr>
<th>Resource Server Endpoint</th>
<th><tt>x-v</tt></th>
</tr>
</thead>

<tbody>
<tr>
<td><tt>GET /banking/products</tt></td>
<td><tt>2</tt></td>
</tr>

<tr>
<td><tt>GET /banking/products/{productId}</tt></td>
<td><tt>3</tt> and <tt>4</tt></td>
</tr>
</tbody>
</table></section>
</section>

<section anchor="initiators"><name>Initiators</name>
<t>Initiators <bcp14>SHALL</bcp14> describe the requested <tt>scope</tt> values using the same Data Set Language as Providers, as outlined in <eref target="#name-authorisation-scopes">Authorisation Scopes</eref>.</t>
</section>

<section anchor="acknowledgement"><name>Acknowledgement</name>
<t>The following people contributed to this document:</t>

<ul spacing="compact">
<li>Stuart Low (Biza.io) - Editor</li>
</ul>
<t>We acknowledge the contribution to the <xref target="CDS"/> of the following individuals:</t>

<ul spacing="compact">
<li>James Bligh (Data Standards Body) - Lead Architect for the Consumer Data Right</li>
<li>Mark Verstege (Data Standards Body) - Lead Architect, Banking &amp; Information Security for the Consumer Data Right</li>
<li>Ivan Hosgood (formerly Data Standards Body &amp; ACCC) - Solutions Architect</li>
</ul>
</section>

</middle>

<back>
<references><name>Normative References</name>
<reference anchor="CDS" target="https://consumerdatastandardsaustralia.github.io/standards">
  <front>
    <title>Consumer Data Standards (CDS)</title>
    <author>
      <organization>Data Standards Body (Treasury)</organization>
    </author>
  </front>
</reference>
<reference anchor="DATARIGHTPLUS-REDOCLY-ID1" target="https://datarightplus.github.io/datarightplus-redocly/?v=ID1">
  <front>
    <title>DataRight+: Redocly (ID1)</title>
    <author fullname="Stuart Low" initials="S." surname="Low">
      <organization>Biza.io</organization>
    </author>
    <author fullname="Ben Kolera" initials="B." surname="Kolera">
      <organization>Biza.io</organization>
    </author>
    <author fullname="Wei Cai" initials="W." surname="Cai">
      <organization>Biza.io</organization>
    </author>
  </front>
</reference>
<reference anchor="DATARIGHTPLUS-ROSETTA" target="https://datarightplus.github.io/datarightplus-rosetta/draft-authors-datarightplus-rosetta.html">
  <front>
    <title>DataRight+ Rosetta Stone</title>
    <author fullname="Stuart Low" initials="S." surname="Low">
      <organization>Biza.io</organization>
    </author>
  </front>
</reference>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<reference anchor="RFC6749" target="https://datatracker.ietf.org/doc/html/rfc6749">
  <front>
    <title>The OAuth 2.0 Authorization Framework</title>
    <author fullname="D. Hardt">
      <organization>Microsoft</organization>
    </author>
    <date year="2012" month="Oct"/>
  </front>
</reference>
</references>

</back>

</rfc>
