<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="yes"?>
<!-- keep one blank line between list items -->
<?rfc comments="yes" ?>
<!-- show cref output -->
<?rfc inline="yes" ?>
<!-- inline cref output -->
<!-- end of list of popular I-D processing instructions -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std"
  docName="draft-ietf-regext-balance-00" ipr="trust200902" obsoletes=""
  updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="4"
  symRefs="true" sortRefs="true" version="3" consensus="true">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title abbrev="balance">Balance Mapping for the Extensible Provisioning Protocol (EPP)</title>
    <author fullname="James Gould" initials="J." surname="Gould">
      <organization>VeriSign, Inc.</organization>
      <address>
        <postal>
          <street>12061 Bluemont Way</street>
          <city>Reston</city>
          <region>VA</region>
          <code>20190</code>
          <country>United States of America</country>
        </postal>
        <email>jgould@verisign.com</email>
        <uri>http://www.verisign.com</uri>
      </address>
    </author>
    <abstract>
      <t>This document describes an Extensible Provisioning Protocol (EPP)
      mapping for retrieving the client balance and other financial
      information.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>This document describes an extension mapping for version 1.0 of the
      <xref target="RFC5730" format="default">Extensible Provisioning Protocol (EPP)</xref>.
      This EPP mapping enables a client to get their financial information including
      the balance, credit limit, available credit, and credit threshold.</t>
      <section numbered="true" toc="default">
        <name>Conventions Used in This Document</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/>
    when, and only when, they appear in all capitals, as shown here.
        </t>
        <t>XML is case sensitive. Unless stated otherwise, XML specifications
	and examples provided in this document <bcp14>MUST</bcp14> be
	interpreted in the character case presented in order to develop a
	conforming implementation.</t>
        <t>In examples, "C:" represents lines sent by a protocol client and
	"S:" represents lines returned by a protocol server. In
	examples, indentation and
	whitespace are provided only to illustrate element
	relationships and are not a required feature of this protocol.</t>
        <t>"balance-0.1" is used as an abbreviation for
        "urn:ietf:params:xml:ns:epp:balance-0.1". The XML namespace prefix
        "balance" is used, but implementations <bcp14>MUST NOT</bcp14> depend on
        it.  Instead, they are to employ
        a proper namespace-aware XML parser and serializer to interpret and
        output the XML documents.</t>
      </section>
    </section>
    <section anchor="attrs" numbered="true" toc="default">
      <name>Object Attributes</name>
      <t/>
      <section anchor="decimal-attribute" numbered="true" toc="default">
        <name>Decimal Attribute Values</name>
        <t>All of the EPP Balance currency object attributes use the XML <eref target="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#decimal">decimal</eref>
        data type to represent the currency value in the currency of the server.
        The precision is restricted to 2 fractional digits.</t>
      </section>
      <section anchor="dates-times" numbered="true" toc="default">
        <name>Dates and Times</name>
        <t>Date and time attribute values MUST be represented in Universal Coordinated Time
        (UTC) using the Gregorian calendar.  The extended date-time form using upper case "T"
        and "Z" characters defined in <eref target="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/">XML Schema Part 2</eref>
         MUST be used to represent date-time values, as
        XML Schema does not support truncated date-time forms or lower case "T" and "Z" characters.</t>
      </section>

      <section anchor="pollMessaging" numbered="true" toc="default">
        <name>Low Balance Poll Message</name>
        <t>The EPP &lt;poll&gt; command and response is defined in section 2.9.2.3 of <xref target="RFC5730"/>.
        For servers that support a credit threshold, the Balance Info Response,
        as defined in <xref target="infoCommand" format="default"/>,
        is inserted into the poll queue whenever the available credit for
        an account reaches or goes below the credit threshold.</t>

         <t keepWithNext="true">Example &lt;poll&gt; command:</t>
         <artwork name="" type="" align="left" alt=""><![CDATA[
 C:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 C:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
 C:  <command>
 C:  <poll op="req"/>
 C:    <clTRID>ABC-12345</clTRID>
 C:  </command>
 C:</epp>]]></artwork>

