<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" consensus="true" docName="draft-ietf-regext-epp-fees-20" number="8748" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">

  <!-- xml2rfc v2v3 conversion 2.35.0 -->

  <front>
    <title abbrev="Registry Fee Extension">
    Registry Fee Extension for the Extensible Provisioning Protocol (EPP)</title>
    <seriesInfo name="RFC" value="8748"/>
    <author fullname="Roger Carney" initials="R." 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>United States of America</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/>
          <code>EC2R 6AR</code>
          <country>United Kingdom</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="2020" month="March"/>

    <area>Applications and Real-Time</area>
    <workgroup>Registration Protocols Extensions</workgroup>

    <abstract>
      <t>Given the expansion of the DNS namespace and the proliferation of 
      novel business models, it is desirable to provide a method for Extensible 
      Provisioning Protocol (EPP) clients to query EPP servers for the fees and 
      credits associated with various billable transactions and provide expected fees and credits for certain commands and 
      objects. This document describes an EPP extension mapping for registry fees.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>

      <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 Redemption
      Grace Period (RGP) <xref target="RFC3915" format="default"/>
      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 expansion of the DNS namespace and the proliferation
      of novel business models, it is desirable to provide a method for EPP
      clients to query EPP servers for the fees and credits associated with
      various billable transactions and certain commands and specific objects.</t>
      <t>This document describes an extension mapping for version 1.0 of the
      Extensible Provisioning Protocol (EPP) <xref target="RFC5730" format="default"/>.  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 anchor="conventions" 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, the 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>"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 <bcp14>MUST NOT</bcp14>
        depend on it and instead employ a proper namespace-aware XML parser and
        serializer to interpret and output the XML documents.</t>
        <t>In the examples, "C:" represents lines sent by a protocol client, and "S:"
        represents lines returned by a protocol server.  Indentation and white
        space in the examples are provided only to illustrate element relationships
        and are not a required feature of this protocol.
        </t>
      </section>
    </section>
    <section anchor="migrating" numbered="true" toc="default">
      <name>Migrating to Newer Versions of This Extension</name>
      <t>Servers that implement this extension <bcp14>SHOULD</bcp14> provide a way for clients
      to progressively update their implementations when a new version of the
      extension is deployed.</t>
      <t>Servers <bcp14>SHOULD</bcp14> (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 that do not include extension
      elements, the server <bcp14>SHOULD</bcp14> 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 that do include extension
      elements, the server <bcp14>SHOULD</bcp14> only include extension elements for the
      extension versions present in the command.</t>
    </section>
    <section anchor="extension-elements" numbered="true" toc="default">
      <name>Extension Elements</name>
      <section anchor="client-commands" numbered="true" toc="default">
        <name>Client Commands</name>
        <t>The &lt;fee:command&gt; element is used in the EPP &lt;check&gt;
        command to determine the fee that is applicable to the given
	command.</t>

        <t>The "name" attribute of the &lt;fee:command&gt; is used to define which transform fees the client is requesting
        information about. The possible values for the "name"
        attribute are:</t>
        <ul spacing="normal">
          <li>"create", indicating a &lt;create&gt; command as defined in <xref
	  target="RFC5730" format="default"/>.</li>
          <li>"delete", indicating a &lt;delete&gt; command as defined in <xref
	  target="RFC5730" format="default"/>.</li>
          <li>"renew", indicating a &lt;renew&gt; command as defined in <xref
	  target="RFC5730" format="default"/>.</li>
          <li>"update", indicating a &lt;update&gt; command as defined in <xref
	  target="RFC5730" format="default"/>.</li>
          <li>"transfer", indicating a &lt;transfer&gt; command as defined in
	  <xref target="RFC5730" format="default"/>.</li>
          <li>If the server supports registry grace period mapping <xref
	  target="RFC3915" format="default"/>,
          then the server <bcp14>MUST</bcp14> also support the "restore" value as defined in
          <xref target="RFC3915" format="default"/>.</li>
          <li>"custom", indicating a custom command that <bcp14>MUST</bcp14> set the "customName"
          attribute with a custom command name. The possible set of custom command 
          name values is dictated by the server policy.</li>
        </ul>
        <t>The &lt;fee:command&gt; element <bcp14>MAY</bcp14> have an <bcp14>OPTIONAL</bcp14> "phase"
        attribute specifying a launch phase as described in
        <xref target="RFC8334" format="default"/>.  It may also contain an <bcp14>OPTIONAL</bcp14>
        "subphase" attribute identifying the custom or subphase as described in
        <xref target="RFC8334" format="default"/>.</t>
      </section>
      <section anchor="currency-codes" numbered="true" toc="default">
        <name>Currency Codes</name>
        <t>The &lt;fee:currency&gt; element is used to indicate the currency
	in which fees are charged.  The value of this element <bcp14>MUST</bcp14> be a
        three-character currency code from <xref target="ISO4217_2015" format="default"/>.</t>
        <t>Note that <xref target="ISO4217_2015" format="default"/> provides the special "XXX" code, which <bcp14>MAY</bcp14> 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 <bcp14>OPTIONAL</bcp14>: if
        a &lt;fee:currency&gt; element is not present in a command, the server
        <bcp14>MUST</bcp14> determine the currency based on the server default currency or 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 <bcp14>MUST</bcp14> be present in the responses.</t>
        <t>Servers <bcp14>SHOULD NOT</bcp14> perform a currency conversion if a client uses an
        incorrect currency code.  Servers <bcp14>SHOULD</bcp14> return a 2004 "Parameter value
        range error" instead.</t>
      </section>
      <section anchor="validity-periods" numbered="true" toc="default">
        <name>Validity Periods</name>
        <t>When querying for fee information using the &lt;check&gt; command,
        the &lt;fee:period&gt; element is used to indicate the validity
	period, which is to be added to extend the registration period of
	objects by the &lt;create&gt;, &lt;renew&gt;, and &lt;transfer&gt;
	commands. Validity periods are measured in years or months, with the
	appropriate units specified using the "unit" attribute. Valid values
	for the "unit" attribute are "y" for years and "m" for months. 

This element is derived from the &lt;domain:period&gt; element described in 
        <xref target="RFC5731" format="default"/>.</t>
        <t>The &lt;fee:period&gt; element is <bcp14>OPTIONAL</bcp14> in &lt;check&gt; commands;
        if omitted, the server <bcp14>MUST</bcp14> determine the fee(s) using the server
        default period.  The &lt;fee:period&gt; element <bcp14>MUST</bcp14> be present in
        &lt;check&gt; responses.</t>
      </section>
      <section anchor="fees-credits" numbered="true" toc="default">
        <name>Fees and Credits</name>
        <t>Servers that implement this extension will include elements in
        responses that provide information about the fees and/or credits
        associated with a given billable transaction. A fee will result in 
        subtracting from the Account Balance (described in <xref
	target="account-balance"/>), and a 
        credit will result in adding to the Account Balance (described in <xref
	target="account-balance"/>).</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 <bcp14>MUST</bcp14> have a zero or greater (non-negative) value.  A &lt;fee:credit&gt; element 
        <bcp14>MUST</bcp14> have a negative value.</t>
        <t>A server <bcp14>MAY</bcp14> 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 for the
        object (where applicable).</t>
        <t>The following attributes are defined for the &lt;fee:fee&gt; element.
        These are described in detail below:</t>

<dl newline="false">
        <dt>description:</dt>  
	<dd>an <bcp14>OPTIONAL</bcp14> attribute that provides a human-readable
        description of the fee.  Servers should provide documentation on the
        possible values of this attribute and their meanings. An <bcp14>OPTIONAL</bcp14> 
        "lang" attribute <bcp14>MAY</bcp14> be present, per the language structure in <xref
	target="RFC5646" format="default"/>, 
        to identify the language of the returned text and has a default value 
        of "en" (English). If the "description" attribute is not present, the 
        "lang" attribute can be ignored.</dd>
        <dt>refundable:</dt>  
<dd>an <bcp14>OPTIONAL</bcp14> boolean attribute indicating whether the fee
        is refundable if the object is deleted.</dd>
        <dt>grace-period:</dt> <dd>an <bcp14>OPTIONAL</bcp14> attribute that provides the time period
        during which the fee is refundable.</dd>
        <dt>applied:</dt>  <dd>an <bcp14>OPTIONAL</bcp14> attribute indicating when the fee will be
        deducted from the client's account.</dd></dl>
        <t>The &lt;fee:credit&gt; element can take a "description" attribute as
          described above.  An <bcp14>OPTIONAL</bcp14> "lang" attribute <bcp14>MAY</bcp14> be present to 
          identify the language of the returned text and has a default value of 
          "en" (English).</t>

        <section anchor="refunds" numbered="true" toc="default">
          <name>Refunds</name>
          <t>&lt;fee:fee&gt; elements <bcp14>MAY</bcp14> have an <bcp14>OPTIONAL</bcp14> "refundable"
          attribute that takes a boolean value.  Fees may be refunded under
          certain circumstances, such as when a domain application is rejected
          (as described in <xref target="RFC8334" format="default"/>) or when an object is
          deleted during the relevant grace period (see <xref target="grace-periods"/>).</t>
          <t>If the "refundable" attribute is omitted, then clients <bcp14>SHOULD NOT</bcp14>
          make any assumptions about the refundability of the fee.</t>
        </section>
        <section anchor="grace-periods" numbered="true" toc="default">
          <name>Grace Periods</name>
          <t><xref target="RFC3915" format="default"/> 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 <bcp14>MAY</bcp14> be used to indicate the relevant
          grace period for a fee.  If a server implements the registry grace
          period extension <xref target="RFC3915" format="default"/>, it <bcp14>MUST</bcp14> specify the grace period for all 
          relevant transactions.</t>
          <t>If the "grace-period" attribute is omitted, then clients <bcp14>SHOULD NOT</bcp14>
          make any assumptions about the grace period of the fee.</t>
        </section>
        <section anchor="correlation-refund-grace" numbered="true" toc="default">
          <name>Correlation between Refundability and Grace Periods</name>
          <t>If a &lt;fee:fee&gt; element has a "grace-period" attribute, then it
          <bcp14>MUST</bcp14> also be refundable, and the "refundable" attribute <bcp14>MUST</bcp14> be true.  
          If the "refundable" attribute of a &lt;fee:fee&gt; element is false, 
          then it <bcp14>MUST NOT</bcp14> have a "grace-period" attribute.</t>
        </section>
        <section anchor="applicability" numbered="true" toc="default">
          <name>Applicability</name>
          <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 anchor="account-balance" numbered="true" toc="default">
        <name>Account Balance</name>
        <t>The &lt;fee:balance&gt; element is an <bcp14>OPTIONAL</bcp14> element that <bcp14>MAY</bcp14> 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 <bcp14>MUST</bcp14> 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; <bcp14>MAY</bcp14> be negative.  A negative
        balance indicates that the server has extended a line of credit to the
        client (see <xref target="credit-limit"/>).</t>
        <t>If a server includes a &lt;fee:balance&gt; element in response to
        transform commands, the value of the element <bcp14>MUST</bcp14> reflect the client's
        account balance after any fees or credits associated with that command
        have been applied. If the "applied" attribute of the &lt;fee:fee&gt; element 
        is "delayed", then the &lt;fee:balance&gt; <bcp14>MUST</bcp14> reflect the client's account 
        balance without any fees or credits associated with that command.</t>
      </section>
      <section anchor="credit-limit" numbered="true" toc="default">
        <name>Credit Limit</name>

        <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 <bcp14>MAY</bcp14> also
	include in responses a
        &lt;fee:creditLimit&gt; element that indicates the maximum
        credit available to a client.  A server <bcp14>MAY</bcp14> 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 <bcp14>MUST</bcp14> 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 anchor="classification-objects" numbered="true" toc="default">
        <name>Classification of Objects</name>
        <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 <bcp14>MAY</bcp14> 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 <bcp14>MUST NOT</bcp14> use values that do not appear on this list.</t>
        <t>Servers that make use of this element <bcp14>MUST</bcp14> 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 anchor="phase-subphase" numbered="true" toc="default">
        <name>"Phase" and "Subphase" Attributes</name>
        <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 <xref target="RFC8334" format="default"/>. 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 <bcp14>MUST</bcp14> return
	the 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 <bcp14>MUST</bcp14> return the 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 <bcp14>MUST</bcp14> 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 <bcp14>MUST</bcp14> 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 <bcp14>MUST</bcp14> return the 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 <bcp14>MUST</bcp14> 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 <bcp14>MUST</bcp14> respond with a 2003 "Required parameter
        missing" error.</t>
        <t>If the client &lt;fee:command&gt; contains a phase attribute not
        defined in <xref target="RFC8334" format="default"/> or not supported
	by the server,
        the server <bcp14>MUST</bcp14> 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 the server, the server <bcp14>MUST</bcp14>
        respond with a 2004 "Parameter value range error".</t>
      </section>
      <section anchor="reason" numbered="true" toc="default">
        <name>Reason</name>
        <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 <bcp14>OPTIONAL</bcp14> "lang" attribute <bcp14>MAY</bcp14> be
        present to identify the language, per the language structure in 
        <xref target="RFC5646" format="default"/>, 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. See 
        <xref target="epp-check"/> for details on the &lt;fee:cd&gt; "check data" 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 the error processing of
        &lt;fee:command&gt; element(s):</t>
        <ol spacing="normal" type="1">
          <li>
            <t>Fast-fail: The server, upon error identification, <bcp14>MAY</bcp14> stop
          processing &lt;fee:command&gt; elements and return a
          &lt;fee:cd&gt; to the client containing the &lt;fee:objID&gt; and a
          &lt;fee:reason&gt; element detailing the reason for failure.
            </t>

            <sourcecode name="" type=""><![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>
]]></sourcecode>
          </li>
          <li>
            <t>Partial-fail: The server, upon error identification, <bcp14>MAY</bcp14> continue
          processing &lt;fee:command&gt; elements and return a
          &lt;fee:cd&gt; to the client containing the successfully processed &lt;fee:command&gt;
          elements and failed &lt;fee:command&gt; elements. All returned failed
          &lt;fee:command&gt; elements <bcp14>MUST</bcp14> have a &lt;fee:reason&gt;
          element detailing the reason for failure, and the server <bcp14>MAY</bcp14>
          additionally include a &lt;fee:reason&gt; element at the
          &lt;fee:cd&gt; level.
            </t>
            <sourcecode name="" type=""><![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>
]]></sourcecode>
          </li>
        </ol>
        <t>In either failure scenario, the server <bcp14>MUST</bcp14> set the &lt;fee:cd&gt;
        "avail" attribute to false (0), and the server <bcp14>MUST</bcp14> process all objects in 
        the client request.</t>
      </section>
    </section>
    <section anchor="server-handling" numbered="true" toc="default">
      <name>Server Handling of Fee Information</name>
      <t>Depending on the server policy, a client <bcp14>MAY</bcp14> 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 <bcp14>MUST</bcp14> 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 where the server would
      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 that
      results in no possible fee combination, the server <bcp14>MUST</bcp14> set the "avail" 
      attribute of the &lt;fee:cd&gt; element to false (0) and provide a 
      &lt;fee:reason&gt;.</t>
      <t>If a server receives a &lt;check&gt; command from a client that results in an ambiguous result (i.e., multiple possible fee combinations),
      the server <bcp14>MUST</bcp14> reject the command with a 2003 "Required parameter
      missing" error.</t>
      <t>If a server receives a command from a client that does not include the
      fee extension data elements required by the server for that command, then
      the server <bcp14>MUST</bcp14> respond with a 2003 "Required parameter missing" error.</t>
      <t>If the total fee provided by the client is less than the server's own 
      calculation of the fee or the server determines the currency is 
      inappropriate for that command, then the server <bcp14>MUST</bcp14> reject the command 
      with a 2004 "Parameter value range error".</t>
    </section>
    <section anchor="epp-command" numbered="true" toc="default">
      <name>EPP Command Mapping</name>
      <t>A detailed description of the EPP syntax and semantics can be found in
      <xref target="RFC5730" format="default"/>.</t>
      <section anchor="epp-query" numbered="true" toc="default">
        <name>EPP Query Commands</name>
        <t>This extension does not add any elements to the EPP &lt;poll&gt; or
        &lt;info&gt; commands or responses.</t>
        <section anchor="epp-check" numbered="true" toc="default">
          <name>EPP &lt;check&gt; Command</name>

          <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.</t>
          <t>The command <bcp14>MAY</bcp14> contain an &lt;extension&gt; element, which <bcp14>MAY</bcp14>
          contain a &lt;fee:check&gt; element. The &lt;fee:check&gt; element
          <bcp14>MAY</bcp14> contain one &lt;fee:currency&gt; element and <bcp14>MUST</bcp14> contain one or
          more &lt;fee:command&gt; elements.</t>
          <t>The &lt;fee:command&gt; element(s) <bcp14>MUST</bcp14> contain a "name" attribute
          (see <xref target="client-commands"/>), an <bcp14>OPTIONAL</bcp14> "phase" attribute, and an <bcp14>OPTIONAL</bcp14>
          "subphase" attribute (see <xref target="phase-subphase"/>). The &lt;fee:command&gt;
          element(s) <bcp14>MAY</bcp14> have the following child elements:</t>
          <ul spacing="normal">
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:period&gt; element (as described in <xref target="validity-periods"/>).</li>
          </ul>
          <t>Example &lt;check&gt; command:</t>
          <sourcecode name="" type=""><![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>
]]></sourcecode>
          <t>When the server receives a &lt;check&gt; command that includes the
          extension elements described above, its response <bcp14>MUST</bcp14> contain an
          &lt;extension&gt; element, which <bcp14>MUST</bcp14> contain a child
          &lt;fee:chkData&gt; element. The &lt;fee:chkData&gt; element <bcp14>MUST</bcp14>
          contain a &lt;fee:currency&gt; element and a &lt;fee:cd&gt; element 
          for each object referenced in the client &lt;check&gt; command.</t>
          <t>Each &lt;fee:cd&gt; (check data) element <bcp14>MUST</bcp14> contain the following 
          child elements:</t>
          <ul spacing="normal">
            <li>A &lt;fee:objID&gt; element, which <bcp14>MUST</bcp14> match an element
            referenced in the client &lt;check&gt; command.</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:class&gt; element (as
	    described in <xref target="classification-objects"/>).</li>
            <li>A &lt;fee:command&gt; element matching each &lt;fee:command&gt;
            (unless the "avail" attribute of the &lt;fee:cd&gt; is false) that
            appeared in the corresponding &lt;fee:check&gt; of the client
            command. This element <bcp14>MAY</bcp14> have the <bcp14>OPTIONAL</bcp14> "standard" attribute,
            with a default value of "0" (or "false"), which indicates whether
            the fee is the standard or default fee (see
            <xref target="classification-objects"/>). This element <bcp14>MAY</bcp14> have the <bcp14>OPTIONAL</bcp14> "phase" and
            "subphase" attributes, which will match the same attributes in the
            corresponding &lt;fee:command&gt; element of the client command if
            sent by the client.</li>
          </ul>
          <t>The &lt;fee:cd&gt; element also has an <bcp14>OPTIONAL</bcp14> "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 <bcp14>MUST</bcp14> contain a
          &lt;fee:reason&gt; element (as described in <xref target="reason"/>), and the
          server <bcp14>MAY</bcp14> eliminate some or all of the &lt;fee:command&gt; element(s).</t>
          <t>The &lt;fee:command&gt; element(s) <bcp14>MAY</bcp14> have the following child
          elements:</t>
          <ul spacing="normal">
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:period&gt; element (as described in <xref target="validity-periods"/>), which contains the same unit, if present, that appeared in the 
            &lt;fee:period&gt; element of the command. If the value of the parent
            &lt;fee:command&gt; element is "restore", this element <bcp14>MUST NOT</bcp14> be 
            included; otherwise, it <bcp14>MUST</bcp14> be included. If no &lt;fee:period&gt; 
            appeared in the client command (and the command is not "restore"), 
            then the server <bcp14>MUST</bcp14> return its default period value.</li>
            <li>Zero or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>Zero or more &lt;fee:credit&gt; elements (as described in
	    <xref target="fees-credits"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:reason&gt; element (as described in <xref target="reason"/>).</li>
          </ul>
          <t>If the "avail" attribute of the &lt;fee:cd&gt; element is true (1) 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 of the &lt;fee:cd&gt; element is true (1), 
          then the &lt;fee:command&gt; element <bcp14>MUST NOT</bcp14> contain a &lt;fee:reason&gt; 
          element.</t>
          <t>Example &lt;check&gt; response:</t>
          <sourcecode name="" type=""><![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>
]]></sourcecode>
        </section>
        <section anchor="epp-transfer-query" numbered="true" toc="default">
          <name>EPP Transfer Query Command</name>
          <t>This extension does not add any elements to the EPP &lt;transfer&gt;
          query command, but it 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 <bcp14>MAY</bcp14> include in the &lt;extension&gt; section of the EPP 
          response a &lt;fee:trnData&gt; element, which contains the following 
          child elements:</t>
          <ul spacing="normal">
            <li>A &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>A &lt;fee:period&gt; element (as described in <xref target="validity-periods"/>).</li>
            <li>Zero or more &lt;fee:fee&gt; elements  (as described in <xref target="fees-credits"/>) containing the fees that will be charged to the gaining client.</li>
            <li>Zero or more &lt;fee:credit&gt; elements  (as described in
            <xref target="fees-credits"/>) containing the credits that will be refunded to the
            losing client.</li>
          </ul>
          <t>Servers <bcp14>SHOULD</bcp14> 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>
          <t>Example &lt;transfer&gt; query response:</t>
          <sourcecode name="" type=""><![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>2019-06-08T22:00:00.0Z</domain:reDate>
S:         <domain:acID>ClientY</domain:acID>
S:         <domain:acDate>2019-06-13T22:00:00.0Z</domain:acDate>
S:         <domain:exDate>2021-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>
]]></sourcecode>
        </section>
      </section>
      <section anchor="epp-transform" numbered="true" toc="default">
        <name>EPP Transform Commands</name>
        <section anchor="epp-create" numbered="true" toc="default">
          <name>EPP &lt;create&gt; Command</name>
          <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
          <bcp14>MAY</bcp14> include in the &lt;extension&gt; element a &lt;fee:create&gt;
          element, which includes the following child elements:</t>
          <ul spacing="normal">
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:currency&gt; element (as described in
	    <xref target="currency-codes"/>).</li>
            <li>One or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
          </ul>
          <t>When the &lt;create&gt; command has been processed successfully,
          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 <bcp14>MUST</bcp14> include in the &lt;extension&gt; section 
          of the EPP response a &lt;fee:creData&gt; element, which contains the 
          following child elements:</t>
          <ul spacing="normal">
            <li>A &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>Zero or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>Zero or more &lt;fee:credit&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:balance&gt; element (as described in <xref
	    target="account-balance"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:creditLimit&gt; element (as described in <xref target="credit-limit"/>).</li>
          </ul>
          <t>Example &lt;create&gt; command:</t>
          <sourcecode name="" type=""><![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>
]]></sourcecode>
          <t keepWithNext="true">Example &lt;create&gt; response:</t>
          <sourcecode name="" type=""><![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>2019-04-03T22:00:00.0Z</domain:crDate>
S:         <domain:exDate>2021-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:           lang="en"
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>
]]></sourcecode>
        </section>
        <section anchor="epp-delete" numbered="true" toc="default">
          <name>EPP &lt;delete&gt; Command</name>
          <t>This extension does not add any elements to the EPP &lt;delete&gt;
          command, but it 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 <bcp14>MAY</bcp14> include in the &lt;extension&gt; 
          section of the EPP response a &lt;fee:delData&gt; element, which 
          contains the following child elements:</t>
          <ul spacing="normal">
            <li>A &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>Zero or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>Zero or more &lt;fee:credit&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:balance&gt; element (as described in <xref
	    target="account-balance"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:creditLimit&gt; element (as described in <xref target="credit-limit"/>).</li>
          </ul>
          <t keepWithNext="true">Example &lt;delete&gt; response:</t>
          <sourcecode name="" type=""><![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 
S:           description="AGP Credit"
S:           lang="en">-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>
]]></sourcecode>
        </section>
        <section anchor="epp-renew" numbered="true" toc="default">
          <name>EPP &lt;renew&gt; Command</name>
          <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
          <bcp14>MAY</bcp14> include in the &lt;extension&gt; element a &lt;fee:renew&gt;
          element, which includes the following child elements:</t>
          <ul spacing="normal">
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>One or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
          </ul>
          <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 <bcp14>MAY</bcp14> include in the &lt;extension&gt; section of 
          the EPP response a &lt;fee:renData&gt; element, which contains the 
          following child elements:</t>
          <ul spacing="normal">
            <li>A &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>Zero or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>Zero or more &lt;fee:credit&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:balance&gt; element (as described in <xref target="account-balance"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:creditLimit&gt; element (as described in <xref target="credit-limit"/>).</li>
          </ul>
          <t keepWithNext="true">Example &lt;renew&gt; command:</t>
          <sourcecode name="" type=""><![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>2019-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>
]]></sourcecode>
          <t>Example &lt;renew&gt; response:</t>
          <sourcecode name="" type=""><![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>2024-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>
]]></sourcecode>
        </section>
        <section anchor="epp-transfer-command" numbered="true" toc="default">
          <name>EPP &lt;transfer&gt; Command</name>
          <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 <bcp14>MAY</bcp14> include in the &lt;extension&gt; element a
          &lt;fee:transfer&gt; element, which includes the following child
          elements:</t>
          <ul spacing="normal">
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>One or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
          </ul>
          <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 <bcp14>MAY</bcp14> include in the &lt;extension&gt; 
          section of the EPP response a &lt;fee:trnData&gt; element, which 
          contains the following child elements:</t>
          <ul spacing="normal">
            <li>A &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>Zero or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>Zero or more &lt;fee:credit&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:balance&gt; element (as described in <xref target="account-balance"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:creditLimit&gt; element (as described in <xref target="credit-limit"/>).</li>
          </ul>
          <t>Example &lt;transfer&gt; command:</t>
          <sourcecode name="" type=""><![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>
]]></sourcecode>
          <t keepWithNext="true">Example &lt;transfer&gt; response:</t>
          <sourcecode name="" type=""><![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>2019-06-08T22:00:00.0Z</domain:reDate>
S:         <domain:acID>ClientY</domain:acID>
S:         <domain:acDate>2019-06-13T22:00:00.0Z</domain:acDate>
S:         <domain:exDate>2021-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>
]]></sourcecode>
        </section>
        <section anchor="epp-update" numbered="true" toc="default">
          <name>EPP &lt;update&gt; Command</name>
          <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 an &lt;update&gt; command to the server, the
          client <bcp14>MAY</bcp14> include in the &lt;extension&gt; element a
          &lt;fee:update&gt; element, which includes the following child
          elements:</t>
          <ul spacing="normal">
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>One or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
          </ul>
          <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 <bcp14>MAY</bcp14> include in the &lt;extension&gt; 
          section of the EPP response a &lt;fee:updData&gt; element, which
          contains the following child elements:</t>
          <ul spacing="normal">
            <li>A &lt;fee:currency&gt; element (as described in <xref target="currency-codes"/>).</li>
            <li>Zero or more &lt;fee:fee&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>Zero or more &lt;fee:credit&gt; elements (as described in <xref target="fees-credits"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:balance&gt; element (as described in <xref target="account-balance"/>).</li>
            <li>An <bcp14>OPTIONAL</bcp14> &lt;fee:creditLimit&gt; element (as described in <xref target="credit-limit"/>).</li>
          </ul>
          <t>Example &lt;update&gt; command:</t>
          <sourcecode name="" type=""><![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>
]]></sourcecode>
          <t>Example &lt;update&gt; response:</t>
          <sourcecode name="" type=""><![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>
]]></sourcecode>
        </section>
      </section>
    </section>
    <section anchor="syntax" numbered="true" toc="default">
      <name>Formal Syntax</name>
      <t>One schema is presented here -- 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.</t>
      <section anchor="fee-extension" numbered="true" toc="default">
        <name>Fee Extension Schema</name>
        <t>The formal syntax presented here is a complete schema
	representation <xref target="W3C.REC-xmlschema-1-20041028"/>
        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 schema; they are 
        used to note the beginning and end of the schema for URI registration 
        purposes.</t>
        <sourcecode type="xml" markers="true"><![CDATA[
<?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" use="required"/>
    <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>
        <attribute name="standard" type="boolean" default="0" />
      </extension>
    </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="lang" type="language" default="en"/>
        <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"/>
        <attribute name="lang" type="language" default="en"/>
      </extension>
    </simpleContent>
  </complexType>

  <simpleType name="balanceType">
    <restriction base="decimal" />
  </simpleType>

  <simpleType name="creditLimitType">
    <restriction base="decimal" />
  </simpleType>

</schema>
]]></sourcecode>
      </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 the EPP <xref target="RFC5730" format="default"/>, the EPP domain
      name mapping <xref target="RFC5731" format="default"/>, and the protocol
      layers used by the EPP.  The security
      considerations described in these other specifications apply to this
      specification as well. This extension passes financial information using 
      the EPP protocol, so confidentiality and integrity protection must be 
      provided by the transport mechanism.  All transports compliant with 
      <xref target="RFC5730" format="default"/> provide the needed level of confidentiality and integrity 
      protections.  The server will only provide information, including 
      financial information, that is relevant to the authenticated client.</t>
    </section>
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section anchor="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"/>.</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 <xref target="syntax"/> of this document.</t>
      </section>
      <section anchor="epp-extension-reg" 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>
        <t>Name of Extension: Registry Fee Extension for the Extensible 
        Provisioning Protocol (EPP)</t>
        <t>Document status: Standards Track</t>
        <t>Reference: RFC 8748</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>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="ISO4217_2015" target="https://www.iso.org/standard/64758.html">
          <front>
            <title>Codes for the representation of currencies</title>
