v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
DomainRecommendations

Get a URL to purchase a domain

This function returns a URL for the configured domain store's checkout page. This URL allows the user to complete the purchase of a domain name.

Note:

This function requires the domain_recommendation feature.

get/DomainRecommendations/purchase_domain

Query parameters

domainstring required
Example:mybusiness.com

The fully-qualified domain name (FQDN) to purchase.

Note:

This value must include the TLD (for example, mybusiness.com).

periodinteger required
Example:1

The registration period in years.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "purchase_domain",
  "module": "DomainRecommendations",
  "result": {
    "data": {
      "purchase_url": "https://store.example.com/cart.php?a=add&domain=register&sld=mybusiness&tld=.com&regperiod=1"
    },
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}