<t keepWithNext="true">Example low balance &lt;poll&gt; response:</t>
<artwork name="" type="" align="left" alt=""><![CDATA[
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
  <response>
    <result code="1301">
      <msg>Command completed successfully; ack to dequeue</msg>
    </result>
    <msgQ count="1" id="12345">
      <qDate>2020-09-01T15:25:01.0078Z</qDate>
      <msg>Low Account Balance</msg>
    </msgQ>
    <resData>
      <balance:infData
        xmlns:balance="urn:ietf:params:xml:ns:epp:balance-0.1">
        <balance:currency>USD</balance:currency>
        <balance:creditLimit>1000.00</balance:creditLimit>
        <balance:balance>800.00</balance:balance>
        <balance:availableCredit>200.00</balance:availableCredit>
        <balance:creditThreshold>500.00</balance:creditThreshold>
      </balance:infData>
    </resData>
    <trID>
      <clTRID>ABC-12345</clTRID>
      <svTRID>54322-XYZ</svTRID>
    </trID>
  </response>
</epp>]]></artwork>
      </section>
    </section>
    <section anchor="commands" numbered="true" toc="default">
      <name>EPP Command Mapping</name>
      <t>A detailed description of the EPP syntax and semantics can be found
      in the EPP core protocol specification <xref target="RFC5730" format="default"/>. The
      command mappings described here are specifically for use with the
      Balance Object Mapping.</t>
      <section anchor="queryCommands" numbered="true" toc="default">
        <name>EPP Query Commands</name>
        <t><xref target="RFC5730" format="default">EPP</xref> provides three commands to retrieve object information: &lt;check&gt; to determine
        if an object is known to the server, &lt;info&gt; to retrieve detailed information associated
        with an object, and &lt;transfer&gt; to retrieve object transfer status information.</t>
        <section anchor="checkCommand" numbered="true" toc="default">
          <name>EPP &lt;check&gt; Command</name>
          <t>Available check semantics do not apply to balance objects, so there is no
       mapping defined for the EPP &lt;check&gt; command.</t>
        </section>
        <!-- end CHECK command -->

      <section anchor="infoCommand" numbered="true" toc="default">
          <name>EPP &lt;info&gt; Command</name>
          <t>EPP provides the &lt;info&gt; command that is used to retrieve client balance and other financial information for
            the currently logged-in client.
       In addition to the standard EPP command elements, the &lt;info&gt; command MUST contain a
       &lt;balance:info&gt; element that identifies the balance namespace.
       The &lt;balance:info&gt; element does not contain any child elements.</t>
          <t keepWithNext="true">Example &lt;info&gt; command:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
C:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
C:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
C:  <command>
C:    <info>
C:      <balance:info
C:        xmlns:balance="http://www.verisign.com/epp/balance-0.1"/>
C:    </info>
C:    <clTRID>ABC-12345</clTRID>
C:  </command>
C:</epp>]]></artwork>
          <t>When an &lt;info&gt; command has been processed successfully,
       the EPP &lt;resData&gt; element MUST contain a child &lt;balance:infData&gt; element that
       identifies the balance namespace.
       The &lt;balance:infData&gt; element contains the following child elements:</t>
          <dl newline="true" spacing="compact" indent="4">
            <dt>&lt;balance:currency&gt;</dt>
            <dd>The &lt;balance:currency&gt; element is used to indicate the currency used by the account balance elements.
              The value of this element <bcp14>MUST</bcp14> be a three-
              character currency code from <xref target="ISO4217_2015" format="default" sectionFormat="of" derivedContent="ISO4217_2015"/>.</dd>
            <dt>&lt;balance:creditLimit&gt;</dt>
            <dd>The &lt;balance:creditLimit&gt; element contains the
          account credit limit using the &lt;balance:currency&gt; element currency.</dd>
            <dt>&lt;balance:balance&gt;</dt>
            <dd>The &lt;balance:balance&gt; element contains the
          account balance using the &lt;balance:currency&gt; element currency.</dd>
            <dt>&lt;balance:availableCredit&gt;</dt>
            <dd>The &lt;balance:availableCredit&gt; element that contains the
          account available credit using the &lt;balance:currency&gt; element currency.
          The available credit is calculated by subtracting the &lt;balance:balance&gt; element value
          from the &lt;balance:creditLimit&gt; element value.</dd>
            <dt>&lt;balance:creditThreshold&gt;</dt>
            <dd>The <bcp14>OPTIONAL</bcp14> &lt;balance:creditThreshold&gt; element that contains the
              low available credit fixed amount threshold, using the &lt;balance:currency&gt; element currency.
              The &lt;balance:creditThreshold&gt; element MAY be included in a response to an &lt;info&gt; command
              and SHOULD be included in a Low Balance Poll Message (as described in  <xref target="pollMessaging" format="default"/>), since
              the &lt;balance:creditThreshold&gt; element is only relevant for the triggering of the Low Balance Poll Message.</dd>
          </dl>
          <t keepWithNext="true">Example &lt;info&gt; response response:</t>
          <artwork name="" type="" align="left" alt=""><![CDATA[
S:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
S:<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
S:  <response>
S:    <result code="1000">
S:      <msg>Command completed successfully</msg>
S:    </result>
S:    <resData>
S:      <balance:infData
S:        xmlns:balance="urn:ietf:params:xml:ns:epp:balance-0.1">
S:        <balance:currency>USD</balance:currency>
S:        <balance:creditLimit>1000.00</balance:creditLimit>
S:        <balance:balance>200.00</balance:balance>
S:        <balance:availableCredit>800.00</balance:availableCredit>
S:        <balance:creditThreshold>500.00</balance:creditThreshold>
S:      </balance:infData>
S:    </resData>
S:    <trID>
S:      <clTRID>ABC-12345</clTRID>
S:      <svTRID>54322-XYZ</svTRID>
S:    </trID>
S:  </response>
S:</epp>]]></artwork>
        </section>
        <!-- end INFO command -->

      <section anchor="transferQueryCommand" numbered="true" toc="default">
          <name>EPP &lt;transfer&gt; Command</name>
          <t>Transfer semantics do not apply to balance objects, so there is no mapping
       defined for the EPP &lt;transfer&gt; command.</t>
        </section>
        <!-- end TRANSFER command -->

      </section>
      <section anchor="transformCommands" numbered="true" toc="default">
        <name>EPP Transform Commands</name>
        <t>EPP provides five commands to transform objects: &lt;create&gt; to create an instance of an object,
        &lt;delete&gt; to delete an instance of an object, &lt;renew&gt; to extend the validity period of an object,
        &lt;transfer&gt; to manage object sponsorship changes, and &lt;update&gt; to change information associated
        with an object.</t>
        <section anchor="createCommand" numbered="true" toc="default">
          <name>EPP &lt;create&gt; Command</name>
          <t>Create semantics do not apply to balance objects, so there is no mapping
       defined for the EPP &lt;create&gt; command.</t>
        </section>
        <!-- end CREATE command -->

      <section anchor="deleteCommand" numbered="true" toc="default">
          <name>EPP &lt;delete&gt; Command</name>
          <t>Delete semantics do not apply to balance objects, so there is no mapping
       defined for the EPP &lt;delete&gt; command.</t>
        </section>
        <!-- end DELETE command -->

      <section anchor="renewCommand" numbered="true" toc="default">
          <name>EPP &lt;renew&gt; Command</name>
          <t>Renew semantics do not apply to balance objects, so there is no mapping
       defined for the EPP &lt;renew&gt; command.</t>
        </section>
        <!-- end RENEW command -->

      <section anchor="transferCommand" numbered="true" toc="default">
          <name>EPP &lt;transfer&gt; Command</name>
          <t>Transfer semantics do not apply to balance objects, so there is no mapping
       defined for the EPP &lt;transfer&gt; command.</t>
        </section>
        <!-- end TRANSFER command -->

      <section anchor="updateCommand" numbered="true" toc="default">
          <name>EPP &lt;update&gt; Command</name>
          <t>Update semantics do not apply to balance objects, so there is no mapping
       defined for the EPP &lt;update&gt; command.</t>
        </section>
        <!-- end UPDATE command -->

     </section>
    </section>
    <!-- EPP command mapping -->

    <section anchor="syntax" numbered="true" toc="default">
      <name>Formal Syntax</name>
      <t>The EPP Balance Mapping schema is presented here.</t>
      <t>The formal
      syntax shown here is a complete XML Schema representation of the object
      mapping suitable for automated validation of EPP XML instances. The
      &lt;CODE BEGINS&gt; and &lt;CODE ENDS&gt; tags are not part of the XML Schema; they are used to note the
      beginning and ending of the XML Schema for URI registration purposes.</t>
      <section numbered="true" toc="default">
        <name>Balance Mapping Schema</name>
