<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3688 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml">
<!ENTITY RFC3915 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3915.xml">
<!ENTITY RFC5730 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5730.xml">
<!ENTITY RFC5731 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5731.xml">
<!ENTITY RFC7451 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7451.xml">
<!ENTITY RFC7942 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7942.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8334 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8334.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?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 category="std" docName="draft-ietf-regext-epp-fees-14" ipr="trust200902">
  <!-- 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>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="Registry Fee Extension">
    Registry Fee Extension for the Extensible Provisioning Protocol (EPP)</title>

    <author fullname="Roger Carney" initials="R.C." surname="Carney">
      <organization>GoDaddy Inc.</organization>

      <address>
        <postal>
          <street>14455 N. Hayden Rd. #219</street>

          <city>Scottsdale</city>

          <region>AZ</region>

          <code>85260</code>

          <country>US</country>
        </postal>

        <email>rcarney@godaddy.com</email>

        <uri>http://www.godaddy.com</uri>
      </address>
    </author>

    <author fullname="Gavin Brown" initials="G." surname="Brown">
      <organization>CentralNic Group plc</organization>

      <address>
        <postal>
          <street>35-39 Moorgate</street>

          <city>London</city>

          <region>England</region>

          <code>EC2R 6AR</code>

          <country>GB</country>
        </postal>

        <phone>+44 20 33 88 0600</phone>
        <email>gavin.brown@centralnic.com</email>

        <uri>http://www.centralnic.com</uri>
      </address>
    </author>

    <author fullname="Jothan Frakes" initials="J." surname="Frakes">
      <organization/>

      <address>
        <email>jothan@jothan.com</email>

        <uri>http://jothan.com</uri>
      </address>
    </author>

    <date year="2018"/>

    <!-- Meta-data Declarations -->

    <area>Applications and Real-Time</area>

    <workgroup>Registration Protocols Extensions</workgroup>

    <abstract>
      <t>This document describes an Extensible Provisioning Protocol (EPP)
      extension mapping for registry fees.
      </t>
    </abstract>
    
  </front>

  <middle>
    <section title="Introduction">
      <t>Historically, domain name registries have applied a simple fee
      structure for billable transactions, namely a basic unit price applied to
      domain &lt;create&gt;, &lt;renew&gt;, &lt;transfer&gt; and RGP [RFC3915]
      restore commands. Given the relatively small number of EPP servers to
      which EPP clients have been required to connect, it has generally been the
      case that client operators have been able to obtain details of these fees
      out-of-band by contacting the server operators.</t>

      <t>Given the recent expansion of the DNS namespace, and the proliferation
      of novel business models, it is now desirable to provide a method for EPP
      clients to query EPP servers for the fees and credits associated with
      certain commands and specific objects.</t>

      <t>This document describes an extension mapping for version 1.0 of the
      Extensible Provisioning Protocol (EPP) [RFC5730].  This EPP mapping
      provides a mechanism by which EPP clients may query the fees and credits
      associated with various billable transactions, and obtain their
      current account balance.</t>

      <section title="Conventions Used in This Document">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
        "OPTIONAL" in this document are to be interpreted as described in BCP 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 MUST be interpreted in the
        character case presented in order to develop a conforming
        implementation.</t>
        
        <t>"fee" is used as an abbreviation for "urn:ietf:params:xml:ns:epp:fee-1.0".
        The XML namespace prefix "fee" is used, but implementations MUST NOT
        depend on it and instead employ a proper namespace-aware XML parser and
        serializer to interpret and output the XML documents.</t>

        <t>In examples, "C:" represents lines sent by a protocol client and "S:"
        represents lines returned by a protocol server.  Indentation and white
        space in examples are provided only to illustrate element relationships
        and are not a REQUIRED feature of this protocol.
        </t>
        
      </section>
    </section>

    <section title="Migrating to Newer Versions of This Extension">
      <t>(Note to RFC Editor: remove this section before publication as an RFC.)</t>

      <t>Servers which implement this extension SHOULD provide a way for clients
      to progressively update their implementations when a new version of the
      extension is deployed.</t>

      <t>Servers SHOULD (for a temporary migration period) provide support for
      older versions of the extension in parallel to the newest version, and
      allow clients to select their preferred version via the &lt;svcExtension&gt;
      element of the &lt;login&gt; command.</t>
      
      <t>If a client requests multiple versions of the extension at login, then,
      when preparing responses to commands which do not include extension
      elements, the server SHOULD only include extension elements in the
      namespace of the newest version of the extension requested by the client.</t>
      
      <t>When preparing responses to commands which do include extension
      elements, the server SHOULD only include extension elements for the
      extension versions present in the command.</t>
    </section>

    <section title="Extension Elements">
      <section title="Client Commands">
        <t>The &lt;fee:command&gt; element is used in the EPP &lt;check&gt;
        command to determine the fee which is applicable to the given command.</t>
        
        <t>The use of the &lt;fee:command&gt; keys off the use of the "name"
        attribute to define which transform fees the client is requesting
        information about. Here is the list of possible values for the "name"
        attribute:</t>
        
        <t><list style="symbols">
          <t>"create" indicating a &lt;create&gt; command as defined in [RFC5730];</t>
          <t>"delete" indicating a &lt;delete&gt; command as defined in [RFC5730];</t>
          <t>"renew" indicating a &lt;renew&gt; command as defined in [RFC5730];</t>
          <t>"update" indicating a &lt;update&gt; command as defined in [RFC5730];</t>
          <t>"transfer" indicating a &lt;transfer&gt; command as defined in [RFC5730];</t>
          <t>If the server supports the Registry Grace Period Mapping [RFC3915],
          then the server MUST also support the "restore" value as defined in
          [RFC3915];</t>
          <t>"custom" indicating a custom command that uses the "customName"
          attribute to define the custom operation.</t>
        </list></t>

        <t>The &lt;fee:command&gt; element MAY have an OPTIONAL "phase"
        attribute specifying a launch phase as described in
        [RFC8334].  It may also contain an OPTIONAL
        "subphase" attribute identifying the custom or sub-phase as described in
        [RFC8334].</t>
      </section>
    
      <section title="Currency Codes">
        <t>The &lt;fee:currency&gt; element is used to indicate which currency
        fees are charged in.  This value of this element MUST be a
        three-character currency code from [ISO4217].</t>
        
        <t>Note that ISO 4217 provides the special "XXX" code, which MAY be used
        if the server uses a non-currency based system for assessing fees, such
        as a system of credits.</t>

        <t>The use of &lt;fee:currency&gt; elements in client commands is OPTIONAL: if
        a &lt;fee:currency&gt; element is not present in a command, the server
        MUST determine the currency based on the server default currency or 
        based on the client's account settings which are agreed to by the client 
        and server via an out-of-band channel. However, the &lt;fee:currency&gt; element MUST be present in responses.</t>

        <t>Servers SHOULD NOT perform a currency conversion if a client uses an
        incorrect currency code.  Servers SHOULD return a 2004 "Parameter value
        range" error instead.</t>
      </section>

      <section title="Validity Periods">
        <t>When querying for fee information using the &lt;check&gt; command,
        the &lt;fee:period&gt; element is used to indicate the units to be added
        to the registration period of objects by the &lt;create&gt;, &lt;renew&gt;
        and &lt;transfer&gt; commands.  This element is derived from the
        &lt;domain:period&gt; element described in [RFC5731].</t>
        
        <t>The &lt;fee:period&gt; element is OPTIONAL in &lt;check&gt; commands,
        if omitted, the server MUST determine the fee(s) using the server
        default period.  The &lt;fee:period&gt; element MUST be present in
        &lt;check&gt; responses.</t>
      </section>

      <section title="Fees and Credits">
        <t>Servers which implement this extension will include elements in
        responses which provide information about the fees and/or credits
        associated with a given billable transaction.</t>
        
        <t>The &lt;fee:fee&gt; and &lt;fee:credit&gt; elements are used to
        provide this information.  The presence of a &lt;fee:fee&gt; element in
        a response indicates a debit against the client's account balance; a
        &lt;fee:credit&gt; element indicates a credit.  A &lt;fee:fee&gt;
        element MUST have a non-negative value.  A &lt;fee:credit&gt; element
        MUST have a negative value.</t>
        
        <t>A server MAY respond with multiple &lt;fee:fee&gt; and &lt;fee:credit&gt;
        elements in the same response.  In such cases, the net fee or credit
        applicable to the transaction is the arithmetic sum of the values of
        each of the &lt;fee:fee&gt; and/or &lt;fee:credit&gt; elements.  This
        amount applies to the total additional validity period applied to the
        object (where applicable) rather than to any incremental unit.</t>
        
        <t>The following attributes are defined for the &lt;fee:fee&gt; element.
        These are described in detail below:</t>
        
        <t>description:  an OPTIONAL attribute which provides a human-readable
        description of the fee.  Servers should provide documentation on the
        possible values of this attribute, and their meanings.</t>

        <t>refundable:  an OPTIONAL boolean attribute indicating whether the fee
        is refundable if the object is deleted.</t>

        <t>grace-period:  an OPTIONAL attribute which provides the time period
        during which the fee is refundable.</t>

        <t>applied:  an OPTIONAL attribute indicating when the fee will be
        deducted from the client's account.</t>

        <t>The &lt;fee:credit&gt; element can take a "description" attribute as
        described above.  No other attributes are defined for this element.</t>

        <section title="Refunds">
          <t>&lt;fee:fee&gt; elements MAY have an OPTIONAL "refundable"
          attribute which takes a boolean value.  Fees may be refunded under
          certain circumstances, such as when a domain application is rejected
          (as described in [RFC8334]) or when an object is
          deleted during the relevant Grace Period (see below).</t>
          
          <t>If the "refundable" attribute is omitted, then clients SHOULD NOT
          make any assumption about the refundability of the fee.</t>
        </section>

        <section title="Grace Periods">
          <t>[RFC3915] describes a system of "grace periods", which are time
          periods following a billable transaction during which, if an object is
          deleted, the client receives a refund.</t>
          
          <t>The "grace-period" attribute MAY be used to indicate the relevant
          grace period for a fee.  If a server implements the Registry Grace
          Period extension [RFC3915], it MUST specify the grace period for all 
          relevant transactions.</t>
          
          <t>If the "grace-period" attribute is omitted, then clients SHOULD NOT
          make any assumption about the grace period of the fee.</t>
        </section>

        <section title="Correlation between Refundability and Grace Periods">
          <t>If a &lt;fee:fee&gt; element has a "grace-period" attribute then it
          MUST also be refundable.  If the "refundable" attribute of a
          &lt;fee:fee&gt; element is false then it MUST NOT have a
          "grace-period" attribute.</t>
        </section>

        <section title="Applicability">
          <t>Fees may be applied immediately upon receipt of a command from a
          client, or may only be applied once an out-of-band process (such as
          the processing of applications at the end of a launch phase) has taken
          place.</t>
          
          <t>The "applied" attribute of the &lt;fee:fee&gt; element allows
          servers to indicate whether a fee will be applied immediately, or
          whether it will be applied at some point in the future.  This
          attribute takes two possible values: "immediate" or "delayed".</t>
        </section>

      </section>
      
      <section title="Account Balance">
        <t>The &lt;fee:balance&gt; element is an OPTIONAL element which MAY be
        included in server responses to transform commands.  If present, it can
        be used by the client to determine the remaining credit at the server.</t>

        <t>Whether or not the &lt;fee:balance&gt; is included in responses is a
        matter of server policy.  However, if a server chooses to offer support
        for this element, it MUST be included in responses to all "transform" or
        billable commands (e.g. &lt;create&gt;, &lt;renew&gt;, &lt;update&gt;,
        &lt;delete&gt;, &lt;transfer op="request"&gt;).</t>

        <t>The value of the &lt;fee:balance&gt; MAY be negative.  A negative
        balance indicates that the server has extended a line of credit to the
        client (see below).</t>

        <t>If a server includes a &lt;fee:balance&gt; element in response to
        transform commands, the value of the element MUST reflect the client's
        account balance after any fees or credits associated with that command
        have been applied.</t>
      </section>

      <section title="Credit Limit">
        <t>As described above, if a server returns a response containing a
        &lt;fee:balance&gt; with a negative value, then the server has extended
        a line of credit to the client.  A server MAY also include a
        &lt;fee:creditLimit&gt; element in responses which indicates the maximum
        credit available to a client.  A server MAY reject certain transactions
        if the absolute value of the &lt;fee:balance&gt; is equal to or exceeds the
        value of the &lt;fee:creditLimit&gt; element.</t>

        <t>Whether or not the &lt;fee:creditLimit&gt; is included in responses
        is a matter of server policy.  However, if a server chooses to offer
        support for this element, it MUST be included in responses to all
        "transform" commands (e.g. &lt;create&gt;, &lt;renew&gt;, &lt;update&gt;,
        &lt;delete&gt;, &lt;transfer op="request"&gt;).</t>
      </section>

      <section title="Classification of Objects">
        <t>Objects may be assigned to a particular class, category, or tier,
        each of which has a particular fee or set of fees associated with it.
        The &lt;fee:class&gt; element, which MAY appear in &lt;check&gt; and
        transform responses, is used to indicate the classification of an object.</t>

        <t>If a server makes use of this element, it should provide clients with
        a list of all the values that the element may take via an out-of-band
        channel.  Servers MUST NOT use values which do not appear on this list.</t>

        <t>Servers which make use of this element MUST use a &lt;fee:class&gt;
        element with the value "standard" for all objects that are subject to
        the standard or default fee.</t>
      </section>

      <section title="Phase and Subphase Attributes">
        <t>The &lt;fee:command&gt; element has two attributes, phase and
        subphase, that provide additional information related to a specific
        launch phase as described in [RFC8334]. These
        attributes are used as filters that should refine the server processing.</t>

        <t>If the client &lt;fee:command&gt; contains a server supported
        combination of phase/subphase the server MUST return fee data (including
        the phase/subphase attribute(s)) for the specific combination.</t>

        <t>If the client &lt;fee:command&gt; contains no phase/subphase
        attributes and the server has only one active phase/subphase combination
        the server MUST return data (including the phase/subphase attribute(s))
        of the currently active phase/subphase.</t>

        <t>If the client &lt;fee:command&gt; contains no phase/subphase
        attributes and the server has more than one active phase/subphase
        combination the server MUST respond with a 2003 "Required
        parameter missing" error.</t>

        <t>If the client &lt;fee:command&gt; contains no phase/subphase
        attributes and the server is currently in a "quiet period" (e.g. not
        accepting registrations or applications) the server MUST return data
        consistent with the default general availability phase (e.g. "open" or
        "claims") including the appropriate phase/subphase attribute(s).</t>
        
        <t>If the client &lt;fee:command&gt; contains a phase attribute with no
        subphase and the server has only one active subphase (or no subphase) of
        this phase, the server MUST return data (including the phase/subphase
        attribute(s)) of the provided phase and currently active subphase.</t>

        <t>If the client &lt;fee:command&gt; contains a phase attribute with no
        subphase and the server has more than one active subphase combination of
        this phase, the server MUST respond with a 2003 "Required parameter
        missing" error.</t>

        <t>If the client &lt;fee:command&gt; contains a subphase with no phase
        attribute the server MUST respond with a 2003 "Required parameter
        missing" error.</t>

        <t>If the client &lt;fee:command&gt; contains a phase attribute not
        defined in [RFC8334] or not supported by server
        the server MUST respond with a 2004 "Parameter value range" error.</t>

        <t>If the client &lt;fee:command&gt; contains a subphase attribute (or
        phase/subphase combination) not supported by server the server MUST
        respond with a 2004 "Parameter value range" error.</t>
      </section>

      <section title="Reason">
        <t>The &lt;fee:reason&gt; element is used to provide server specific
        text in an effort to better explain why a &lt;check&gt; command did not
        complete as the client expected. An OPTIONAL "lang" attribute MAY be
        present to identify the language of the returned text and has a default
        value of "en" (English).</t>
        
        <t>The &lt;fee:reason&gt; element can be used within the server response
        &lt;fee:command&gt; element or within the &lt;fee:cd&gt; element.</t>
        
        <t>If the server cannot calculate the relevant fees, because the object,
        command, currency, period, class or some combination is invalid per
        server policy, the server has two ways of handling error processing of
        &lt;fee:command&gt; element(s):</t>

        <t><list style="numbers">
          <t>Fast-fail - The server, upon error identification, MAY stop
          processing &lt;fee:command&gt; elements and return to the client a
          &lt;fee:cd&gt; containing the &lt;fee:objID&gt; and a
          &lt;fee:reason&gt; element detailing the reason for failure.
            <figure>
              <artwork><![CDATA[    S: <fee:cd avail="0">
    S:   <fee:objID>example.xyz</fee:objID>
    S:   <fee:reason>Only 1 year registration periods are 
    S:   valid.</fee:reason>
    S: </fee:cd>
]]>
              </artwork>
            </figure>
          </t>
          <t>Partial-fail - The server, upon error identification, MAY continue
          processing &lt;fee:command&gt; elements and return to the client a
          &lt;fee:cd&gt; containing successfully processed &lt;fee:command&gt;
          elements and failed &lt;fee:command&gt; elements. All returned failed
          &lt;fee:command&gt; elements MUST have a &lt;fee:reason&gt;
          element detailing the reason for failure, and the server MAY
          additionally include a &lt;fee:reason&gt; element at the
          &lt;fee:cd&gt; level.
            <figure>
              <artwork><![CDATA[    S: <fee:cd avail="0">
    S:   <fee:objID>example.xyz</fee:objID>
    S:   <fee:command name="create">
    S:     <fee:period unit="y">2</fee:period>
    S:     <fee:reason>Only 1 year registration periods are
    S:     valid.</fee:reason>
    S:   </fee:command>
    S: </fee:cd>
  ]]>
              </artwork>
            </figure>
          </t>
        </list></t>

        <t>In either failure scenario the server MUST set the &lt;fee:cd&gt;
        avail attribute to false (0) and the server MUST process all objects in 
        the client request.</t>
      </section>
      
    </section>

    <section title="Server Handling of Fee Information">
      <t>Depending on server policy, a client MAY be required to include the
      extension elements described in this document for certain transform
      commands.  Servers must provide clear documentation to clients about the
      circumstances in which this extension must be used.</t>

      <t>The server MUST return avail="0" in its response to a &lt;check&gt;
      command for any object in the &lt;check&gt; command that does not
      include the &lt;fee:check&gt; extension for which the server would
      likewise fail a domain &lt;create&gt; command when no &lt;fee&gt;
      extension is provided for that same object.</t>
      
      <t>If a server receives a &lt;check&gt; command from a client, which
      results in no possible fee combination but where a fee is required, the
      server MUST set the "avail" attribute of the &lt;fee:cd&gt; element to
      false and provide a &lt;fee:reason&gt;.</t>
      
      <t>If a server receives a &lt;check&gt; command from a client, which
      results in an ambiguous result (i.e. multiple possible fee combinations)
      the server MUST reject the command with a 2003 "Required parameter
      missing" error.</t>

      <t>If a server receives a command from a client, which does not include the
      fee extension data elements required by the server for that command, then
      the server MUST respond with a 2003 "Required parameter missing" error.</t>

      <t>If the currency or total fee provided by the client is less than
      the server's own calculation of the fee for that command, then the server
      MUST reject the command with a 2004 "Parameter value range" error.</t>
    </section>

    <section title="EPP Command Mapping">
      <t>A detailed description of the EPP syntax and semantics can be found in
      [RFC5730].</t>

      <section title="EPP Query Commands">
        <t>This extension does not add any elements to the EPP &lt;poll&gt; or
        &lt;info&gt; commands or responses.</t>
      
        <section title="EPP &lt;check&gt; Command">
          <t>This extension defines a new command called the Fee Check Command
          that defines additional elements for the EPP &lt;check&gt; command to
          provide fee information along with the availability information of the
          EPP &lt;check&gt; command.</t>

          <t>The command MAY contain an &lt;extension&gt; element which MAY
          contain a &lt;fee:check&gt; element. The &lt;fee:check&gt; element
          MAY contain one &lt;fee:currency&gt; element and MUST contain one or
          more &lt;fee:command&gt; elements.</t>
          
          <t>The &lt;fee:command&gt; element(s) contain(s) a "name" attribute
          (see Section 3.1), an OPTIONAL "phase" attribute, and an OPTIONAL
          "subphase" attribute (see Section 3.8). The &lt;fee:command&gt;
          element(s) MAY have the following child elements:</t>

          <t><list style="symbols">
            <t>An OPTIONAL &lt;fee:period&gt; element (as described in Section 3.3).</t>
          </list></t>

          <figure>
            <preamble>Example &lt;check&gt; command:</preamble>
        
            <artwork><![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:     <check>
C:       <domain:check
C:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
C:         <domain:name>example.com</domain:name>
C:         <domain:name>example.net</domain:name>
C:         <domain:name>example.xyz</domain:name>
C:       </domain:check>
C:     </check>
C:     <extension>
C:       <fee:check xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
C:         <fee:currency>USD</fee:currency>
C:         <fee:command name="create">
C:           <fee:period unit="y">2</fee:period>
C:         </fee:command>
C:         <fee:command name="renew"/>
C:         <fee:command name="transfer"/>
C:         <fee:command name="restore"/>
C:       </fee:check>
C:     </extension>
C:     <clTRID>ABC-12345</clTRID>
C:   </command>
C: </epp>]]>
            </artwork>
          </figure>

          <t>When the server receives a &lt;check&gt; command that includes the
          extension elements described above, its response MUST contain an
          &lt;extension&gt; element, which MUST contain a child
          &lt;fee:chkData&gt; element. The &lt;fee:chkData&gt; element MUST
          contain a &lt;fee:currency&gt; element and a &lt;fee:cd&gt; for each
          element referenced in the client &lt;check&gt; command.</t>

          <t>Each &lt;fee:cd&gt; element MUST contain the following child
          elements:</t>
          
          <t><list style="symbols">
            <t>A &lt;fee:objID&gt; element, which MUST match an element
            referenced in the client &lt;check&gt; command.</t>
            <t>An OPTIONAL &lt;fee:class&gt; element (as described in Section 3.7).</t>
            <t>A &lt;fee:command&gt; element matching each &lt;fee:command&gt;
            (unless the "avail" attribute of the &lt;fee:cd&gt; if false) that
            appeared in the corresponding &lt;fee:check&gt; of the client
            command. This element MAY have the OPTIONAL "standard" attribute,
            with a default value of "0" (or "false"), which indicates whether
            the fee matches the fee of the "standard" classification (see
            section 3.7). This element MAY have the OPTIONAL "phase" and
            "subphase" attributes, which SHOULD match the same attributes in the
            corresponding &lt;fee:command&gt; element of the client command if
            sent by the client.</t>
          </list></t>

          <t>The &lt;fee:cd&gt; element also has an OPTIONAL "avail"
          attribute which is a boolean. If the value of this attribute evaluates
          to false, this indicates that the server cannot calculate the relevant
          fees, because the object, command, currency, period, class or some
          combination is invalid per server policy. If "avail" is false then the
          &lt;fee:cd&gt; or the &lt;fee:command&gt; element MUST contain a
          &lt;fee:reason&gt; element (as described in Section 3.9) and the
          server MAY eliminate some or all of the &lt;fee:command&gt; element(s).</t>

          <t>The &lt;fee:command&gt; element(s) MAY have the following child
          elements:</t>
          
          <t><list style="symbols">
            <t>An OPTIONAL &lt;fee:period&gt; element (as described in Section 3.3), which contains the same
            unit that appeared in the &lt;fee:period&gt; element of the
            command. If the value of the preceding &lt;fee:command&gt; element
            is "restore", this element MUST NOT be included, otherwise it MUST
            be included. If no &lt;fee:period&gt; appeared in the client command
            (and the command is not "restore") then the server MUST return its
            default period value.</t>
            <t>Zero or more &lt;fee:fee&gt; elements (as described in Section 3.4).</t>
            <t>Zero or more &lt;fee:credit&gt; elements (as described in Section 3.4).</t>
            <t>An OPTIONAL &lt;fee:reason&gt; element (as described in Section 3.9).</t>
          </list></t>

          <t>If the "avail" attribute of the &lt;fee:cd&gt; element is true and
          if no &lt;fee:fee&gt; elements are present in a &lt;fee:command&gt;
          element, this indicates that no fee will be assessed by the server for
          this command.</t>
          
          <t>If the "avail" attribute is true, then the &lt;fee:command&gt;
          element MUST NOT contain a &lt;fee:reason&gt; element.</t>
          
          <figure>
            <preamble>Example &lt;check&gt; response:</preamble>

            <artwork><![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:       <domain:chkData
S:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
S:         <domain:cd>
S:           <domain:name avail="1">example.com</domain:name>
S:         </domain:cd>
S:         <domain:cd>
S:           <domain:name avail="1">example.net</domain:name>
S:         </domain:cd>
S:         <domain:cd>
S:           <domain:name avail="1">example.xyz</domain:name>
S:         </domain:cd>
S:       </domain:chkData>
S:     </resData>
S:     <extension>
S:       <fee:chkData
S:           xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
S:         <fee:currency>USD</fee:currency>
S:         <fee:cd avail="1">
S:           <fee:objID>example.com</fee:objID>
S:           <fee:class>Premium</fee:class>
S:           <fee:command name="create">
S:             <fee:period unit="y">2</fee:period>
S:             <fee:fee
S:               description="Registration Fee"
S:               refundable="1"
S:               grace-period="P5D">10.00</fee:fee>
S:           </fee:command>
S:           <fee:command name="renew">
S:             <fee:period unit="y">1</fee:period>
S:             <fee:fee
S:               description="Renewal Fee"
S:               refundable="1"
S:               grace-period="P5D">10.00</fee:fee>
S:           </fee:command>
S:           <fee:command name="transfer">
S:             <fee:period unit="y">1</fee:period>
S:             <fee:fee
S:               description="Transfer Fee"
S:               refundable="1"
S:               grace-period="P5D">10.00</fee:fee>
S:           </fee:command>
S:           <fee:command name="restore">
S:             <fee:fee
S:               description="Redemption Fee">15.00</fee:fee>
S:           </fee:command>
S:         </fee:cd>
S:         <fee:cd avail="1">
S:           <fee:objID>example.net</fee:objID>
S:           <fee:class>standard</fee:class>
S:           <fee:command name="create" standard="1">
S:             <fee:period unit="y">2</fee:period>
S:             <fee:fee
S:               description="Registration Fee"
S:               refundable="1"
S:               grace-period="P5D">5.00</fee:fee>
S:           </fee:command>
S:           <fee:command name="renew" standard="1">
S:             <fee:period unit="y">1</fee:period>
S:             <fee:fee
S:               description="Renewal Fee"
S:               refundable="1"
S:               grace-period="P5D">5.00</fee:fee>
S:           </fee:command>
S:           <fee:command name="transfer" standard="1">
S:             <fee:period unit="y">1</fee:period>
S:             <fee:fee
S:               description="Transfer Fee"
S:               refundable="1"
S:               grace-period="P5D">5.00</fee:fee>
S:           </fee:command>
S:           <fee:command name="restore" standard="1">
S:             <fee:fee
S:               description="Redemption Fee">5.00</fee:fee>
S:           </fee:command>
S:         </fee:cd>
S:         <fee:cd avail="0">
S:           <fee:objID>example.xyz</fee:objID>
S:           <fee:command name="create">
S:             <fee:period unit="y">2</fee:period>
S:             <fee:reason>Only 1 year registration periods are
S:               valid.</fee:reason>
S:           </fee:command>
S:         </fee:cd>
S:       </fee:chkData>
S:     </extension>
S:     <trID>
S:       <clTRID>ABC-12345</clTRID>
S:       <svTRID>54322-XYZ</svTRID>
S:     </trID>
S:   </response>
S: </epp>]]>
            </artwork>
          </figure>

        </section>
        
        <section title="EPP Transfer Query Command">
          <t>This extension does not add any elements to the EPP &lt;transfer&gt;
          query command, but does include elements in the response, when the
          extension is included in the &lt;login&gt; command service extensions.</t>
          
          <t>When the &lt;transfer&gt; query command has been processed
          successfully, if the client has included the extension in the &lt;login&gt; 
          command service &lt;svcExtension&gt; element, and if the client is 
          authorized by the server to view information about the transfer, then 
          the server MAY include in the &lt;extension&gt; section of the EPP 
          response a &lt;fee:trnData&gt; element, which contains the following 
          child elements:</t>
          
          <t><list style="symbols">
            <t>A &lt;fee:currency&gt; element (as described in Section 3.2).</t>
            <t>A &lt;fee:period&gt; element (as described in Section 3.3).</t>
            <t>Zero or more &lt;fee:fee&gt; elements  (as described in Section
            3.4) containing the fees that will be charged to the gaining client.</t>
            <t>Zero or more &lt;fee:credit&gt; elements  (as described in
            Section 3.4) containing the credits that will be refunded to the
            losing client.</t>
          </list></t>

          <t>Servers SHOULD omit &lt;fee:credit&gt; when returning a response to
          the gaining client, and omit &lt;fee:fee&gt; elements when returning a
          response to the losing client.</t>
          
          <t>If no &lt;fee:trnData&gt; element is included in the response, then
          no fee will be assessed by the server for the transfer.</t>
          
          <figure>
            <preamble>Example &lt;transfer&gt; query response:</preamble>

            <artwork><![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="1001">
S:       <msg>Command completed successfully; action pending</msg>
S:     </result>
S:     <resData>
S:       <domain:trnData
S:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
S:         <domain:name>example.com</domain:name>
S:         <domain:trStatus>pending</domain:trStatus>
S:         <domain:reID>ClientX</domain:reID>
S:         <domain:reDate>2000-06-08T22:00:00.0Z</domain:reDate>
S:         <domain:acID>ClientY</domain:acID>
S:         <domain:acDate>2000-06-13T22:00:00.0Z</domain:acDate>
S:         <domain:exDate>2002-09-08T22:00:00.0Z</domain:exDate>
S:       </domain:trnData>
S:     </resData>
S:     <extension>
S:       <fee:trnData xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
S:         <fee:currency>USD</fee:currency>
S:         <fee:period unit="y">1</fee:period>
S:         <fee:fee>5.00</fee:fee>
S:       </fee:trnData>
S:     </extension>
S:     <trID>
S:       <clTRID>ABC-12345</clTRID>
S:       <svTRID>54322-XYZ</svTRID>
S:     </trID>
S:   </response>
S: </epp>]]>
            </artwork>
          </figure>

        </section>

      </section>

      <section title="EPP Transform Commands">

        <section title="EPP &lt;create&gt; Command">
          <t>This extension adds elements to both the EPP &lt;create&gt; command
          and response, when the extension is included in the &lt;login&gt; 
          command service extensions.</t>
          
          <t>When submitting a &lt;create&gt; command to the server, the client
          MAY include in the &lt;extension&gt; element a &lt;fee:create&gt;
          element which includes the following child elements:</t>

          <t><list style="symbols">
            <t>An OPTIONAL &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>One or more &lt;fee:fee&gt; elements (as described in Section 3.4).</t>
          </list></t>

          <t>The server MUST fail the &lt;create&gt; command if the
          &lt;fee:fee&gt; provided by the client is less than the server fee.</t>

          <t>When the &lt;create&gt; command has been processed successfully,
          and the client included the extension in the &lt;login&gt; command 
          service extensions, and a fee was assessed by the server for the 
          transaction, the server MUST include in the &lt;extension&gt; section 
          of the EPP response a &lt;fee:creData&gt; element, which contains the 
          following child elements:</t>
          
          <t><list style="symbols">
            <t>A &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>Zero or more &lt;fee:fee&gt; elements (as described in Section 3.4);</t>
            <t>Zero or more &lt;fee:credit&gt; elements (as described in Section 3.4);</t>
            <t>An OPTIONAL &lt;fee:balance&gt; element (as described in Section 3.5);</t>
            <t>An OPTIONAL &lt;fee:creditLimit&gt; element (as described in Section 3.6).</t>
          </list></t>

          <figure>
            <preamble>Example &lt;create&gt; command:</preamble>

            <artwork><![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:     <create>
C:       <domain:create
C:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
C:         <domain:name>example.com</domain:name>
C:         <domain:period unit="y">2</domain:period>
C:         <domain:ns>
C:           <domain:hostObj>ns1.example.net</domain:hostObj>
C:           <domain:hostObj>ns2.example.net</domain:hostObj>
C:         </domain:ns>
C:         <domain:registrant>jd1234</domain:registrant>
C:         <domain:contact type="admin">sh8013</domain:contact>
C:         <domain:contact type="tech">sh8013</domain:contact>
C:         <domain:authInfo>
C:           <domain:pw>2fooBAR</domain:pw>
C:         </domain:authInfo>
C:       </domain:create>
C:     </create>
C:     <extension>
C:       <fee:create xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
C:         <fee:currency>USD</fee:currency>
C:         <fee:fee>5.00</fee:fee>
C:       </fee:create>
C:     </extension>
C:     <clTRID>ABC-12345</clTRID>
C:   </command>
C: </epp>]]>
            </artwork>
          </figure>

          <figure>
            <preamble>Example &lt;create&gt; response:</preamble>

            <artwork><![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:       <domain:creData
S:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
S:         <domain:name>example.com</domain:name>
S:         <domain:crDate>1999-04-03T22:00:00.0Z</domain:crDate>
S:         <domain:exDate>2001-04-03T22:00:00.0Z</domain:exDate>
S:       </domain:creData>
S:     </resData>
S:     <extension>
S:       <fee:creData xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
S:         <fee:currency>USD</fee:currency>
S:         <fee:fee
S:           description="Registration Fee"
S:           refundable="1"
S:           grace-period="P5D">5.00</fee:fee>
S:         <fee:balance>-5.00</fee:balance>
S:         <fee:creditLimit>1000.00</fee:creditLimit>
S:       </fee:creData>
S:     </extension>
S:     <trID>
S:       <clTRID>ABC-12345</clTRID>
S:       <svTRID>54321-XYZ</svTRID>
S:     </trID>
S:   </response>
S: </epp>]]>
            </artwork>
          </figure>

        </section>

        <section title="EPP &lt;delete&gt; Command">
          <t>This extension does not add any elements to the EPP &lt;delete&gt;
          command, but does include elements in the response, when the extension
          is included in the &lt;login&gt; command service extensions.</t>

          <t>When the &lt;delete&gt; command has been processed successfully,
          and the client included the extension in the &lt;login&gt; command 
          service extensions, the server MAY include in the &lt;extension&gt; 
          section of the EPP response a &lt;fee:delData&gt; element, which 
          contains the following child elements:</t>
          
          <t><list style="symbols">
            <t>A &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>Zero or more &lt;fee:fee&gt; elements (as described in Section 3.4);</t>
            <t>Zero or more &lt;fee:credit&gt; elements (as described in Section 3.4);</t>
            <t>An OPTIONAL &lt;fee:balance&gt; element (as described in Section 3.5);</t>
            <t>An OPTIONAL &lt;fee:creditLimit&gt; element (as described in Section 3.6).</t>
          </list></t>

          <figure>
            <preamble>Example &lt;delete&gt; response:</preamble>

            <artwork><![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:     <extension>
S:       <fee:delData
S:         xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
S:         <fee:currency>USD</fee:currency>
S:         <fee:credit description="AGP Credit">-5.00</fee:credit>
S:         <fee:balance>1005.00</fee:balance>
S:       </fee:delData>
S:     </extension>
S:     <trID>
S:       <clTRID>ABC-12345</clTRID>
S:       <svTRID>54321-XYZ</svTRID>
S:     </trID>
S:   </response>
S: </epp>]]>
            </artwork>
          </figure>

        </section>

        <section title="EPP &lt;renew&gt; Command">
          <t>This extension adds elements to both the EPP &lt;renew&gt; command
          and response, when the extension is included in the &lt;login&gt; 
          command service extensions.</t>
          
          <t>When submitting a &lt;renew&gt; command to the server, the client
          MAY include in the &lt;extension&gt; element a &lt;fee:renew&gt;
          element which includes the following child elements:</t>
          
          <t><list style="symbols">
            <t>An OPTIONAL &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>One or more &lt;fee:fee&gt; elements (as described in Section 3.4).</t>
          </list></t>

          <t>When the &lt;renew&gt; command has been processed successfully, and
          the client included the extension in the &lt;login&gt; command service 
          extensions, the server MAY include in the &lt;extension&gt; section of 
          the EPP response a &lt;fee:renData&gt; element, which contains the 
          following child elements:</t>
          
          <t><list style="symbols">
            <t>A &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>Zero or more &lt;fee:fee&gt; elements (as described in Section 3.4);</t>
            <t>Zero or more &lt;fee:credit&gt; elements (as described in Section 3.4);</t>
            <t>An OPTIONAL &lt;fee:balance&gt; element (as described in Section 3.5);</t>
            <t>An OPTIONAL &lt;fee:creditLimit&gt; element (as described in Section 3.6).</t>
          </list></t>

          <figure>
            <preamble>Example &lt;renew&gt; command:</preamble>

            <artwork><![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:     <renew>
C:       <domain:renew
C:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
C:         <domain:name>example.com</domain:name>
C:         <domain:curExpDate>2000-04-03</domain:curExpDate>
C:         <domain:period unit="y">5</domain:period>
C:       </domain:renew>
C:     </renew>
C:     <extension>
C:       <fee:renew xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
C:         <fee:currency>USD</fee:currency>
C:         <fee:fee>5.00</fee:fee>
C:       </fee:renew>
C:     </extension>
C:     <clTRID>ABC-12345</clTRID>
C:   </command>
C: </epp>]]>
            </artwork>
          </figure>

          <figure>
            <preamble>Example &lt;renew&gt; response:</preamble>

            <artwork><![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:       <domain:renData
S:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
S:         <domain:name>example.com</domain:name>
S:         <domain:exDate>2005-04-03T22:00:00.0Z</domain:exDate>
S:       </domain:renData>
S:     </resData>
S:     <extension>
S:       <fee:renData xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
S:         <fee:currency>USD</fee:currency>
S:         <fee:fee
S:           refundable="1"
S:           grace-period="P5D">5.00</fee:fee>
S:         <fee:balance>1000.00</fee:balance>
S:       </fee:renData>
S:     </extension>
S:     <trID>
S:       <clTRID>ABC-12345</clTRID>
S:       <svTRID>54322-XYZ</svTRID>
S:     </trID>
S:   </response>
S: </epp>]]>
            </artwork>
          </figure>

        </section>

        <section title="EPP &lt;transfer&gt; Command">
          <t>This extension adds elements to both the EPP &lt;transfer&gt;
          command and response, when the value of the "op" attribute of the
          &lt;transfer&gt; command element is "request", and the extension is 
          included in the &lt;login&gt; command service extensions.</t>

          <t>When submitting a &lt;transfer&gt; command to the server, the
          client MAY include in the &lt;extension&gt; element a
          &lt;fee:transfer&gt; element which includes the following child
          elements:</t>

          <t><list style="symbols">
            <t>An OPTIONAL &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>One or more &lt;fee:fee&gt; elements (as described in Section 3.4).</t>
          </list></t>

          <t>When the &lt;transfer&gt; command has been processed successfully,
          and the client included the extension in the &lt;login&gt; command 
          service extensions, the server MAY include in the &lt;extension&gt; 
          section of the EPP response a &lt;fee:trnData&gt; element, which 
          contains the following child elements:</t>

          <t><list style="symbols">
            <t>A &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>Zero or more &lt;fee:fee&gt; elements (as described in Section 3.4);</t>
            <t>Zero or more &lt;fee:credit&gt; elements (as described in Section 3.4);</t>
            <t>An OPTIONAL &lt;fee:balance&gt; element (as described in Section 3.5);</t>
            <t>An OPTIONAL &lt;fee:creditLimit&gt; element (as described in Section 3.6).</t>
          </list></t>

          <figure>
            <preamble>Example &lt;transfer&gt; command:</preamble>

            <artwork><![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:     <transfer op="request">
C:       <domain:transfer
C:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
C:         <domain:name>example.com</domain:name>
C:         <domain:period unit="y">1</domain:period>
C:         <domain:authInfo>
C:           <domain:pw roid="JD1234-REP">2fooBAR</domain:pw>
C:         </domain:authInfo>
C:       </domain:transfer>
C:     </transfer>
C:     <extension>
C:       <fee:transfer xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
C:         <fee:currency>USD</fee:currency>
C:         <fee:fee>5.00</fee:fee>
C:       </fee:transfer>
C:     </extension>
C:     <clTRID>ABC-12345</clTRID>
C:   </command>
C: </epp>]]>
            </artwork>
          </figure>

          <figure>
            <preamble>Example &lt;transfer&gt; response:</preamble>

            <artwork><![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="1001">
S:       <msg>Command completed successfully; action pending</msg>
S:     </result>
S:     <resData>
S:       <domain:trnData
S:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
S:         <domain:name>example.com</domain:name>
S:         <domain:trStatus>pending</domain:trStatus>
S:         <domain:reID>ClientX</domain:reID>
S:         <domain:reDate>2000-06-08T22:00:00.0Z</domain:reDate>
S:         <domain:acID>ClientY</domain:acID>
S:         <domain:acDate>2000-06-13T22:00:00.0Z</domain:acDate>
S:         <domain:exDate>2002-09-08T22:00:00.0Z</domain:exDate>
S:       </domain:trnData>
S:     </resData>
S:     <extension>
S:       <fee:trnData xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
S:         <fee:currency>USD</fee:currency>
S:         <fee:fee
S:           refundable="1"
S:           grace-period="P5D">5.00</fee:fee>
S:       </fee:trnData>
S:     </extension>
S:     <trID>
S:       <clTRID>ABC-12345</clTRID>
S:       <svTRID>54322-XYZ</svTRID>
S:     </trID>
S:   </response>
S: </epp>]]>
            </artwork>
          </figure>

        </section>

        <section title="EPP &lt;update&gt; Command">
          <t>This extension adds elements to both the EPP &lt;update&gt;
          command and response, when the extension is included in the &lt;login&gt; 
          command service extensions.</t>

          <t>When submitting a &lt;update&gt; command to the server, the
          client MAY include in the &lt;extension&gt; element a
          &lt;fee:update&gt; element which includes the following child
          elements:</t>

          <t><list style="symbols">
            <t>An OPTIONAL &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>One or more &lt;fee:fee&gt; elements (as described in Section 3.4).</t>
          </list></t>

          <t>When the &lt;update&gt; command has been processed successfully,
          and the client included the extension in the &lt;login&gt; command 
          service extensions, the server MAY include in the &lt;extension&gt; 
          section of the EPP response a &lt;fee:updData&gt; element, which 
          contains the following child elements:</t>

          <t><list style="symbols">
            <t>A &lt;fee:currency&gt; element (as described in Section 3.2);</t>
            <t>Zero or more &lt;fee:fee&gt; elements (as described in Section 3.4);</t>
            <t>Zero or more &lt;fee:credit&gt; elements (as described in Section 3.4);</t>
            <t>An OPTIONAL &lt;fee:balance&gt; element (as described in Section 3.5);</t>
            <t>An OPTIONAL &lt;fee:creditLimit&gt; element (as described in Section 3.6).</t>
          </list></t>

          <figure>
            <preamble>Example &lt;update&gt; command:</preamble>

            <artwork><![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:     <update>
C:       <domain:update
C:         xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
C:         <domain:name>example.com</domain:name>
C:         <domain:chg>
C:           <domain:registrant>sh8013</domain:registrant>
C:         </domain:chg>
C:       </domain:update>
C:     </update>
C:     <extension>
C:       <fee:update xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
C:         <fee:currency>USD</fee:currency>
C:         <fee:fee>5.00</fee:fee>
C:       </fee:update>
C:     </extension>
C:     <clTRID>ABC-12345</clTRID>
C:   </command>
C: </epp>]]>
            </artwork>
          </figure>

          <figure>
            <preamble>Example &lt;update&gt; response:</preamble>

            <artwork><![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:     <extension>
S:       <fee:updData xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0">
S:         <fee:currency>USD</fee:currency>
S:         <fee:fee>5.00</fee:fee>
S:       </fee:updData>
S:     </extension>
S:     <trID>
S:       <clTRID>ABC-12345</clTRID>
S:       <svTRID>54321-XYZ</svTRID>
S:     </trID>
S:   </response>
S: </epp>]]>
            </artwork>
          </figure>

        </section>

      </section>
      
    </section>

    <section anchor="syntax" title="Formal Syntax">

      <t>One schema is presented here that is the EPP Fee Extension schema.</t>

      <t>The formal syntax presented here is a complete schema representation of
      the object mapping suitable for automated validation of EPP XML instances.
      The BEGIN and END tags are not part of the schema; they are used to note the
      beginning and ending of the schema for URI registration purposes.</t>

      <section title="Fee Extension Schema">

        <t>Copyright (c) 2018 IETF Trust and the persons identified as authors of 
        the code. All rights reserved.</t>
        
        <t>Redistribution and use in source and binary forms, with or without 
        modification, are permitted provided that the following conditions are 
        met:</t>
        
        <t><list style="symbols">
          <t>Redistributions of source code must retain the above copyright 
          notice, this list of conditions and the following disclaimer.</t>
          <t>Redistributions in binary form must reproduce the above copyright 
          notice, this list of conditions and the following disclaimer in the 
          documentation and/or other materials provided with the distribution.</t>
          <t>Neither the name of Internet Society, IETF or IETF Trust, nor 
          the names of specific contributors, may be used to endorse or promote 
          products derived from this software without specific prior written 
          permission.</t>
        </list></t>

        <t>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
        "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 
        PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
        OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
        EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
        PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
        PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
        LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
        NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
        SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</t>
        
        <figure>
          <artwork><![CDATA[
BEGIN
<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
  xmlns:fee="urn:ietf:params:xml:ns:epp:fee-1.0"
  xmlns:eppcom="urn:ietf:params:xml:ns:eppcom-1.0"
  xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"
  targetNamespace="urn:ietf:params:xml:ns:epp:fee-1.0"
  elementFormDefault="qualified">

  <import namespace="urn:ietf:params:xml:ns:eppcom-1.0" />
  <import namespace="urn:ietf:params:xml:ns:domain-1.0" />

  <annotation>
    <documentation>
      Extensible Provisioning Protocol v1.0 Fee Extension
    </documentation>
  </annotation>

  <!-- Child elements found in EPP commands and responses -->
  <element name="check" type="fee:checkType" />
  <element name="chkData" type="fee:chkDataType" />
  <element name="create" type="fee:transformCommandType" />
  <element name="creData" type="fee:transformResultType" />
  <element name="renew" type="fee:transformCommandType" />
  <element name="renData" type="fee:transformResultType" />
  <element name="transfer" type="fee:transformCommandType" />
  <element name="trnData" type="fee:transformResultType" />
  <element name="update" type="fee:transformCommandType" />
  <element name="updData" type="fee:transformResultType" />
  <element name="delData" type="fee:transformResultType" />

  <!-- client <check> command -->
  <complexType name="checkType">
    <sequence>
      <element name="currency" type="fee:currencyType"
        minOccurs="0" />
      <element name="command" type="fee:commandType"
        minOccurs="1" maxOccurs="unbounded" />
    </sequence>
  </complexType>

  <complexType name="objectIdentifierType">
    <simpleContent>
      <extension base="eppcom:labelType">
        <attribute name="element"
        type="NMTOKEN" default="name" />
      </extension>
    </simpleContent>
  </complexType>

  <!-- server <check> result -->
  <complexType name="chkDataType">
    <sequence>
      <element name="currency" type="fee:currencyType" />
      <element name="cd" type="fee:objectCDType"
        maxOccurs="unbounded" />
    </sequence>
  </complexType>

  <complexType name="objectCDType">
    <sequence>
      <element name="objID" type="fee:objectIdentifierType" />
      <element name="class" type="token" minOccurs="0" />
      <element name="command" type="fee:commandDataType"
        minOccurs="0" maxOccurs="unbounded" />
      <element name="reason" type="fee:reasonType" minOccurs="0" />
    </sequence>
    <attribute name="avail" type="boolean" default="1" />
  </complexType>

  <!-- general transform (create, renew, update, transfer) command -->
  <complexType name="transformCommandType">
    <sequence>
      <element name="currency" type="fee:currencyType"
        minOccurs="0" />
      <element name="fee" type="fee:feeType"
        maxOccurs="unbounded" />
      <element name="credit" type="fee:creditType"
        minOccurs="0" maxOccurs="unbounded" />
    </sequence>
  </complexType>

  <!-- general transform (create, renew, update) result -->
  <complexType name="transformResultType">
    <sequence>
      <element name="currency" type="fee:currencyType"
        minOccurs="0" />
      <element name="period" type="domain:periodType"
        minOccurs="0" />
      <element name="fee" type="fee:feeType"
        minOccurs="0" maxOccurs="unbounded" />
      <element name="credit" type="fee:creditType"
        minOccurs="0" maxOccurs="unbounded" />
      <element name="balance" type="fee:balanceType"
        minOccurs="0" />
      <element name="creditLimit" type="fee:creditLimitType"
        minOccurs="0" />
    </sequence>
  </complexType>

  <!-- common types -->
  <simpleType name="currencyType">
    <restriction base="string">
      <pattern value="[A-Z]{3}" />
    </restriction>
  </simpleType>

  <complexType name="commandType">
    <sequence>
      <element name="period" type="domain:periodType"
        minOccurs="0" maxOccurs="1" />
    </sequence>
    <attribute name="name" type="fee:commandEnum"/>
    <attribute name="customName" type="token"/>
    <attribute name="phase" type="token" />
    <attribute name="subphase" type="token" />
  </complexType>

  <complexType name="commandDataType">
    <complexContent>
      <extension base="fee:commandType">
        <sequence>
          <element name="fee" type="fee:feeType"
            minOccurs="0" maxOccurs="unbounded" />
          <element name="credit" type="fee:creditType"
            minOccurs="0" maxOccurs="unbounded" />
          <element name="reason" type="fee:reasonType"
            minOccurs="0" />
        </sequence>
      </extension>
      <attribute name="standard" type="boolean" default="0" />
    </complexContent>
  </complexType>

  <complexType name="reasonType">
    <simpleContent>
      <extension base="token">
        <attribute name="lang" type="language" default="en"/>
      </extension>
    </simpleContent>
  </complexType>

  <simpleType name="commandEnum">
    <restriction base="token">
      <enumeration value="create"/>
      <enumeration value="delete"/>
      <enumeration value="renew"/>
      <enumeration value="update"/>
      <enumeration value="transfer"/>
      <enumeration value="restore"/>
      <enumeration value="custom"/>
    </restriction>
  </simpleType>

  <simpleType name="nonNegativeDecimal">
    <restriction base="decimal">
      <minInclusive value="0" />
    </restriction>
  </simpleType>

  <simpleType name="negativeDecimal">
    <restriction base="decimal">
      <maxInclusive value="0" />
    </restriction>
  </simpleType>

  <complexType name="feeType">
    <simpleContent>
      <extension base="fee:nonNegativeDecimal">
        <attribute name="description"/>
        <attribute name="refundable" type="boolean" />
        <attribute name="grace-period" type="duration" />
        <attribute name="applied">
          <simpleType>
            <restriction base="token">
              <enumeration value="immediate" />
              <enumeration value="delayed" />
            </restriction>
          </simpleType>
        </attribute>
      </extension>
    </simpleContent>
  </complexType>

  <complexType name="creditType">
    <simpleContent>
      <extension base="fee:negativeDecimal">
        <attribute name="description"/>
      </extension>
    </simpleContent>
  </complexType>

  <simpleType name="balanceType">
    <restriction base="decimal" />
  </simpleType>

  <simpleType name="creditLimitType">
    <restriction base="decimal" />
  </simpleType>

</schema>
END]]>
          </artwork>
        </figure>
      </section>

    </section>

    <section anchor="Security" title="Security Considerations">
      <t>The mapping extensions described in this document do not provide any
      security services beyond those described by EPP [RFC5730], the EPP domain
      name mapping [RFC5731], and protocol layers used by EPP.  The security
      considerations described in these other specifications apply to this
      specification as well.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">

    	<section title="XML Namespace">
        <t>This document uses URNs to describe XML namespaces and XML schemas
        conforming to a registry mechanism described in <xref target="RFC3688"/>.</t>
    	  
        <t>Registration request for the fee namespace:</t>

        <t>URI: urn:ietf:params:xml:ns:epp:fee-1.0</t>

        <t>Registrant Contact: IESG</t>

        <t>XML: None. Namespace URIs do not represent an XML specification.</t>

    	  <t>Registration request for the fee schema:</t>
    	  
    	  <t>URI: urn:ietf:params:xml:schema:epp:fee-1.0</t>
    	  
    	  <t>Registrant Contact: IESG</t>
    	  
    	  <t>XML: See the "Formal Syntax" section of this document.</t>
    	
    	</section>

      <section title="EPP Extension Registry">
        <t>The EPP extension described in this document should be registered by
        the IANA in the EPP Extension Registry described in [RFC7451].  The
        details of the registration are as follows:</t>

        <t>Name of Extension: Registry Fee Extension for the Extensible 
        Provisioning Protocol (EPP)</t>

        <t>Document status: Standards Track</t>

        <t>Reference: (insert reference to RFC version of this document)</t>

        <t>Registrant Name and Email Address: IESG, &lt;iesg@ietf.org&gt;</t>

        <t>TLDs: Any</t>

        <t>IPR Disclosure: None</t>

        <t>Status: Active</t>

        <t>Notes: None</t>
         
      </section>
       
    </section>

    <section title="Implementation Status">
      <t>Note to RFC Editor: Please remove this section and the reference to
      [RFC7942] before publication.</t>
      
      <t>This section records the status of known implementations of the
      protocol defined by this specification at the time of posting of this
      Internet-Draft, and is based on a proposal described in [RFC7942]. The
      description of implementations in this section is intended to assist the
      IETF in its decision processes in progressing drafts to RFCs.  Please note
      that the listing of any individual implementation here does not imply
      endorsement by the IETF.  Furthermore, no effort has been spent to verify
      the information presented here that was supplied by IETF contributors.
      This is not intended as, and must not be construed to be, a catalog of
      available implementations or their features.  Readers are advised to note
      that other implementations may exist.</t>
      
      <t>According to [RFC7942], "this will allow reviewers and working groups
      to assign due consideration to documents that have the benefit of running
      code, which may serve as evidence of valuable experimentation and feedback
      that have made the implemented protocols more mature. It is up to the
      individual working groups to use this information as they see fit".</t>

      <section title="RegistryEngine EPP Service">
        <t>Organization: CentralNic</t>

        <t>Name: RegistryEngine EPP Service</t>

        <t>Description: Generic high-volume EPP service for gTLDs, ccTLDs and
        SLDs</t>

        <t>Level of maturity: Deployed in CentralNic's production environment as
        well as two other gTLD registry systems, and two ccTLD registry systems.</t>

        <t>Coverage: All aspects of the protocol are implemented.</t>

        <t>Licensing: Proprietary In-House software</t>

        <t>Contact: epp@centralnic.com</t>

        <t>URL: https://www.centralnic.com</t>

      </section>
      
    </section>
    
    <section title="Acknowledgements">
      <t>The authors wish to thank the following persons for their feedback and
      suggestions:</t>
      <t><list style="symbols">
        <t>James Gould of Verisign Inc</t>
        <t>Luis Munoz of ISC</t>
        <t>Michael Young of Architelos</t>
        <t>Ben Levac and Jeff Eckhaus of Demand Media</t>
        <t>Seth Goldman of Google</t>
        <t>Klaus Malorny and Michael Bauland of Knipp</t>
        <t>Jody Kolker, Joe Snitker and Kevin Allendorf of Go Daddy</t>
        <t>Michael Holloway of Com Laude</t>
        <t>Santosh Kalsangrah of Impetus Infotech</t>
        <t>Alex Mayrhofer of Nic.at</t>
        <t>Thomas Corte of Knipp Medien und Kommunikation GmbH</t>
      </list></t>
    </section>

    <section title="Change History">

      <section title="Change from 13 to 14">
        <t>Moved RFC 7451 reference from Normative to Informative section.</t>
      </section>
      
      <section title="Change from 12 to 13">
        <t>Updated XML namespace and schema registration to be "epp" scoped - 
           global replace of XML namespace from urn:ietf:params:xml:ns:fee-1.0 
           to urn:ietf:params:xml:ns:epp:fee-1.0 and the XML schema 
           registration from urn:ietf:params:xml:schema:fee-1.0 to 
           urn:ietf:params:xml:schema:epp:fee-1.0.</t>
      </section>
      
      <section title="Change from 11 to 12">
        <t>Updated references to current version of documents and moved the
        "standard" attribute from the check command (commandType) to the
        check response (commandDataType).</t>
      </section>
      
      <section title="Change from 10 to 11">
        <t>Updated document per Working Group Last Call comments. Made minor 
          textual changes throughout for enhanced clarity per WGLC comments.</t>
      </section>
      
      <section title="Change from 09 to 10">
        <t>Updated document per Working Group Last Call comments. Updated schema 
        to version 1.0 in anticipation of standardization, no changes were made 
        to the latest, 0.25, schema. Made minor textual changes throughout for 
        enhanced clarity per WGLC comments.</t>
      </section>

      <section title="Change from 08 to 09">
        <t>Updated scheme to version 0.25 to allow tighter checking on
        &lt;fee:command&gt; by splitting the client and server definitions, 
        moved the class element from the command to the object level and added 
        an optional standard attribute to the command element. Also updated 
        section 3.1 for clarity on name attribute; updated section 3.9 for 
        clarity on uses of &lt;fee:reason&gt;; removed second paragraph in 
        section 5.2.1 as it was duplicative of second to last paragraph in 4.0; 
        and updated section 5.1.1 to add section references.</t>
      </section>

      <section title="Change from 07 to 08">
        <t>Updated section 3.8 and 5.1.1 to provide clarity on server processing
        and response of various scenarios (i.e. "quiet" period processing).</t>
      </section>

      <section title="Change from 06 to 07">
        <t>Updated section 3.8 and 4.0 to provide clarity on server processing
        and response of various scenarios.</t>
      </section>

      <section title="Change from 05 to 06">
        <t>Updated scheme to version 0.23 to allow the return of no
        &lt;fee:command&gt; element(s) if an error situation occurs. Edited
        section 3.8 extensively after input from interim meeting and REGEXT F2F
        meeting at IETF-99. Added normative reference for
        draft-ietf-eppext-launchphase.</t>
      </section>

      <section title="Change from 04 to 05">
        <t>Updated scheme to version 0.21 to support the lang attribute for the
        reason element of the objectCDType and the commandType types as well as
        to add the update command to the commandEnum type. Updated section 3.1
        to include language for the custom command. Added section 3.9 to provide
        a description of the &lt;fee:reason&gt; element. Fixed typos and added
        clarification text on when client fee is less than server fee in section
        4. Additionally, I added description pointers to appropriate Section 3
        definitions for element clarity throughout the document.</t>
      </section>

      <section title="Change from 03 to 04">
        <t>Updated scheme to version 0.19 to correct typos and to replace the
        commandTypeValue type with the commandEnum type and customName attribute for
        stricter validation. Updated various text for grammar and clarity. Added
        text to section 4 clarifying the &lt;check&gt; response when the client
        provided no fee extension but the server was expecting the extension.</t>
      </section>

      <section title="Change from 02 to 03">
        <t>Updated scheme to version 0.17 to simplify the check command syntax.
        Moved fee avail to objectCDType to allow fast failing on error
        situations. Removed the objectCheckType as it was no longer being used.
        Updated examples to reflect these scheme changes. Added language for
        server failing a &lt;create&gt; if the &lt;fee:fee&gt; passed by the
        client is less than the server fee.</t>
      </section>

      <section title="Change from 01 to 02">
        <t>Updated scheme to version 0.15 to fix errors in CommandType,
        objectCDType, transformCommandType and transformResultType definitions.</t>
      </section>

      <section title="Change from 00 to 01">
        <t>Added Roger Carney as author to finish draft. Moved Formal Syntax
        section to main level numbering. Various grammar, typos, and
        administrative edits for clarity. Removed default value for the
        "applied" attribute of &lt;fee:fee&gt; so that it can truly be
        optional. Added support for the &lt;delete&gt; command to return a
        &lt;fee:fee&gt; element as well. Modified default response on the
        &lt;check&gt; command for the optional &lt;fee:period&gt; when it was
        not provided in the command, leaving it to the server to provide the
        default period value. Extensive edits were done to the &lt;check&gt;
        command, the &lt;check&gt; response and to the fee extension schema
        (checkType, objectCheckType, objectIdentifierType, objectCDType,
        commandType) to support requesting and returning multiple transformation
        fees in a single call. Added section on Phase/Subphase to provide more
        context on the uses.</t>
      </section>
      
      <section title="Change from draft-brown-00 to draft-ietf-regext-fees-00">
        <t>Updated to be REGEXT WG document.</t>
      </section>

    </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 title="Normative References">

      <reference anchor='ISO4217' target='https://www.iso.org/standard/64758.html'>
        <front>
          <title>Codes for the representation of currencies</title>
          <author>
            <organization>International Organization for Standardization</organization>
          </author>
          <date year='2015' month='August'/>
        </front>
      </reference>

      &RFC2119;

      &RFC3688;

      &RFC3915;

      &RFC5730;

      &RFC5731;

      &RFC7942;

      &RFC8174;

      &RFC8334;
      
    </references>

    <references title="Informative References">
      
      &RFC7451;

    </references>
    
  </back>
</rfc>

















































