namecheap.domains.renew
Renews an expiring domain.
Request Parameters
Global parameters are not shown here for clarity, but should be present in all requests
| Name | Type | MaxLength | Required? | Default | Description |
| DomainName | String | 70 | Yes | | DomainName to renew |
| Years | Number | 2 | Yes | | Number of years to renew |
| PromotionCode | String | 20 | No | | Promotional (coupon) code for renewing the domain |
Example Request
https://api.namecheap.com/xml.response?ApiUser=apiexample&ApiKey=56b4c87ef4fd49cb96d915c0db68194&
UserName=apiexample&Command=namecheap.domains.renew&ClientIp=192.168.1.109&DomainName=domain1.com
&Years=2
Example Response
<?xml version="1.0" encoding="utf-8"?>
<ApiResponse Status="OK" xmlns="http://api.namecheap.com/xml.response">
<Errors />
<RequestedCommand>namecheap.domains.renew</RequestedCommand>
<CommandResponse Type="namecheap.domains.renew">
<DomainRenewResult DomainName="domain1.com" DomainID="1718" Renew="true"
OrderID="243342" TransactionID="21223" ChargedAmount="18.2400"/>
</CommandResponse>
<Server>SERVER-NAME</Server>
<GMTTimeDifference>+5</GMTTimeDifference>
<ExecutionTime>32.76</ExecutionTime>
</ApiResponse>
Error Codes
Specifies the error codes that might be returned from this method
| Number | Description |
| 2033409 | Possibly a logical error in authentication phase. Order chargeable for
Username is not found |
| 2011170 | Promotion Code is invalid |
| 2011280 | TLD is invalid |
| 2528166 | Order creation failed |
| 2020166 | Domain has expired.Please reactivate your domain |
| 3028166 | Failed to renew error from Enom |
| 3031510 | Error From Enom when Errorcount <> 0 |
| 3050900 | Unknown error from Enom |
| 2016166 | Domain is not associated with your account |
| 4024167 | Failed to update years for your domain |
| 4023166 | Error occured while domain renewal |
| 4022337 | Error in refunding funds |