Search in this section

Skip to end of metadata
Go to start of metadata

The domain registration period renewal is a asynchronous process which can be automated by using 3 EPP commands. 

Table of contents

Inquiring Domain Information

Since the expire date is needed for the DomainRenew command, you must inquire this information beforehand. The expire date is returned in the response within the exDate tag.

Domain Info Request
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <info>
            <domain:info xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name hosts="all">domain.com</domain:name>
            </domain:info>
        </info>
        <clTRID>ABC-12345</clTRID>
    </command>
</epp>
Domain Info Response
<epp xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
    <response>
        <result code="1000">
            <msg lang="en">Command completed successfully</msg>
        </result>
        <resData>
            <domain:infData>
                <domain:name>domain.com</domain:name>
                <domain:roid>11109997-domain.com</domain:roid>
                <domain:registrant>23022508</domain:registrant>
                <domain:contact type="admin">23022508</domain:contact>
                <domain:contact type="tech">23022508</domain:contact>
                <domain:ns>
                    <domain:hostAttr>
                        <domain:hostName>ns1.nameserver.com</domain:hostName>
                    </domain:hostAttr>
                    <domain:hostAttr>
                        <domain:hostName>ns2.nameserver.com</domain:hostName>
                    </domain:hostAttr>
                </domain:ns>
                <domain:clID>user1, 4</domain:clID>
                <domain:crID>user1, 4</domain:crID>
                <domain:crDate>2017-07-31T14:44:41.000Z</domain:crDate>
                <domain:upID>user1, 4</domain:upID>
                <domain:upDate>2017-07-31T09:06:49.000Z</domain:upDate>
                <domain:exDate>2018-07-31T14:44:41.000Z</domain:exDate>
                <domain:authInfo>
                    <domain:pw>123ABC456DEF</domain:pw>
                </domain:authInfo>
            </domain:infData>
        </resData>
        <extension>
            <domainrobot:domain xmlns:domainrobot="urn:org:domainrobot:ns:ext-1.0">
                <domainrobot:zonec>23022508</domainrobot:zonec>
                <domainrobot:trustee>0</domainrobot:trustee>
                <domainrobot:privacy>0</domainrobot:privacy>
            </domainrobot:domain>
        </extension>
        <trID>
            <clTRID>ABC-12345</clTRID>
        </trID>
    </response>
</epp>

Extending Domain Registration Period

The registration period of a domain can be extended with the DomainRenew command. The length of the renew is set with the period tag. In the tag curExpDate the value from exDate is set.

The possible registration periods that can be used for a DomainRenew depend on the TLD.

By setting a clTRID, the poll message for this request can be assigned. In this example <clTRID>EXAMPLE-123456789</clTRID> is used.

Domain Renew Request
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <command>
        <renew>
            <domain:renew xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
                <domain:name>domain.com</domain:name>
                <domain:curExpDate>2020-05-22</domain:curExpDate>
                <domain:period unit="y">0</domain:period>
            </domain:renew>
        </renew>
        <clTRID>EXAMPLE-123456789</clTRID>
    </command>
</epp>
Domain Renew Response
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
    <response>
        <result code="1001">
            <msg lang="en">Command completed successfully; action pending</msg>
        </result>
        <resData>
            <domain:renData>
                <domain:name>domain.com</domain:name>
            </domain:renData>
        </resData>
        <extension />
        <trID>
            <clTRID>EXAMPLE-123456789</clTRID>
        </trID>
    </response>
</epp>

Inquiring and Confirming Poll Messages

The DomainRenew command automatically generates a job that takes care of the renewal process. As soon as the job is finished, a poll message is generated that can be inquired with the poll info command.

Poll Request
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
	<command>
		<poll op="req" />
		<clTRID>ABC-12345</clTRID>
	</command>
</epp>
Poll Response
TODO


In order to assign a poll message to a domain registration, a clTRID (ClientTransactionId) can be used for which the following is important:


<clTRID>EXAMPLE-123456789</clTRID>


The returned clTRID is the same as the one that was used for the previous DomainCreate command. The polling system works under the first-in-first-out (FIFO) principle. The poll message is therefore returned until it is confirmed. To confirm a poll message, the ID from the previous command is required.



Poll Confirm Request
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
	<command>
		<poll op="ack" msgID="627787" />
		<clTRID>ABC-12346</clTRID>
	</command>
</epp>
Poll Confirm Response
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
    <response>
        <result code="1000">
            <msg lang="en">Command completed successfully</msg>
        </result>
        <msgQ count="0" id="627787" />
        <trID>
            <clTRID>ABC-12346</clTRID>
        </trID>
    </response>
</epp>