<seriesInfo name="ISO" value="4217:2015"/>
            <author>
              <organization>ISO</organization>
            </author>
            <date year="2015" month="August"/>
          </front>
        </reference>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3915.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5646.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5730.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5731.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8334.xml"/>

        <reference anchor="W3C.REC-xmlschema-1-20041028" target="http://www.w3.org/TR/2004/REC-xmlschema-1-20041028" xml:base="https://xml2rfc.ietf.org/public/rfc/bibxml4/reference.W3C.REC-xmlschema-1-20041028.xml">
          <front>
            <title>XML Schema Part 1: Structures Second Edition</title>
            <seriesInfo name="World Wide Web Consortium Recommendation" value="REC-xmlschema-1-20041028"/>
            <author initials="H." surname="Thompson" fullname="Henry Thompson">
              <organization/>
            </author>
            <author initials="D." surname="Beech" fullname="David Beech">
              <organization/>
            </author>
            <author initials="M." surname="Maloney" fullname="Murray Maloney">
              <organization/>
            </author>
            <author initials="N." surname="Mendelsohn" fullname="Noah Mendelsohn">
              <organization/>
            </author>
            <date month="October" year="2004"/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7451.xml"/>
      </references>
    </references>
    <section anchor="acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors wish to thank the following persons for their feedback and
      suggestions:</t>
      <ul spacing="compact">
        <li><t><contact fullname="James Gould"/> of Verisign Inc.</t></li>
        <li><t><contact fullname="Luis Munoz"/> of ISC</t></li>
        <li><t><contact fullname="Michael Young"/></t></li>
        <li><t><contact fullname="Ben Levac"/></t></li> 
<li><t><contact fullname="Jeff Eckhaus"/></t></li>
        <li><t><contact fullname="Seth Goldman"/> of Google</t></li>
        <li><t><contact fullname="Klaus Malorny"/> and <contact fullname="Michael Bauland"/> of Knipp</t></li>
        <li><t><contact fullname="Jody Kolker"/>, <contact fullname="Joe
	Snitker"/>, and <contact fullname="Kevin Allendorf"/> of GoDaddy</t></li>
        <li><t><contact fullname="Michael Holloway"/> of Com Laude</t></li>
        <li><t><contact fullname="Santosh Kalsangrah"/> of Impetus Infotech</t></li>
        <li><t><contact fullname="Alex Mayrhofer"/> of Nic.at</t></li>
        <li><t><contact fullname="Thomas Corte"/> of Knipp Medien und Kommunikation GmbH</t></li>
      </ul>
    </section>
  </back>
</rfc>