<sourcecode type="xml" markers="true"><![CDATA[
  <?xml version="1.0" encoding="UTF-8"?>
  <schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:balance="urn:ietf:params:xml:ns:epp:balance-0.1"
    targetNamespace="urn:ietf:params:xml:ns:epp:balance-0.1"
    elementFormDefault="qualified">
    <annotation>
      <documentation>Extensible Provisioning Protocol v1.0
        Account balance and other financial information mapping.
      </documentation>
    </annotation>
    <!--
      Child elements found in EPP commands.
    -->
    <!-- Empty balance:info command element -->
    <element name="info" />
    <!--
      Child response elements.
    -->
    <element name="infData"
      type="balance:infDataType" />
    <!--Child elements of the balance:infData element -->
    <complexType name="infDataType">
      <sequence>
        <element name="currency"
          type="balance:currencyType" />
        <element name="creditLimit"
          type="balance:currencyValueType" />
        <element name="balance"
          type="balance:currencyValueType" />
        <element name="availableCredit"
          type="balance:currencyValueType" />
        <element name="creditThreshold"
          type="balance:currencyValueType"
          minOccurs="0"/>
      </sequence>
    </complexType>
    <simpleType name="currencyType">
      <restriction base="string">
        <pattern value="[A-Z]{3}" />
      </restriction>
    </simpleType>
    <simpleType name="currencyValueType">
      <restriction base="decimal">
        <fractionDigits value="2" />
      </restriction>
    </simpleType>
  </schema>]]></sourcecode>
      </section>
    </section>
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section anchor="IANA-XML-Namespace" numbered="true" toc="default">
        <name>XML Namespace</name>
        <t>This document uses URNs to describe XML namespaces and XML schemas
	conforming to a registry mechanism described in <xref target="RFC3688"
	format="default"/>. The following URI assignment has been made by
	IANA:</t>
        <t>Registration request for the balance namespace:</t>
        <dl newline="false" spacing="compact">
          <dt>URI:</dt>
	  <dd>urn:ietf:params:xml:ns:epp:balance-0.1</dd>
          <dt>Registrant Contact:</dt>
	  <dd>IESG</dd>
          <dt>XML:</dt>
	  <dd>None. Namespace URIs do not represent an XML specification.</dd>
        </dl>
        <t>Registration request for the balance XML Schema:</t>
        <dl newline="false" spacing="compact">
          <dt>URI:</dt>
	  <dd>urn:ietf:params:xml:schema:epp:balance-0.1</dd>
          <dt>Registrant Contact:</dt>
	  <dd>IESG</dd>
          <dt>XML:</dt>
	  <dd>See the "Formal Syntax" section of this document.</dd>
        </dl>
      </section>
      <section anchor="EPP-Extension-Registry" numbered="true" toc="default">
        <name>EPP Extension Registry</name>
        <t>The EPP extension described in this document has been registered
	by IANA in the "Extensions for the Extensible Provisioning
	Protocol (EPP)" registry described in <xref
	target="RFC7451" format="default"/>.  The details of the registration
	are as follows:</t>
	<dl newline="false" spacing="compact">
        <dt>Name of Extension:</dt>
	<dd>"Balance Mapping for the Extensible
	Provisioning Protocol (EPP)"</dd>
        <dt>Document Status:</dt>
	<dd>Standards Track</dd>
        <dt>Reference:</dt>
	<dd>(insert reference to RFC version of this document)</dd>
        <dt>Registrant Name and Email Address:</dt>
	<dd>IESG, &lt;iesg@ietf.org&gt;</dd>
        <dt>TLDs:</dt>
	<dd>Any</dd>
        <dt>IPR Disclosure:</dt>
	<dd>None</dd>
        <dt>Status:</dt>
	<dd>Active</dd>
        <dt>Notes:</dt>
	<dd>None</dd>
	</dl>
      </section>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The mapping extensions described in this document do not provide any
      security services beyond those described by <xref target="RFC5730" format="default">EPP</xref> and protocol layers used by EPP. The security
      considerations described in these other specifications apply to this
      specification as well.</t>
      <t>Financial information is confidential information for a client, so the server MUST have access control restrictions in place to limit
        access to financial information of the currently logged-in client.</t>
    </section>
  </middle>
  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references>
      <name>Normative References</name>
      <reference anchor="ISO4217_2015" target="https://www.iso.org/standard/64758.html" quoteTitle="true" derivedAnchor="ISO4217_2015">
        <front>
          <title>Codes for the representation of currencies</title>
          <seriesInfo name="ISO" value="4217:2015"/>
          <author>
            <organization showOnFrontPage="true">ISO</organization>
          </author>
          <date year="2015" month="August"/>
        </front>
      </reference>

      <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
      <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5730.xml"/>
      <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
    </references>
    <references>
      <name>Informative References</name>
      <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7451.xml"/>
    </references>

    <section numbered="true" toc="default">
      <name>Change History</name>
      <section anchor="change-00-to-wg00" numbered="true" toc="default">
        <name>Change from 00 to REGEXT 00</name>
         <ol spacing="compact" type="1">
          <li>Changed to regext working group draft by changing draft-gould-regext-balance to draft-ietf-regext-balance.</li>
        </ol>
     </section>
    </section>

  </back>
  <!-- vim: set ts=2 sw=2 expandtab: -->
</rfc>
